Commit d4b137fa authored by Erick Hitter's avatar Erick Hitter

Filter editor prompt text.

See #3.
parent 3cfc0198
......@@ -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
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment