Benutzer-Werkzeuge

Webseiten-Werkzeuge


Seitenleiste

3D

INTERN

ADOBE

ARDUINO

BITBUCKET

DOCKER

C4D

GIT

HTML

IPHONE

JAVASCRIPT

JTL-SHOP

LARAVEL

MAGENTO2

MYSQL

PHP

PLESK

PROCESSING

PYTHON

SUITECRM

SEO

TRYTON

THUNDERBIRD / ICEDOVE / FossaMail

TYPO3

TYPO3: BACKEND

TYPO3: TYPOSCRIPT

UNIX

VLC

VVVV

WINDOWS

WINDOWS 10

WORDPRESS

XAMPP

XT:C 4 (Veyton)

wordpress:clenup-admin-for-clients

Dies ist eine alte Version des Dokuments!


Wordpress: Cleanup Admin for Clients

place folling as file in the theme and require it in your themes function.php

<?php
/*
 * Following functions coming form suggestions from
 * https://www.smashingmagazine.com/2016/07/how-to-make-wordpress-hard-for-clients-to-mess-up/
 */
 
// place this in wp-config.php to disable wordpress file editing in the backend
//define( 'DISALLOW_FILE_EDIT', true );
 
function deglowdesign_disable_visual_editor() {
	# add logic here if you want to permit it selectively
	return false;
}
 
//add_filter( 'user_can_richedit', 'deglowdesign_disable_visual_editor', 50 );
 
 
# Remove visual editor buttons
function deglowdesign_tinymce_buttons( $buttons ) {
	# Remove the text color selector
	$remove = array( 'wp_adv', 'wp_more' ); //Add other button names to this array
	# Find the array key and then unset
	return array_diff( $buttons, $remove );
}
 
add_filter( 'mce_buttons', 'deglowdesign_tinymce_buttons' );
 
 
# Remove media buttons
function deglowdesign_remove_add_media() {
	# do this conditionally if you want to be more selective
	remove_action( 'media_buttons', 'media_buttons' );
}
 
add_action( 'admin_head', 'deglowdesign_remove_add_media' );
 
//global $Piklist_Shortcode;
remove_action( 'media_buttons', array( 'piklist_shortcode', 'media_buttons' ), 100 );
 
 
# Remove customizer options.
function deglowdesign_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', 'deglowdesign_remove_customizer_options', 30 );
 
 
function deglowdesign_custom_menu_page_removing() {
	// remove_menu_page( 'index.php' );                  //Dashboard
	// remove_menu_page( 'jetpack' );                    //Jetpack*
	remove_menu_page( 'edit.php' );                   //Posts
	// remove_menu_page( 'upload.php' );                 //Media
	// remove_menu_page( 'edit.php?post_type=page' );    //Pages
	remove_menu_page( 'edit-comments.php' );          //Comments
	// remove_menu_page( 'themes.php' );                 //Appearance
	remove_menu_page( 'plugins.php' );                //Plugins
	// remove_menu_page( 'users.php' );                  //Users
	// remove_menu_page( 'tools.php' );                  //Tools
	// remove_menu_page( 'options-general.php' );        //Settings
}
 
add_action( 'admin_menu', 'deglowdesign_custom_menu_page_removing' );
 
 
# Adds instruction text after the post title input
function deglowdesign_edit_form_after_title() {
	$tip = '<strong>TIP:</strong> Für einen einfachen Zeilenumbruch SHIFT+ENTER benutzen. Die ENTER Taste allein erzeugt immer einen neuen Absatz.';
	echo '<p style="margin-bottom:0;">' . $tip . '</p>';
}
 
add_action(
	'edit_form_after_title',
	'deglowdesign_edit_form_after_title'
);
wordpress/clenup-admin-for-clients.1469034456.txt.gz · Zuletzt geändert: 2016/07/20 19:07 von admin