Skip to content
Snippets Groups Projects
Commit d4b137fa authored by Erick Hitter's avatar Erick Hitter
Browse files

Filter editor prompt text.

See #3.
parent 3cfc0198
Branches
No related tags found
No related merge requests found
......@@ -58,6 +58,7 @@ class ETH_Timeline {
private function setup() {
add_action( 'init', array( $this, 'action_init' ) );
add_action( 'save_post', array( $this, 'action_save_post' ) );
add_filter( 'enter_title_here', array( $this, 'filter_editor_title_prompt' ), 10, 2 );
}
/**
......@@ -143,6 +144,23 @@ class ETH_Timeline {
}
}
/**
* Provide better prompt text for the editor title field
*
* @param string $text
* @param object $post
* @uses get_post_type
* @uses __
* @filter enter_title_here
* @return string
*/
public function filter_editor_title_prompt( $text, $post ) {
if ( $this->post_type == get_post_type( $post ) )
$text = __( 'Enter destination here', 'eth-timeline' );
return $text;
}
/**
* Return formatted field name
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment