I'm using the enter_title_here filter to modify the 'Enter title here' text in a custom post type, question is what hook should I use to trigger this function?
I have used admin_enqueue_script as a test and it worked, but I think there is a better hook since this is not really a script.
function print_scripts() {
$screen = get_current_screen();
if ( 'post' === $screen->base && 'myposttype' === $screen->post_type ) {
wp_enqueue_style( 'styles', WP_CSS . 'styles.css' );
// filter used here
add_filter( 'enter_title_here', function() { _e("Enter name here"); } );
}
}
add_action( 'admin_enqueue_scripts', 'print_scripts' );

enter_title_here. No action hook is required for that. Yes, for enqueuing the script,admin_enqueue_scriptswill do. – Rutwick Gangurde Aug 22 '12 at 10:26