Is there a way to programmatically pass a category to the Media Library selector?
Is there a way to programmatically pass a category to the Media Library selector?
Is there a way to programmatically pass a category to the Media Library selector?
You can make WLW upload images directly via FTP, you can set this up in settings of connection to your blog. However as long time WLW user myself I would strongly suggest you to try and make sense of media management in WP, even if it seems excessive at moment (it did to me for … Read more
Iterate over all posts, find the attached images … $images =& get_children( array ( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’ ); … and for each image use wp_update_post() to set the date from the parent post.
If I correctly understand your question, you may try this function wpse78084_show_media_by_current_author_only($query) { global $pagenow, $user_ID; if( ‘upload.php’ == $pagenow && !current_user_can(‘manage_options’) ) $query->set(‘author’, $user_ID); return $query; } if ( is_admin() ) add_filter(‘pre_get_posts’, ‘wpse78084_show_media_by_current_author_only’);
I can only take a guess at this. Is the image you want to change a background image (using CSS)? – if you goto the page, use your web inspector tool. You should then be able to see where image url is coming from.
You’re close – couple of things: $field is an array representation of the field, so you need to use $field[‘name’] which is the name of the field. get_field will format the value unless you set the third argument to false – we want the ID, not the post object/URL (or whatever setting you configured for … Read more
WordPress by default compress and lower image quality. To disable it please enter this code in functions.php file of your theme. add_filter( ‘jpeg_quality’, create_function( ”, ‘return 100;’ ) );
If the edit link to your image is: http://example.tld/wp-admin/post.php?post=551&action=edit then the link to the image editor for that image is: http://example.tld/wp-admin/post.php?post=551&action=edit&image-editor The $_GET[‘image-editor’] is checked for in the edit_form_image_editor() function. PS: I first noticed this trick, when testing this avatar plugin recently (I’m not related to that plugin)
I came up with a way to do it: Add an element to the contents of the frame such as a text input with and ID (i.e. ‘search_text’) In the plugin’s CSS file, style the element to be visible only when it is displayed in the frame: #search_text { display: none; } #media-upload #search_text { … Read more
WordPress galleries are not true “objects”, they are just a kind of one time macro. There is no real DB of them, just a shortcode in the content and once you deleted it, there is no gallery any more (except for in the old revisions). The code you referenced is a relic of the old … Read more