Show hide by jQuery and and write js in creating customizer in wp-admin panel

Continue reading Show hide by jQuery and and write js in creating customizer in wp-admin panel

Advertisements

Remove Admin Dashboard Widget

function remove_dashboard_widgets(){
global$wp_meta_boxes;
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_plugins’]);
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_recent_comments’]);
unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]);
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_incoming_links’]);
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_right_now’]);
unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]);
}

add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’);

//Removing Menu Items

function remove_menu_items() {
global $menu;
$restricted = array(__(‘Links’), __(‘Media’),
(‘Plugins’), (‘Tools’), __(‘Users’));
end ($menu);
while (prev($menu)){
$value = explode(‘ ‘,$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:”” , $restricted)){
unset($menu[key($menu)]);}
}
}

add_action(‘admin_menu’, ‘remove_menu_items’);