I want to change the default “Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts.” help text below the Excerpt input area to something more meaningful for my Custom Post Type.
I’ve done something similar with Post Title, using a “translation” filter, but how would I do this with the post excerpt?
Here is my current code:
add_filter('gettext', 'custom_rewrites', 10, 4);
function custom_rewrites($translation, $text, $domain) {
global $post;
$translations = &get_translations_for_domain($domain);
$translation_array = array();
switch ($post->post_type) {
case 'model':
$translation_array = array(
'Enter title here' => 'Enter model name here',
'Excerpt' => "Byline",
'Excerpts are optional hand-crafted summaries of your content that can be used in your theme.' => "Foobar"
);
break;
}
if (array_key_exists($text, $translation_array)) {
return $translations->translate($translation_array[$text]);
}
return $translation;
}
The third translation isn’t working?