Commit e5397947 authored by Erick Hitter's avatar Erick Hitter

Minimal text changes in the admin for consistency with forthcoming end-date meta.

parent d4b137fa
......@@ -58,6 +58,8 @@ class ETH_Timeline {
private function setup() {
add_action( 'init', array( $this, 'action_init' ) );
add_action( 'save_post', array( $this, 'action_save_post' ) );
add_filter( 'gettext', array( $this, 'filter_gettext' ) );
add_filter( 'enter_title_here', array( $this, 'filter_editor_title_prompt' ), 10, 2 );
}
......@@ -144,6 +146,36 @@ class ETH_Timeline {
}
}
/**
* Translate certain admin strings for relevance
*
* @param string $text
* @uses is_admin
* @uses get_current_screen
* @uses is_wp_error
* @filter gettext
* @return string
*/
public function filter_gettext( $text ) {
if ( is_admin() && function_exists( 'get_current_screen' ) ) {
$screen = get_current_screen();
if ( is_object( $screen ) && ! is_wp_error( $screen ) && $this->post_type == $screen->post_type ) {
$text = str_replace( array(
'Published on',
'Publish',
), array(
'Start',
'Start'
), $text );
}
}
return $text;
}
/**
* Provide better prompt text for the editor title field
*
......
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