Created
February 12, 2015 08:41
-
-
Save samediamba/ebab55f25888ac5cedb5 to your computer and use it in GitHub Desktop.
Change text in post excerpt metabox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Change the Excerpt text and description | |
*/ | |
function change_excerpt_name( $translated_text, $text, $domain ) { | |
if ( $_GET['post_type'] == 'staff' ) { | |
switch ( $translated_text ) { | |
case 'Excerpt' : | |
$translated_text = 'Staff Role/Position'; | |
break; | |
case 'Excerpts are optional hand-crafted summaries of your content that can be used in your theme. <a href="http://codex.wordpress.org/Excerpt" target="_blank">Learn more about manual excerpts.</a>' : | |
$translated_text = 'This is the role of the Church Staff Member. Use sentence case e.g. Communication Director'; | |
break; | |
} | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'change_excerpt_name', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment