-
-
Save bhubbard/8328676 to your computer and use it in GitHub Desktop.
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 characters
/* | |
* 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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment