Skip to content

Instantly share code, notes, and snippets.

@fritids
Created January 30, 2014 11:35
Show Gist options
  • Select an option

  • Save fritids/8706784 to your computer and use it in GitHub Desktop.

Select an option

Save fritids/8706784 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'gettext', 'een_excerpt_meta', 10, 2 );
/**
* Rename the excerpt label and description.
*
* @since 0.1.0
*
* @param type $translation
* @param type $original
*
* @return type
*/
function een_excerpt_meta( $translation, $original ) {
if ( 'Excerpt' == $original ) {
return __( '<span style="color:#007aff;">G</span><span style="color:#e10728;">o</span><span style="color:#ffda21;">o</span><span style="color:#007aff;">g</span><span style="color:#23b12a;">l</span><span style="color:#e10728;">e</span> meta description', 'een' );
} else {
$pos = strpos( $original, 'Excerpts are optional hand-crafted summaries of your' );
if ( $pos !== false ) {
return __( 'The meta description can be used to determine the text used under the title on search engine results pages.', 'een' );
}
}
return $translation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment