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

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

parent d4b137fa
Branches
No related tags found
No related merge requests found
...@@ -58,6 +58,8 @@ class ETH_Timeline { ...@@ -58,6 +58,8 @@ class ETH_Timeline {
private function setup() { private function setup() {
add_action( 'init', array( $this, 'action_init' ) ); add_action( 'init', array( $this, 'action_init' ) );
add_action( 'save_post', array( $this, 'action_save_post' ) ); 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 ); add_filter( 'enter_title_here', array( $this, 'filter_editor_title_prompt' ), 10, 2 );
} }
...@@ -144,6 +146,36 @@ class ETH_Timeline { ...@@ -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 * Provide better prompt text for the editor title field
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment