get_post_embed_url example


function get_post_embed_html( $width$height$post = null ) {
    $post = get_post( $post );

    if ( ! $post ) {
        return false;
    }

    $embed_url = get_post_embed_url( $post );

    $secret     = wp_generate_password( 10, false );
    $embed_url .= "#?secret={$secret}";

    $output = sprintf(
        '<blockquote class="wp-embedded-content" data-secret="%1$s"><a href="%2$s">%3$s</a></blockquote>',
        esc_attr( $secret ),
        esc_url( get_permalink( $post ) ),
        get_the_title( $post )
    );

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