Change wording of default thumbnail metabox

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?

Related posts

2 comments

  1. 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' );
    
  2. Use media_view_strings to filter the default text.

    Use the below in the active theme’s function.php file

    add_filter( 'media_view_strings', function( $strings ) {
       $strings['setFeaturedImageTitle'] = __( 'Set default thumbnail' );
       $strings['setFeaturedImage']    = __( 'Set default thumbnail' );
    
       return $strings;
    });
    

    Found in WordPress/wp-includes/media.php

Comments are closed.