Created
March 2, 2012 07:19
Revisions
-
ninnypants created this gist
Mar 2, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ <?php // alter metabox titles add_filter('gettext', 'wps_translation_mangler', 10, 4); function wps_translation_mangler($translation, $text, $domain) { global $post; if (!empty($post)) { $translations = &get_translations_for_domain( $domain); if($post->post_type == 'ufcf_person'){ if ( $text == 'Set featured image') { return $translations->translate( 'Set profile picture' ); } if ( $text == 'Remove featured image') { return $translations->translate( 'Remove profile picture' ); } if ( $text == 'Featured Image') { return $translations->translate( 'Profile Picture' ); } }elseif($post->post_type == 'page'){ if ( $text == 'Set featured image') { return $translations->translate( 'Set billboard image' ); } if ( $text == 'Remove featured image') { return $translations->translate( 'Remove billboard image' ); } if ( $text == 'Featured Image') { return $translations->translate( 'Billboard Image' ); } } } // check for post type on media uploads if(basename($_SERVER['SCRIPT_FILENAME']) == 'media-upload.php'){ $pst = get_post($_GET['post_id']); $translations = &get_translations_for_domain( $domain); if($pst->post_type == 'ufcf_person'){ if($text == 'Use as featured image'){ return $translations->translate('Use as profile picture'); } }elseif($pst->post_type == 'page'){ if($text == 'Use as featured image'){ return $translations->translate('Use as billboard image'); } } } return $translation; }