Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Remove WordPress Welcome Widget
- remove_action('welcome_panel','wp_welcome_panel');
- // Remove all WordPress Core Dashboard Widgets
- add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
- function remove_dashboard_widgets() {
- global $wp_meta_boxes;
- unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
- unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
- unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
- unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
- unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
- unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
- unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
- unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
- unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
- //unset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);
- }
- // Create another widget
- add_action('wp_dashboard_setup', 'dashboard_widget');
- function dashboard_widget() {
- global $wp_meta_boxes;
- wp_add_dashboard_widget('custom_help_widget', 'Suporte', 'suporte_dashboard');
- }
- // New Widget Content
- function suporte_dashboard() {
- printf('<h3>Encontrou algum problema?</h3><p>www.cada-um-com-seus-problemas.com</p>');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement