summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/media.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wp-admin/includes/media.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index e7b4c10..3de25dc 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -527,12 +527,14 @@ function media_handle_sideload( $file_array, $post_id = 0, $desc = null, $post_d
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
- * @global int $body_id
+ * @global string $body_id
*
* @param callable $content_func Function that outputs the content.
* @param mixed ...$args Optional additional parameters to pass to the callback function when it's called.
*/
function wp_iframe( $content_func, ...$args ) {
+ global $body_id;
+
_wp_admin_html_begin();
?>
<title><?php bloginfo( 'name' ); ?> &rsaquo; <?php _e( 'Uploads' ); ?> &#8212; <?php _e( 'WordPress' ); ?></title>
@@ -603,8 +605,8 @@ function wp_iframe( $content_func, ...$args ) {
$body_id_attr = '';
- if ( isset( $GLOBALS['body_id'] ) ) {
- $body_id_attr = ' id="' . $GLOBALS['body_id'] . '"';
+ if ( isset( $body_id ) ) {
+ $body_id_attr = ' id="' . $body_id . '"';
}
?>
@@ -2196,6 +2198,11 @@ function media_upload_form( $errors = null ) {
$plupload_init['webp_upload_error'] = true;
}
+ // Check if AVIF images can be edited.
+ if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/avif' ) ) ) {
+ $plupload_init['avif_upload_error'] = true;
+ }
+
/**
* Filters the default Plupload settings.
*
@@ -2825,7 +2832,7 @@ function media_upload_library_form( $errors ) {
'format' => '',
'prev_text' => __( '&laquo;' ),
'next_text' => __( '&raquo;' ),
- 'total' => ceil( $wp_query->found_posts / 10 ),
+ 'total' => (int) ceil( $wp_query->found_posts / 10 ),
'current' => $q['paged'],
)
);