-
-
Save siriokun/4326141 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Modify the "Enter title here" text when adding new CPT, post or page | |
* | |
* @access public | |
* @since 1.0 | |
* @return void | |
*/ | |
function rc_change_default_title( $title ){ | |
$screen = get_current_screen(); | |
if ( '_your_custom_post_type_' == $screen->post_type ) { | |
$title = 'The new title'; | |
} | |
return $title; | |
} | |
add_filter( 'enter_title_here', 'rc_change_default_title' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment