Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My theme gives the site owner the option of using each post's "Excerpt" field to fill in the "meta description" tag for each page.

It would be helpful if I can filter the text label and description text that appears on the default Excerpt input control when viewed inside the post editor.

Does a filter or hook exist for this?

Alternately, I suppose I could use jQuery to do something via the DOM.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

there is a filter hook you can use and it is gettext here:

add_filter( 'gettext', 'wpse22764_gettext', 10, 2 );
function wpse22764_gettext( $translation, $original )
{
    if ( 'Excerpt' == $original ) {
        return 'My Excerpt label';
    }else{
        $pos = strpos($original, 'Excerpts are optional hand-crafted summaries of your');
        if ($pos !== false) {
            return  'My Excerpt description';
        }
    }
    return $translation;
}
share|improve this answer
    
Wow, that's terrific. Thanks Bainternet. –  N2Mystic Jul 13 '11 at 16:29
    
Can I do the same for the "Tags" box? –  N2Mystic Jul 13 '11 at 16:34
    
yep, same filter hook –  Bainternet Jul 13 '11 at 17:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.