6 added 2 characters in body; deleted 3 characters in body
source | link

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) {

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?

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?

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?

5 fixed code markup
source | link

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) { 

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?

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?

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?

4 Added my code
source | link

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?

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?

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?

3 clarified title
| link
2 added 4 characters in body
source | link
1
source | link