Created
August 23, 2012 02:30
-
-
Save rafarubert/3431527 to your computer and use it in GitHub Desktop.
functions php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support( 'post-thumbnails' ); | |
} | |
function remove_footer_admin () { | |
echo 'Carnabral 2012.'; | |
} | |
function change_footer_version() { | |
return '1.0'; | |
} | |
function remove_defaults() { | |
global $menu; | |
unset($menu[5]); //posts | |
unset($menu[25]); //coments | |
unset($menu[15]); // links | |
unset($menu[10]); // midias | |
unset($menu[60]); // aparence | |
unset($menu[65]); // plugins | |
unset($menu[70]); // users | |
unset($menu[75]); // tools | |
unset($menu[80]); // settings | |
} | |
function disable_drag_metabox() { | |
wp_deregister_script('postbox'); | |
} | |
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']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); | |
} | |
function hide_welcome_panel() { | |
$user_id = get_current_user_id(); | |
if ( 1 == get_user_meta( $user_id, 'show_welcome_panel', true ) ) | |
update_user_meta( $user_id, 'show_welcome_panel', 0 ); | |
} | |
add_action( 'admin_init', 'disable_drag_metabox' ); | |
add_action('wp_dashboard_setup', 'remove_dashboard_widgets'); | |
add_action('admin_head', 'remove_defaults'); | |
add_action( 'load-index.php', 'hide_welcome_panel' ); | |
add_filter( 'update_footer', 'change_footer_version', 9999 ); | |
add_filter('admin_footer_text', 'remove_footer_admin'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment