function ata_widgets_init() {
// Area 1, located at the top of the sidebar.
register_sidebar(array(
'name' => __('Home', 'boilerplate'),
'id' => 'home-content',
'description' => __('Widget', 'boilerplate'),
'before_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Reparaties', 'boilerplate'),
'id' => 'reparatie-content',
'description' => __('Reparatie boxen', 'boilerplate'),
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Footer', 'boilerplate'),
'id' => 'footer-content',
'description' => __('Footer', 'boilerplate'),
'before_widget' => '',
'before_title' => '',
'after_title' => ''
));
unregister_widget('WP_Widget_Pages');
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Archives');
unregister_widget('WP_Widget_Links');
unregister_widget('WP_Widget_Meta');
unregister_widget('WP_Widget_Search');
unregister_widget('WP_Widget_Text');
unregister_widget('WP_Widget_Categories');
unregister_widget('WP_Widget_Recent_Posts');
unregister_widget('WP_Widget_Recent_Comments');
unregister_widget('WP_Widget_RSS');
unregister_widget('WP_Widget_Tag_Cloud');
unregister_widget('WP_Nav_Menu_Widget');
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Links');
}
add_action('widgets_init', 'ata_widgets_init');
function remove_menus() {
global $menu;
$restricted = array( __('Posts'), __('Links'), __('Comments'), __('Users'));
// $restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));
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_menus');
function my_custom_tinymce($init) {
$init['theme_advanced_buttons2_add_before'] = 'styleselect';
$init['theme_advanced_styles'] = 'Footer kopje=blackItalic';
return $init;
}
add_filter('tiny_mce_before_init', 'my_custom_tinymce');
function wps_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('about');
$wp_admin_bar->remove_menu('wporg');
$wp_admin_bar->remove_menu('documentation');
$wp_admin_bar->remove_menu('support-forums');
$wp_admin_bar->remove_menu('feedback');
$wp_admin_bar->remove_menu('view-site');
$wp_admin_bar->remove_menu('new-link');
$wp_admin_bar->remove_menu('new-post');
$wp_admin_bar->remove_menu('new-user');
$wp_admin_bar->remove_menu('new-media');
}
add_action( 'wp_before_admin_bar_render', 'wps_admin_bar' );
/*
function remove_submenus() {
global $submenu;
//Dashboard menu
unset($submenu['index.php'][10]); // Removes Updates
//Posts menu
unset($submenu['edit.php'][5]); // Leads to listing of available posts to edit
unset($submenu['edit.php'][10]); // Add new post
unset($submenu['edit.php'][15]); // Remove categories
unset($submenu['edit.php'][16]); // Removes Post Tags
//Media Menu
unset($submenu['upload.php'][5]); // View the Media library
unset($submenu['upload.php'][10]); // Add to Media library
//Links Menu
unset($submenu['link-manager.php'][5]); // Link manager
unset($submenu['link-manager.php'][10]); // Add new link
unset($submenu['link-manager.php'][15]); // Link Categories
//Pages Menu
unset($submenu['edit.php?post_type=page'][5]); // The Pages listing
unset($submenu['edit.php?post_type=page'][10]); // Add New page
//Appearance Menu
unset($submenu['themes.php'][5]); // Removes 'Themes'
unset($submenu['themes.php'][7]); // Widgets
unset($submenu['themes.php'][15]); // Removes Theme Installer tab
//Plugins Menu
unset($submenu['plugins.php'][5]); // Plugin Manager
unset($submenu['plugins.php'][10]); // Add New Plugins
unset($submenu['plugins.php'][15]); // Plugin Editor
//Users Menu
unset($submenu['users.php'][5]); // Users list
unset($submenu['users.php'][10]); // Add new user
unset($submenu['users.php'][15]); // Edit your profile
//Tools Menu
unset($submenu['tools.php'][5]); // Tools area
unset($submenu['tools.php'][10]); // Import
unset($submenu['tools.php'][15]); // Export
unset($submenu['tools.php'][20]); // Upgrade plugins and core files
//Settings Menu
unset($submenu['options-general.php'][10]); // General Options
unset($submenu['options-general.php'][15]); // Writing
unset($submenu['options-general.php'][20]); // Reading
unset($submenu['options-general.php'][25]); // Discussion
unset($submenu['options-general.php'][30]); // Media
unset($submenu['options-general.php'][35]); // Privacy
unset($submenu['options-general.php'][40]); // Permalinks
unset($submenu['options-general.php'][45]); // Misc
}
add_action('admin_menu', 'remove_submenus');
*/
?>