Skip to content

Commit

Permalink
Hotfix: Get attachment attributes directly
Browse files Browse the repository at this point in the history
The `getFromCache()` method was deprecated in Shortcode UI via
wp-shortcake/shortcake#508

This should work as a band-aid until fixed upstream via
wp-shortcake#75
  • Loading branch information
jeremyfelt committed May 22, 2017
1 parent ae51709 commit a280168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/image-shortcake-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var ImageShortcake = {
return;
}

var attachment = sui.views.editAttributeFieldAttachment.getFromCache( changed.value );
var attachment = wp.media.attachment( changed.value ).attributes;

if ( attachment ) {

Expand Down

1 comment on commit a280168

@montchr
Copy link

@montchr montchr commented on a280168 Aug 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Please sign in to comment.