From 17a02b71c0e84009c7f2a9fe1ca1c4be87a5cf32 Mon Sep 17 00:00:00 2001 From: Vit Rozkovec Date: Wed, 8 Jan 2014 01:28:39 +0100 Subject: [PATCH] Update meta-boxes.js Add filter options to product gallery images selector to make visible filters of plugins such as the Enhanced Media Library --- assets/js/admin/meta-boxes.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/js/admin/meta-boxes.js b/assets/js/admin/meta-boxes.js index 1792966a911..e4f2aede852 100644 --- a/assets/js/admin/meta-boxes.js +++ b/assets/js/admin/meta-boxes.js @@ -1508,7 +1508,13 @@ jQuery( function($){ button: { text: $el.data('update'), }, - multiple: true + multiple: true, + states : [ + new wp.media.controller.Library({ + title: $el.data('choose'), + filterable : 'all' + }) + ] }); // When an image is selected, run a callback. @@ -1584,4 +1590,4 @@ jQuery( function($){ return false; }); -}); \ No newline at end of file +});