Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WP Plugins
Timeline
Commits
e5397947
Commit
e5397947
authored
Jul 21, 2013
by
Erick Hitter
Browse files
Minimal text changes in the admin for consistency with forthcoming end-date meta.
parent
d4b137fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
eth-timeline.php
View file @
e5397947
...
...
@@ -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
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment