This file contains 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
.ir{ | |
border:0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
This file contains 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 | |
/** | |
* Add a widget to the dashboard. | |
* | |
* This function is hooked into the 'wp_dashboard_setup' action below. | |
*/ | |
function example_add_dashboard_widgets() { | |
wp_add_dashboard_widget( |
This file contains 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
function remove_dashboard_meta() { | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8 |
This file contains 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
//Redirect users to Dashboard based on Admin, wp tech Nantes, Benjamin Denis | |
$pages = array( 'tools', 'options-general', 'options-writing', 'options-reading', 'options-discussion', 'options-permalink', 'options-media'); //pages | |
foreach( $pages as $page ) | |
add_action( "load-".$page.".php", 'wpc_block_users' ); | |
function wpc_block_users() { | |
wp_redirect( admin_url() ); | |
exit(); | |
} |
This file contains 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
//www.wpoptimus.com/626/7-ways-disable-update-wordpress-notifications/ | |
//To Disable Update WordPress nag | |
add_action('after_setup_theme','remove_core_updates'); | |
function remove_core_updates(){ | |
if(! current_user_can('update_core')){return;} | |
add_action('init', create_function('$a',"remove_action( 'init', 'wp_version_check' );"),2); | |
add_filter('pre_option_update_core','__return_null'); | |
add_filter('pre_site_transient_update_core','__return_null'); | |
} |
This file contains 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
//Remove Get Shortlink | |
add_filter('pre_get_shortlink', '__return_empty_string'); |
This file contains 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
//Enable full TinyMCE by default | |
function my_mce_options( $init ) { | |
$init['wordpress_adv_hidden'] = false; | |
return $init; | |
} | |
add_filter('tiny_mce_before_init', 'my_mce_options'); | |
//Add buttons in TinyMCE, list http://www.tinymce.com/wiki.php/TinyMCE3x:Buttons/controls | |
function wpc_add_more_buttons($buttons){ | |
$buttons[] = 'charmap'; |
This file contains 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
// Favicon in wordpress admin | |
function wpc_admin_favicon(){ | |
echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_stylesheet_directory_uri().'/img/favicon.ico" />'; | |
} | |
add_action('admin_head', 'wpc_admin_favicon'); |
OlderNewer