WordPress 3.5 Media Manager – add a button

In my plugin, I would like to add two buttons to Media Manager (to the left of “Insert Into Post” in “media-toolbar-primary” section), and connect a jQuery action to it. First one – The “Select All” button shoud allow to select all availabe images (only images), depending on option value selected (eg. All Media Items, … Read more

Changing image URLs in media library

On a default wordpress install, the media library is located at: /wp-admin/upload.php. I am trying to update the image URL to point to my CDN, not my local server. This filter add_filter(‘admin_post_thumbnail_html’, ‘my-function’, 1000, 5); will update the featured image URLs in the admin, but not the images in the media library list table. Is … Read more

Is it possible to personalize the Media Library?

When we create a new post and click on Featured Image, I realize that WP creates a folder structure “year/month/image.jpg”. I’d like to change that behavior to “category_of_the_post/image.jpg” (or maybe “category_of_the_post/year/month/image.jpg”). The reason is that I want to create a different album of each “category_of_the_post” folder. I tried different plugins, but I didn’t find any … Read more

Display only my own files/images in media library

I just want to let user see only their own files in media library. I have 2 questions: it works great on list of media library. add_action(‘pre_get_posts’,’users_own_attachments’); function users_own_attachments( $wp_query_obj ) { global $current_user, $pagenow; //echo ‘pagenow=’.$pagenow; if( !is_a( $current_user, ‘WP_User’) ) return; if( ‘upload.php’ != $pagenow ) return; if( !current_user_can(‘delete_pages’) ) $wp_query_obj->set(‘author’, $current_user->id ); … Read more

Refreshing collections in the admin media manager

I know this question is very similar to this previously asked question; however, I was wondering if there was a more up-to-date/official way to refresh content programmatically in the WordPress admin media manager. In my specific instance, I’m trying to integrate the Getty Images plugin with a select attachment modal (e.g., Featured Image). Currently, I’ve … Read more