Created
January 14, 2018 12:48
-
-
Save ufon/63806e7b94f816ed4fbaff1579722c65 to your computer and use it in GitHub Desktop.
Wordpress library with all filters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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