define( 'DISALLOW_FILE_EDIT', true );
function iv_disable_editor(){
return false;
}
add_filter('user_can_richedit', 'iv_disable_editor', 50);
# '' werkt niet, ',' wel
function iv_show_quicktags( $qtInit ) {
$qtInit['buttons'] = 'strong,em,block';
return $qtInit;
}
add_filter('quicktags_settings', 'iv_show_quicktags');
function iv_remove_add_media(){
remove_action( 'media_buttons', 'media_buttons' );
}
add_action('admin_head', 'iv_remove_add_media');
function iv_remove_customizer_options( $wp_customize ) {
// $wp_customize->remove_section( 'static_front_page' );
// $wp_customize->remove_section( 'title_tagline' );
$wp_customize->remove_section( 'colors' );
$wp_customize->remove_section( 'header_image' );
$wp_customize->remove_section( 'background_image' );
// $wp_customize->remove_section( 'nav' );
// $wp_customize->remove_section( 'themes' );
$wp_customize->remove_section( 'featured_content' );
$wp_customize->remove_panel( 'widgets' );
}
add_action( 'customize_register', 'iv_remove_customizer_options', 30);
function iv_custom_menu_page_removing() {
// remove_menu_page( 'index.php' ); // Dashboard
// remove_menu_page( 'edit.php' ); // Posts
// remove_menu_page( 'upload.php' ); // Media
// remove_menu_page( 'edit.php?post_type=page' ); // Pagina's
remove_menu_page( 'edit-comments.php' ); // Reacties
// remove_menu_page( 'themes.php' ); // Appearance
// remove_menu_page( 'plugins.php' ); // Plugins
// remove_menu_page( 'users.php' ); // Gebruikers
// remove_menu_page( 'tools.php' ); // Tools
// remove_menu_page( 'options-general.php' ); // Instellingen
}
add_action( 'admin_menu', 'iv_custom_menu_page_removing' );
function iv_edit_form_after_title() {
$hint = '<strong>HINT:</strong> Gebruik SHIFT + ENTER voor een nieuwe regel. ENTER maakt een nieuwe paragraaf.';
echo '<p>'.$hint.'</p>';
}
add_action( 'edit_form_after_title', 'iv_edit_form_after_title' );
// mu-plugins/load.php
require WPMU_PLUGIN_DIR . '/my-plugin/my-plugin.php';