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 the default Enter Title Here text | |
function custom_title_here_text( $title ){ | |
$screen = get_current_screen(); | |
if ( 'POST_TYPE' == $screen->post_type ) { | |
$title = 'Enter Custom Title'; | |
} | |
return $title; | |
} | |
add_filter( 'enter_title_here', 'custom_title_here_text' ); |
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 | |
// Hide update notification | |
function hide_update_notification() { | |
echo '<style type="text/css"> | |
.update-nag {display: none} | |
</style>'; | |
} | |
add_action('admin_head', 'hide_update_notification'); |
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 draggable metaboxes | |
function non_draggable_metabox() { | |
wp_deregister_script('postbox'); | |
} | |
add_action( 'admin_init', 'non_draggable_metabox' ); |
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 | |
// Create a custom theme for your login page | |
function plugin_drawer_login() { | |
echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/wp-login.css"/>'; | |
} | |
add_action('login_head', 'plugin_drawer_login'); | |
?> |
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 | |
//set a custom excerpt length | |
function pd_custom_excerpt_length( $length ) { | |
//change the following to the number of words you would like to display | |
return 20; | |
} | |
add_filter( 'excerpt_length', 'pd_custom_excerpt_length'); | |
?> |
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 the login screen error messages | |
function pd_login_error(){ return '<strong>Sorry!</strong>: It looks like you my have the wrong login information.';} | |
add_filter( 'login_errors', 'pd_login_error' ); | |
?> |
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 the theme and plugin editors from the dashboard | |
define('DISALLOW_FILE_EDIT', true); | |
?> |
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 | |
// Hide your WordPress version | |
remove_action('wp_head', 'wp_generator'); | |
?> |
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 Custom Post Type to At A Glance Dashboard Widget | |
function add_post_type_to_right_now() { | |
$args = array( | |
'public' => true , | |
'_builtin' => false | |
); | |
$output = 'object'; | |
$operator = 'and'; | |
$post_types = get_post_types( $args , $output , $operator ); |
OlderNewer