Embeds: In `get_post_embed_html()`, move the optional `$post` argument after the required `$width` and `$height`.
Props swissspidy. Fixes #34523. Built from https://develop.svn.wordpress.org/trunk@35472 git-svn-id: http://core.svn.wordpress.org/trunk@35436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0b845e0364
commit
74969ca0d3
|
@ -446,12 +446,12 @@ function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) {
|
|||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param int|WP_Post $post Optional. Post ID or object. Default is global `$post`.
|
||||
* @param int $width The width for the response.
|
||||
* @param int $height The height for the response.
|
||||
* @param int|WP_Post $post Optional. Post ID or object. Default is global `$post`.
|
||||
* @return string|false Embed code on success, false if post doesn't exist.
|
||||
*/
|
||||
function get_post_embed_html( $post = null, $width, $height ) {
|
||||
function get_post_embed_html( $width, $height, $post = null ) {
|
||||
$post = get_post( $post );
|
||||
|
||||
if ( ! $post ) {
|
||||
|
@ -590,7 +590,7 @@ function get_oembed_response_data_rich( $data, $post, $width, $height ) {
|
|||
$data['width'] = absint( $width );
|
||||
$data['height'] = absint( $height );
|
||||
$data['type'] = 'rich';
|
||||
$data['html'] = get_post_embed_html( $post, $width, $height );
|
||||
$data['html'] = get_post_embed_html( $width, $height, $post );
|
||||
|
||||
// Add post thumbnail to response if available.
|
||||
$thumbnail_id = false;
|
||||
|
|
|
@ -184,7 +184,7 @@ if ( have_posts() ) :
|
|||
</p>
|
||||
</div>
|
||||
<div id="wp-embed-share-tab-html" class="wp-embed-share-tab" role="tabpanel" aria-labelledby="wp-embed-share-tab-button-html" aria-hidden="true">
|
||||
<textarea class="wp-embed-share-input" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( null, 600, 400 ) ); ?></textarea>
|
||||
<textarea class="wp-embed-share-input" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( 600, 400 ) ); ?></textarea>
|
||||
|
||||
<p class="wp-embed-share-description">
|
||||
<?php _e( 'Copy and paste this code into your site to embed' ); ?>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-beta2-35471';
|
||||
$wp_version = '4.4-beta2-35472';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue