Skip to content

Commit

Permalink
Fix media library broken with ACF 5.8.3 (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
herrvigg committed Aug 14, 2019
1 parent 4ac406e commit d026ceb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/acf/src/acf_5/fields/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ function initialize() {


// filters
add_filter('get_media_item_args', array($this, 'get_media_item_args'));
add_filter('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 10, 3);
add_filter('get_media_item_args', array($this, 'get_media_item_args'));
// removed from ACF 5.8.3
if (method_exists($this, 'wp_prepare_attachment_for_js')) {
add_filter('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 10, 3);
}

}

Expand Down

0 comments on commit d026ceb

Please sign in to comment.