How do I remove the entire Media section from the main WordPress navigation without just hiding it?

You are indeed correct, before the admin update(i imagine the UI redesign, etc), unsetting items from the menus would in effect prevent access to those pages, that’s clearly changed now and requires additional cap checking. This isn’t something i’ve looked into myself(as i’ve just found out this moment), so i can’t speak about methods for … Read more

Inserting a Download Link in the Quick Edit Actions of the Media Library?

Modified version of a piece of code found in this tutorial. add_filter(‘media_row_actions’, ‘wpse_30159_qe_download_link’, 10, 2); function wpse_30159_qe_download_link($actions, $post) { /* Almost sure this is not necessary. Just in case… */ global $current_screen; if ( ‘upload’ != $current_screen->id ) return $actions; // if not PDF file, return default $actions if ( ‘application/pdf’ != $post->post_mime_type ) return … Read more

How to modify Media Library images

A quick look at the media page with Firebug shows that this CSS statement will allow you to change the size of the picture: .media-frame-content[data-columns=”9″] .attachment { width: 11.11%; } Change the ‘width’ value to something different, with the understanding that the change may affect how the page looks on different size screens. You should … Read more

How to enlarge thickbox media library iframe?

Yep, it’s curious that adding the extra parameters doesn’t works… I know that Adminimize does that. Looking at its code, that’s what it does: wp_deregister_script( ‘media-upload’ ); wp_enqueue_script( ‘media-upload’, WP_PLUGIN_URL . “https://wordpress.stackexchange.com/” . FB_ADMINIMIZE_BASEFOLDER . ‘/js/tb_window.js’, array( ‘thickbox’ ) ); And this is the tb_window.js file: // send html to the post editor function send_to_editor(h) … Read more

Using WordPress as a document library

I use the Media Library Categories plugin to add categories. It does a wonderful job of adding category functionality, but the code could be improved upon and custom implementation requires some knowledge of PHP, as it only provides you with a shortcode and no documentation. This Question, maybe be able to help you if you … Read more

How to save attachment data?

WordPress has an hook for save meta data an attachment; an small example; like the post_data on save posts. // Construct the attachment array $attachment = array_merge( array( ‘post_mime_type’ => $type, ‘guid’ => $url, ‘post_parent’ => $post_id, ‘post_title’ => $title, ‘post_content’ => $content, ), $post_data ); // Save the data $id = wp_insert_attachment($attachment, $file, $post_id); … Read more