Created
January 30, 2014 11:35
-
-
Save fritids/8706784 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?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