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 | |
/* Disable the Admin Bar. */ | |
// From: http://yoast.com/disable-wp-admin-bar/ | |
add_filter( 'show_admin_bar', '__return_false' ); | |
function sp_hide_admin_bar_settings() | |
{ | |
?><style type="text/css">.show-admin-bar {display: none;}</style><?php | |
} |
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 | |
// Remove Dashboard Widgets | |
// http://digwp.com/2010/10/customize-wordpress-dashboard/ | |
function disable_default_dashboard_widgets() { | |
// disable default dashboard widgets | |
remove_meta_box('dashboard_right_now', 'dashboard', 'core'); | |
remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); |
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 | |
// Remove help and screen context: | |
// Remove Help and Screen Options | |
// http://wordpress.stackexchange.com/questions/73561/how-to-remove-all-widgets-from-dashboard | |
add_filter( 'contextual_help', 'wpse_25034_remove_dashboard_help_tab', 999, 3 ); | |
add_filter( 'screen_options_show_screen', 'wpse_25034_remove_help_tab' ); | |
function wpse_25034_remove_dashboard_help_tab( $old_help, $screen_id, $screen ) | |
{ | |
if( 'dashboard' != $screen->base ) |
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 | |
/* ------------------------------------------------------------------ */ | |
// Change Howdy | |
// http://www.wpbeginner.com/wp-tutorials/how-to-change-the-howdy-text-in-wordpress-3-3-admin-bar/ | |
add_action( 'admin_bar_menu', 'wp_admin_bar_my_custom_account_menu', 11 ); | |
function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) { | |
$user_id = get_current_user_id(); | |
$current_user = wp_get_current_user(); | |
$profile_url = get_edit_profile_url( $user_id ); |
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 | |
/* ------------------------------------------------------------------ */ | |
// Remove Mandrill Dashboard Widget | |
// http://wordpress.org/support/topic/dashboard-widget?replies=3 | |
function sp_remove_wpmandrill_dashboard() { | |
if ( class_exists( 'wpMandrill' ) ) { | |
remove_action( 'wp_dashboard_setup', array( 'wpMandrill' , 'addDashboardWidgets' ) ); | |
} | |
} | |
add_action( 'admin_init', 'sp_remove_wpmandrill_dashboard' ); |
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 | |
/* ------------------------------------------------------------------ */ | |
// Custom Login Image | |
// http://wp.tutsplus.com/tutorials/customizing-wordpress-for-your-clients/ | |
function my_custom_login_logo() | |
{ | |
echo '<style type="text/css"> h1 a { background-image:url(/assets/img/spLogo.png) !important; } </style>'; | |
} | |
add_action('login_head', 'my_custom_login_logo'); |
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 | |
/* ------------------------------------------------------------------ */ | |
// Change Login Logo Link | |
// http://wp.tutsplus.com/tutorials/customizing-wordpress-for-your-clients/ | |
function change_wp_login_url() | |
{ | |
return "http://selectperformers.com/"; // OR ECHO YOUR OWN URL | |
} |
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 | |
/* ---------------------------------------------------------------------------------- */ | |
/* Convert absolute URLs in content to site relative ones | |
Inspired by http://thisismyurl.com/6166/replace-wordpress-static-urls-dynamic-urls/ | |
*/ | |
function sp_clean_static_url($content) { | |
$thisURL = get_bloginfo('url'); | |
$stuff = str_replace(' src=\"'.$thisURL, ' src=\"', $content ); | |
$stuff = str_replace(' href=\"'.$thisURL, ' href=\"', $stuff ); | |
return $stuff; |
OlderNewer