Disable WordPress Plugin Update Notification

Disable WordPress Plugin Update

How often do you log in to the admin area of your WordPress site and see a notification that one of your plugins has a newer version ready to update to? If you have more than a few installed, you’re probably familiar with these messages. If you ignore these updates, the notifications can pile up…

Display Post Attachment Count In Admin Column

A great function to add to your theme if you add a lot of images to your posts. add_filter(‘manage_posts_columns’, ‘posts_columns_attachment_count’, 5); add_action(‘manage_posts_custom_column’, ‘posts_custom_columns_attachment_count’, 5, 2); function posts_columns_attachment_count($defaults){ $defaults[‘wps_post_attachments’] = __(‘Att’); return $defaults; } function posts_custom_columns_attachment_count($column_name, $id){ if($column_name === ‘wps_post_attachments’){ $attachments = get_children(array(‘post_parent’=>$id)); $count = count($attachments); if($count !=0){echo $count;} } }

Replace Howdy Text

Bored with the ‘Howdy’ text? If you want to change that to a special salutation on your site, just add this to functions.php and the effect will take place immediately. function change_howdy($translated, $text, $domain) {     if (false !== strpos($translated, ‘Howdy’))     return str_replace(‘Howdy’, ‘Hello’, $translated);     return $translated; } add_filter(‘gettext’, ‘change_howdy’, 10, 3);

Add Additional Menu Removal For Particular Roles

You can hide menus that are in the Dashboard, for non-administrators, with this snippet. function remove_admin_menus(){     if(is_user_logged_in() && !current_user_can(‘administrator’)){         remove_menu_page( ‘index.php’ );                  //Dashboard         remove_menu_page( ‘edit.php’ );                   //Posts         remove_menu_page( ‘upload.php’ );                 //Media         remove_menu_page( ‘edit.php?post_type=page’ );    //Pages         remove_menu_page( ‘edit-comments.php’ );          //Comments         remove_menu_page( ‘themes.php’ );                 //Appearance         remove_menu_page( ‘plugins.php’ );                //Plugins…