Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ufon/63806e7b94f816ed4fbaff1579722c65 to your computer and use it in GitHub Desktop.
Save ufon/63806e7b94f816ed4fbaff1579722c65 to your computer and use it in GitHub Desktop.
Wordpress library with all filters
file_frame = myGlobalFrame = new wp.media.view.MediaFrame.Select(
{
title: '<?php _e( "Choose an image", "woocommerce" ); ?>',
button: {
text: '<?php _e( "Use image", "woocommerce" ); ?>'
},
state : 'library',
states : [
//library
new wp.media.controller.Library({
//data : false,
//multiple : false,
filterable : 'all',
//selectedImageId : 0,
library : wp.media.query(
{
type : 'image'
}
)
})
]
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment