1. Removing unnecessary header information
// Remove unnecessary head information // Removal of version information remove_action (' Wp_head ', ' Wlwmanifest_link ' ); Remove_action (' wp_head ', ' rsd_link '); // clears the Offline editor interface remove_action (' Wp_head ', ' adjacent_posts_rel_link_wp_head ', 10, 0); // clear the contextual information remove_action (' Wp_head ', ' feed_links ', 2 ); Remove_action (' wp_head ', ' Feed_links_extra ', 3); // Clear Feed information remove_action (' Wp_head ', ' Wp_shortlink_wp_head ', 10,0);
2. Clear the Dashboard gadget
1 //Clear Dashboard Widget2 functionremove_dashboard_widgets () {3 //Globalize The metaboxes array, this holds all the widgets for Wp-admin4 Global $WP _meta_boxes;5 //The following line of code will remove the Quick release module6 unset($WP _meta_boxes[' Dashboard '] [' Side '] [' Core '] [' Dashboard_quick_press ']);7 //The following line of code will remove the "Introduction link" module8 unset($WP _meta_boxes[' Dashboard '] [' Normal '] [' Core '] [' Dashboard_incoming_links ']);9 //The following line of code will remove the "plug-in" moduleTen unset($WP _meta_boxes[' Dashboard '] [' Normal '] [' Core '] [' Dashboard_plugins ']); One //The following line of code will delete the "recent comments" module A unset($WP _meta_boxes[' Dashboard '] [' Normal '] [' Core '] [' Dashboard_recent_comments ']); - //The following line of code will delete the "recent drafts" module - unset($WP _meta_boxes[' Dashboard '] [' Side '] [' Core '] [' Dashboard_recent_drafts ']); the //The following line of code will remove the "WordPress Development Log" module - unset($WP _meta_boxes[' Dashboard '] [' Side '] [' Core '] [' Dashboard_primary ']); - //The following line of code will remove the "other WordPress News" module - unset($WP _meta_boxes[' Dashboard '] [' Side '] [' Core '] [' Dashboard_secondary ']); + //The following line of code will delete the "Overview" module - unset($WP _meta_boxes[' Dashboard '] [' Normal '] [' Core '] [' Dashboard_right_now ']); + } AAdd_action (' Wp_dashboard_setup ', ' remove_dashboard_widgets ');
3. Disable WordPress display update information
1 //Disable update prompt2Add_filter (' Pre_site_transient_update_core ',create_function(' $a ', "return null;"));//Turn off core tips3 4Add_filter (' Pre_site_transient_update_plugins ',create_function(' $a ', "return null;"));//Turn off plugin tips5 6Add_filter (' Pre_site_transient_update_themes ',create_function(' $a ', "return null;"));//Turn off Topic tips7 8Remove_action (' Admin_init ', ' _maybe_update_core ');//Disable WordPress check for updates9 TenRemove_action (' Admin_init ', ' _maybe_update_plugins ');//Disable WordPress Update plugin One ARemove_action (' Admin_init ', ' _maybe_update_themes ');//Disable WordPress update theme
4. Block background footer information
1 // Block background footer information 2 function change_footer_admin () {return ';} 3 add_filter (' Admin_footer_text ', ' change_footer_admin ', 9999); 4 function change_footer_version () {return ';} 5 add_filter (' Update_footer ', ' change_footer_version ', 9999);
5. Shield the top left logo
1 // 2 function Annointed_admin_bar_remove () { 3 globa L $wp _admin_bar ; 4 Remove their stuff */ 5 $WP _admin_bar ->remove_menu (' Wp-logo ' 6 7 add_action (' Wp_before_admin_bar_render ', ' Annointed_admin_bar_remove ', 0);
WordPress removes unnecessary information