maybe_regenerate_attachment_metadata() is now wp_maybe_generate_attachment_metadata().
props kovshenin. fixes #26825. Built from https://develop.svn.wordpress.org/trunk@27441 git-svn-id: http://core.svn.wordpress.org/trunk@27288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eda85e17ca
commit
449ffedfb9
|
@ -2634,13 +2634,13 @@ function edit_form_image_editor( $post ) {
|
||||||
<?php
|
<?php
|
||||||
elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'audio/' ) ):
|
elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'audio/' ) ):
|
||||||
|
|
||||||
maybe_regenerate_attachment_metadata( $post );
|
wp_maybe_generate_attachment_metadata( $post );
|
||||||
|
|
||||||
echo wp_audio_shortcode( array( 'src' => $att_url ) );
|
echo wp_audio_shortcode( array( 'src' => $att_url ) );
|
||||||
|
|
||||||
elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'video/' ) ):
|
elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'video/' ) ):
|
||||||
|
|
||||||
maybe_regenerate_attachment_metadata( $post );
|
wp_maybe_generate_attachment_metadata( $post );
|
||||||
|
|
||||||
$meta = wp_get_attachment_metadata( $attachment_id );
|
$meta = wp_get_attachment_metadata( $attachment_id );
|
||||||
$w = ! empty( $meta['width'] ) ? min( $meta['width'], 640 ) : 0;
|
$w = ! empty( $meta['width'] ) ? min( $meta['width'], 640 ) : 0;
|
||||||
|
|
Loading…
Reference in New Issue