Customize the upload screen

You will need to hook into attachment_fields_to_edit and unset them for a role. You can use current_user_can(‘author’) http://codex.wordpress.org/Function_Reference/current_user_can Example to remove image alt field function remove_caption($form_fields) { if (current_user_can(‘author’)){ $form_fields[‘image_alt’][‘input’] = ‘hidden’; return $form_fields; }} add_filter(‘attachment_fields_to_edit’,’remove_caption’, 15, 2); My initial post used unset but I tried it and it did not work, from the example … Read more

How to remove “Super Admin” from All Users for those that are not a “Super Admin”?

This list of filters at the top of admin screens are called Views. You can manage views using the views_{$this->screen->id} filter. Where you’d replace {$this->screen->id} with the name of the screen you’d like to manage. In order to filter the Users screen, you can try the following: // filter the ‘users’ views add_filter( “views_users”, “wse57231_filter_user_views”); … Read more

Possible to create placeholder images in WordPress editor that are clickable (should bring up uploader)?

such an answer would likely become unworkable/unusable after a WordPress update, as TinyMCE get updated and APIs change – by @TomJNowell While I agree with Tom, there still an be a general answer that explains the general concept and the parts that aren’t moving. The PHP plugin to set the default content First there has … Read more

WordPress last login foreach user

This will add a new column to the Users admin and show their last login. <?php /* Plugin Name: (#158276) WPSE | Last user login */ // Add user meta `last_login` that saves the UNIX time stamp // to identify the exact time when a user logged in add_action( ‘wp_login’, ‘add_login_time’ ); function add_login_time( $user_login … Read more

Better search for WordPress admin backend [closed]

The Search Everything plugin works pretty well for me on the front end. I’ve never tried it, but you should be able to fork it and add is_admin() conditionals to all of the functions it uses. Or better yet, just allow the frond-end to be search-able too. A visitor who can find what they are … 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

Integrate post tags in Post Edit page with qTranslate

When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any). In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately after that. Looking at source … Read more

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