Created
March 31, 2019 15:51
-
-
Save Glinkfr/3b6599c110126555e4ad256f9b30c409 to your computer and use it in GitHub Desktop.
Supprimer des widgets du tableau de bord
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# supprime des widgets au tableau de bord | |
add_action(‘wp_dashboard_setup’, ‘custom_dashboard_widgets’); | |
function custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
# supprime les widgets | |
// var_dump( $wp_meta_boxes['dashboard'] ); // utilisez le pour récupérer tous les ID des widgets | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment