Change text of Description in Image Library

Even if is not very flexible filter you can use the gettex hook. Only be aware that this filter runs for every string being translated, so can affect performarce if over-used. To narrow the performance impact you can add it only of admin footer, and remove it just after had use it: add_action(‘admin_footer’, function() { … 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

Making the thumbnails in the backend Media section bigger

I don’t see any way of hooking into this. Following the lead of wp_get_attachment_image takes nowhere… // wp-admin/includes/class-wp-media-list-table.php // line 200 case ‘icon’: $attributes=”class=”column-icon media-icon”” . $style; ?> <td <?php echo $attributes ?>><?php if ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) { if ( $this->is_trash || ! $user_can_edit ) { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)