SHARE
TWEET

Untitled

a guest Aug 25th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Hidde wordpress version in header-meta
  2.  
  3. remove_action('wp_head', 'wp_generator');
  4.  
  5. // disable backend theme/plugin editor
  6.  
  7. define( 'DISALLOW_FILE_EDIT', true );
  8.  
  9. // Diable WordPress Emojis
  10.  
  11. function disable_emojis() {
  12.     remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
  13.     remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
  14.     remove_action( 'wp_print_styles', 'print_emoji_styles' );
  15.     remove_action( 'admin_print_styles', 'print_emoji_styles' );   
  16.     remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
  17.     remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); 
  18.     remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
  19.     add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
  20. }
  21. add_action( 'init', 'disable_emojis' );
  22.  
  23. function disable_emojis_tinymce( $plugins ) {
  24.     if ( is_array( $plugins ) ) {
  25.         return array_diff( $plugins, array( 'wpemoji' ) );
  26.     } else {
  27.         return array();
  28.     }
  29. }
  30.  
  31. // remove standard Dashboard Widgets
  32.  
  33. function remove_dashboard_widgets() {
  34. global $wp_meta_boxes;
  35.  
  36. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
  37. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
  38. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
  39. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
  40. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
  41. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
  42. }
  43. add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
  44.  
  45. // Remove WordPress Logo from Toolbar
  46.  
  47. add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );
  48.  
  49. function remove_wp_logo( $wp_admin_bar ) {
  50.     $wp_admin_bar->remove_node( 'wp-logo' );
  51. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top