Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save radovanx/e764db0f6c666c59c193cad0fcfefc8c to your computer and use it in GitHub Desktop.

Select an option

Save radovanx/e764db0f6c666c59c193cad0fcfefc8c to your computer and use it in GitHub Desktop.

Revisions

  1. @mbijon mbijon renamed this gist Oct 10, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @mbijon mbijon created this gist Oct 10, 2013.
    21 changes: 21 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    /*
    * Customize the Featured Image metabox w/ info-text
    *
    */
    function mim_remove_featuredimage_metabox() {
    remove_meta_box( 'postimagediv', 'inspire', 'side' );
    }
    add_action( 'admin_head', 'mim_remove_featuredimage_metabox' );

    function mim_custom_featuredimage_metabox( $post ) {

    $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );

    echo "Upload an image that is at least 365px-wide by 120px-tall. Larger images will be auto-cropped.";
    echo _wp_post_thumbnail_html( $thumbnail_id, $post->ID );

    }
    function mim_add_featuredimage_metabox() {
    add_meta_box( 'postimagediv', __( 'Featured Image' ), 'mim_custom_featuredimage_metabox', 'inspire', 'side', 'default' );
    }
    add_action( 'admin_head', 'mim_add_featuredimage_metabox' );