I want to change the wording in the Default thumbnail metabox to ‘Set default thumbnail’ instead of ‘Set featured image’. How can I do this?
2 Answers
This is usually what I go with:
/** Use "Featured Image" Box As A Custom Box **/
function customposttype_image_box() {
remove_meta_box('postimagediv', 'page', 'side');
add_meta_box('postimagediv', __('Set Dat Image'), 'post_thumbnail_meta_box', 'page', 'side');
}
add_action('do_meta_boxes', 'customposttype_image_box');
/** Change "Featured Image" box Link Text **/
function custom_admin_post_thumbnail_html( $content ) {
global $post;
if($post->post_type == 'page')
{
$content = str_replace( __( 'Set featured image' ), __( 'Upload dat Image' ), $content);
$content = str_replace( __( 'Remove featured image' ), __( 'Remove dat image' ), $content);
}
return $content;
}
add_filter( 'admin_post_thumbnail_html', 'custom_admin_post_thumbnail_html' );