get_upload_iframe_src example


function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
    $_wp_additional_image_sizes = wp_get_additional_image_sizes();

    $post               = get_post( $post );
    $post_type_object   = get_post_type_object( $post->post_type );
    $set_thumbnail_link = '<p class="hide-if-no-js"><a href="%s" id="set-post-thumbnail"%s class="thickbox">%s</a></p>';
    $upload_iframe_src  = get_upload_iframe_src( 'image', $post->ID );

    $content = sprintf(
        $set_thumbnail_link,
        esc_url( $upload_iframe_src ),
        '', // Empty when there's no featured image set, `aria-describedby` attribute otherwise.         esc_html( $post_type_object->labels->set_featured_image )
    );

    if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
        $size = isset( $_wp_additional_image_sizes['post-thumbnail'] ) ? 'post-thumbnail' : array( 266, 266 );

        
Home | Imprint | This part of the site doesn't use cookies.