Anyone know of a way to change the title of the core Wordpress metaboxes on a post edit screen? I'm trying to alter the title of the "Featured Image" metabox and have found a way to edit the contents (via *admin_post_thumbnail_html*) but not the title itself.
3 Answers
The "Right way" to do this is hooking to the 'add_meta_boxes' action, like so:
add_action('add_meta_boxes', 'my_metabox_titles', 10, 2);
function my_metabox_titles($post_type, $post) {
global $wp_meta_boxes; // array of defined metaboxes
// cycle through the array, change the titles you want
}
If, like me, you like things to work without js, you can provide your own text for ALL translateable text.
Basically create translations for the text you want to change. Non-english speakers do it all the time - it's not that hard.
you can change it by filtered words like it :
<?php
add_filter('gettext', 'mw_translate_words_array');
add_filter('ngettext', 'mw_translate_words_array');
function mw_translate_words_array( $translated ) {
$words = array(
'old name' = > 'new name' ,
);
$translated = str_ireplace( array_keys($words), $words, $translated );
return $translated;
}
?>