diff options
Diffstat (limited to 'src')
31 files changed, 204 insertions, 72 deletions
diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index 4bb5995e7f..27801f3695 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -986,6 +986,8 @@ final class WP_Screen { /** * @global array $wp_meta_boxes Global meta box state. * + * @since 3.3.0 + * * @return bool */ public function show_screen_options() { diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index d641d10386..d5a430d25a 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -1022,18 +1022,21 @@ class WP_Upgrader { } $file = $wp_filesystem->abspath() . '.maintenance'; + if ( $enable ) { if ( ! wp_doing_cron() ) { $this->skin->feedback( 'maintenance_start' ); } + // Create maintenance file to signal that we are upgrading. $maintenance_string = '<?php $upgrading = ' . time() . '; ?>'; $wp_filesystem->delete( $file ); $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE ); - } elseif ( ! $enable && $wp_filesystem->exists( $file ) ) { + } elseif ( $wp_filesystem->exists( $file ) ) { if ( ! wp_doing_cron() ) { $this->skin->feedback( 'maintenance_end' ); } + $wp_filesystem->delete( $file ); } } diff --git a/src/wp-admin/includes/comment.php b/src/wp-admin/includes/comment.php index ffec90c81e..ad8b653161 100644 --- a/src/wp-admin/includes/comment.php +++ b/src/wp-admin/includes/comment.php @@ -210,6 +210,8 @@ function enqueue_comment_hotkeys_js() { /** * Displays error message at bottom of comments. * + * @since 2.5.0 + * * @param string $msg Error Message. Assumed to contain HTML and be sanitized. */ function comment_footer_die( $msg ) { diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index f42c247fb2..23b3f6544e 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -1059,6 +1059,8 @@ function admin_color_scheme_picker( $user_id ) { /** * * @global array $_wp_admin_css_colors + * + * @since 3.8.0 */ function wp_color_scheme_settings() { global $_wp_admin_css_colors; diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index fc5f54a7f4..10ed2e2769 100644 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -854,6 +854,8 @@ var tb_pathToImage = "<?php echo esc_js( includes_url( 'js/thickbox/loadingAnima } /** + * @since 3.0.0 + * * @param array $users * @return bool */ diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php index 011895f06c..6c15a4d99f 100644 --- a/src/wp-admin/includes/schema.php +++ b/src/wp-admin/includes/schema.php @@ -446,7 +446,7 @@ function populate_options( array $options = array() ) { 'moderation_keys' => '', 'active_plugins' => array(), 'category_base' => '', - 'ping_sites' => 'http://rpc.pingomatic.com/', + 'ping_sites' => 'https://rpc.pingomatic.com/', 'comment_max_links' => 2, 'gmt_offset' => $gmt_offset, diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 16da3388ae..43e3442b00 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -2632,6 +2632,8 @@ function get_submit_button( $text = '', $type = 'primary large', $name = 'submit * Prints out the beginning of the admin HTML header. * * @global bool $is_IE + * + * @since 3.3.0 */ function _wp_admin_html_begin() { global $is_IE; diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index a3c7260a04..9b91ef5762 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -881,6 +881,11 @@ function upgrade_all() { if ( $wp_current_db_version < 58975 ) { upgrade_670(); } + + if ( $wp_current_db_version < 60421 ) { + upgrade_682(); + } + maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -2439,6 +2444,42 @@ function upgrade_670() { wp_set_options_autoload( $options, false ); } } + +/** + * Executes changes made in WordPress 6.8.2. + * + * @ignore + * @since 6.8.2 + * + * @global int $wp_current_db_version The old (current) database version. + */ +function upgrade_682() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 60421 ) { + // Upgrade Ping-O-Matic and Twingly to use HTTPS. + $ping_sites_value = get_option( 'ping_sites' ); + $ping_sites_value = explode( "\n", $ping_sites_value ); + $ping_sites_value = array_map( + function ( $url ) { + $url = trim( $url ); + $url = sanitize_url( $url ); + if ( + str_ends_with( trailingslashit( $url ), '://rpc.pingomatic.com/' ) + || str_ends_with( trailingslashit( $url ), '://rpc.twingly.com/' ) + ) { + $url = set_url_scheme( $url, 'https' ); + } + return $url; + }, + $ping_sites_value + ); + $ping_sites_value = array_filter( $ping_sites_value ); + $ping_sites_value = implode( "\n", $ping_sites_value ); + update_option( 'ping_sites', $ping_sites_value ); + } +} + /** * Executes network-level upgrade routines. * diff --git a/src/wp-admin/network/site-new.php b/src/wp-admin/network/site-new.php index a3b0919155..d1b0576113 100644 --- a/src/wp-admin/network/site-new.php +++ b/src/wp-admin/network/site-new.php @@ -204,7 +204,7 @@ if ( ! empty( $messages ) ) { } ?> <p><?php echo wp_required_field_message(); ?></p> -<form method="post" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate"> +<form method="post" enctype="multipart/form-data" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate"> <?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?> <table class="form-table" role="presentation"> <tr class="form-field form-required"> diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index 2a4dae4470..22bc3fc58c 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -708,6 +708,16 @@ endif; */ function twentyseventeen_should_show_featured_image() { $show_featured_image = ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ); + + /** + * Filters whether to show the Twenty Seventeen featured image below the header. + * + * By default, the image is displayed on single posts and pages, unless the page is the front page. + * + * @since Twenty Seventeen 3.7 + * + * @param bool $show_featured_image Whether to display the featured image below the header. + */ return apply_filters( 'twentyseventeen_should_show_featured_image', $show_featured_image ); } diff --git a/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php index eea60e6c7c..e46faed322 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php @@ -42,6 +42,7 @@ </header><!-- .entry-header --> <?php + /** This filter is documented in wp-includes/post-template.php */ $content = apply_filters( 'the_content', get_the_content() ); $audio = false; diff --git a/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php index fd7865db92..bd97550b00 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php @@ -42,6 +42,7 @@ </header><!-- .entry-header --> <?php + /** This filter is documented in wp-includes/post-template.php */ $content = apply_filters( 'the_content', get_the_content() ); $video = false; diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index 96945243fa..a3ca940c4d 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -361,7 +361,11 @@ if ( ! function_exists( 'wp_body_open' ) ) { * @since Twenty Twenty 1.0 */ function wp_body_open() { - /** This action is documented in wp-includes/general-template.php */ + /** + * Triggered after the opening <body> tag. + * + * @since Twenty Twenty 1.0 + */ do_action( 'wp_body_open' ); } } diff --git a/src/wp-content/themes/twentytwentyfive/functions.php b/src/wp-content/themes/twentytwentyfive/functions.php index ddb42a89f2..3805c48052 100644 --- a/src/wp-content/themes/twentytwentyfive/functions.php +++ b/src/wp-content/themes/twentytwentyfive/functions.php @@ -34,7 +34,7 @@ if ( ! function_exists( 'twentytwentyfive_editor_style' ) ) : * @return void */ function twentytwentyfive_editor_style() { - add_editor_style( get_parent_theme_file_uri( 'assets/css/editor-style.css' ) ); + add_editor_style( 'assets/css/editor-style.css' ); } endif; add_action( 'after_setup_theme', 'twentytwentyfive_editor_style' ); diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 3d18b37b83..56410779fe 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -2408,8 +2408,27 @@ function do_blocks( $content ) { $top_level_block_count = count( $blocks ); $output = ''; + /** + * Parsed blocks consist of a list of top-level blocks. Those top-level + * blocks may themselves contain nested inner blocks. However, every + * top-level block is rendered independently, meaning there are no data + * dependencies between them. + * + * Ideally, therefore, the parser would only need to parse one complete + * top-level block at a time, render it, and move on. Unfortunately, this + * is not possible with {@see \parse_blocks()} because it must parse the + * entire given document at once. + * + * While the current implementation prevents this optimization, it’s still + * possible to reduce the peak memory use when calls to `render_block()` + * on those top-level blocks are memory-heavy (which many of them are). + * By setting each parsed block to `NULL` after rendering it, any memory + * allocated during the render will be freed and reused for the next block. + * Before making this change, that memory was retained and would lead to + * out-of-memory crashes for certain posts that now run with this change. + */ for ( $i = 0; $i < $top_level_block_count; $i++ ) { - $output .= render_block( $blocks[ $i ] ); + $output .= render_block( $blocks[ $i ] ); $blocks[ $i ] = null; } diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 51c88ef5fc..0d41d4a09b 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -3165,27 +3165,25 @@ final class WP_Customize_Manager { return; } - if ( $changeset_post_id ) { - if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) { - wp_send_json_error( - array( - 'code' => 'changeset_trash_unauthorized', - 'message' => __( 'Unable to trash changes.' ), - ) - ); - } + if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) { + wp_send_json_error( + array( + 'code' => 'changeset_trash_unauthorized', + 'message' => __( 'Unable to trash changes.' ), + ) + ); + } - $lock_user = (int) wp_check_post_lock( $changeset_post_id ); + $lock_user = (int) wp_check_post_lock( $changeset_post_id ); - if ( $lock_user && get_current_user_id() !== $lock_user ) { - wp_send_json_error( - array( - 'code' => 'changeset_locked', - 'message' => __( 'Changeset is being edited by other user.' ), - 'lockUser' => $this->get_lock_user_data( $lock_user ), - ) - ); - } + if ( $lock_user && get_current_user_id() !== $lock_user ) { + wp_send_json_error( + array( + 'code' => 'changeset_locked', + 'message' => __( 'Changeset is being edited by other user.' ), + 'lockUser' => $this->get_lock_user_data( $lock_user ), + ) + ); } if ( 'trash' === get_post_status( $changeset_post_id ) ) { diff --git a/src/wp-includes/class-wp-phpmailer.php b/src/wp-includes/class-wp-phpmailer.php index ce71eec458..cc21e6b88c 100644 --- a/src/wp-includes/class-wp-phpmailer.php +++ b/src/wp-includes/class-wp-phpmailer.php @@ -48,7 +48,7 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer { 'php.ini' ), 'connect_host' => __( 'SMTP Error: Could not connect to SMTP host.' ), - 'data_not_accepted' => __( 'SMTP Error: data not accepted.' ), + 'data_not_accepted' => __( 'SMTP Error: Data not accepted.' ), 'empty_message' => __( 'Message body empty' ), /* translators: There is a space after the colon. */ 'encoding' => __( 'Unknown encoding: ' ), diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index f3f015ccd3..588aeaa89e 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -2781,6 +2781,7 @@ class WP_Theme_JSON { if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'] ) ) { foreach ( $theme_json['styles']['blocks'][ $name ]['elements'] as $element => $node ) { $node_path = array( 'styles', 'blocks', $name, 'elements', $element ); + if ( $include_node_paths_only ) { $nodes[] = array( 'path' => $node_path, @@ -2798,12 +2799,6 @@ class WP_Theme_JSON { foreach ( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $element ] as $pseudo_selector ) { if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'][ $element ][ $pseudo_selector ] ) ) { $node_path = array( 'styles', 'blocks', $name, 'elements', $element ); - if ( $include_node_paths_only ) { - $nodes[] = array( - 'path' => $node_path, - ); - continue; - } $nodes[] = array( 'path' => $node_path, diff --git a/src/wp-includes/class-wp-user-meta-session-tokens.php b/src/wp-includes/class-wp-user-meta-session-tokens.php index d2e27265de..ecbb23d4e8 100644 --- a/src/wp-includes/class-wp-user-meta-session-tokens.php +++ b/src/wp-includes/class-wp-user-meta-session-tokens.php @@ -37,6 +37,8 @@ class WP_User_Meta_Session_Tokens extends WP_Session_Tokens { /** * Converts an expiration to an array of session information. * + * @since 4.0.0 + * * @param mixed $session Session or expiration. * @return array Session. */ diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index f74249c81b..59f89f3a84 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -834,12 +834,8 @@ function get_comment_link( $comment = null, $args = array() ) { if ( $cpage && get_option( 'page_comments' ) ) { if ( $wp_rewrite->using_permalinks() ) { - if ( $cpage ) { - $comment_link = trailingslashit( $comment_link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage; - } - - $comment_link = user_trailingslashit( $comment_link, 'comment' ); - } elseif ( $cpage ) { + $comment_link = trailingslashit( $comment_link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage; + } else { $comment_link = add_query_arg( 'cpage', $cpage, $comment_link ); } } diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 9bd6fb2171..aabe9f60db 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -3060,22 +3060,19 @@ function do_trackbacks( $post ) { $post_title = apply_filters( 'the_title', $post->post_title, $post->ID ); $post_title = strip_tags( $post_title ); - if ( $to_ping ) { - foreach ( (array) $to_ping as $tb_ping ) { - $tb_ping = trim( $tb_ping ); - if ( ! in_array( $tb_ping, $pinged, true ) ) { - trackback( $tb_ping, $post_title, $excerpt, $post->ID ); - $pinged[] = $tb_ping; - } else { - $wpdb->query( - $wpdb->prepare( - "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, - '')) WHERE ID = %d", - $tb_ping, - $post->ID - ) - ); - } + foreach ( (array) $to_ping as $tb_ping ) { + $tb_ping = trim( $tb_ping ); + if ( ! in_array( $tb_ping, $pinged, true ) ) { + trackback( $tb_ping, $post_title, $excerpt, $post->ID ); + $pinged[] = $tb_ping; + } else { + $wpdb->query( + $wpdb->prepare( + "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", + $tb_ping, + $post->ID + ) + ); } } } diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php index a3c23be931..c38a079003 100644 --- a/src/wp-includes/embed.php +++ b/src/wp-includes/embed.php @@ -765,7 +765,7 @@ function wp_oembed_ensure_format( $format ) { * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`. * @param WP_REST_Request $request Request used to generate the response. * @param WP_REST_Server $server Server instance. - * @return true + * @return bool True if the request was served, false otherwise. */ function _oembed_rest_pre_serve_request( $served, $result, $request, $server ) { $params = $request->get_params(); diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 4033571edf..234d71a2a1 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -2035,7 +2035,17 @@ function sanitize_file_name( $filename ) { } if ( $utf8_pcre ) { - $filename = preg_replace( "#\x{00a0}#siu", ' ', $filename ); + /** + * Replace all whitespace characters with a basic space (U+0020). + * + * The “Zs” in the pattern selects characters in the `Space_Separator` + * category, which is what Unicode considers space characters. + * + * @see https://www.unicode.org/reports/tr44/#General_Category_Values + * @see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-6/#G17548 + * @see https://www.php.net/manual/en/regexp.reference.unicode.php + */ + $filename = preg_replace( '#\p{Zs}#siu', ' ', $filename ); } /** diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 33b775e718..640f4b6343 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -5198,6 +5198,8 @@ function _wp_array_set( &$input_array, $path, $value = null ) { * Changes to this function should follow updates in the client * with the same logic. * + * @since 5.8.0 + * * @link https://github.com/lodash/lodash/blob/4.17/dist/lodash.js#L14369 * @link https://github.com/lodash/lodash/blob/4.17/dist/lodash.js#L278 * @link https://github.com/lodash-php/lodash-php/blob/master/src/String/kebabCase.php diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php index 590cf967cf..999892758b 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php @@ -92,6 +92,8 @@ final class WP_Interactivity_API_Directives_Processor extends WP_HTML_Tag_Proces * It positions the cursor in the closer tag of the balanced template tag, * if it exists. * + * @since 6.5.0 + * * @access private * * @param string $new_content The string to append after the closing template tag. diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index 38330b2cd0..fdde5d429a 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -744,6 +744,8 @@ final class WP_Interactivity_API { /** * Transforms a kebab-case string to camelCase. * + * @since 6.5.0 + * * @param string $str The kebab-case string to transform to camelCase. * @return string The transformed camelCase string. */ diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index ebb4a761b1..28bbce222a 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -2083,18 +2083,38 @@ function wp_kses_normalize_entities3( $matches ) { /** * Determines if a Unicode codepoint is valid. * + * The definition of a valid Unicode codepoint is taken from the XML definition: + * + * > Characters + * > + * > … + * > Legal characters are tab, carriage return, line feed, and the legal characters of + * > Unicode and ISO/IEC 10646. + * > … + * > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + * * @since 2.7.0 * + * @see https://www.w3.org/TR/xml/#charsets + * * @param int $i Unicode codepoint. * @return bool Whether or not the codepoint is a valid Unicode codepoint. */ function valid_unicode( $i ) { $i = (int) $i; - return ( 0x9 === $i || 0xa === $i || 0xd === $i || - ( 0x20 <= $i && $i <= 0xd7ff ) || - ( 0xe000 <= $i && $i <= 0xfffd ) || - ( 0x10000 <= $i && $i <= 0x10ffff ) + return ( + 0x9 === $i || // U+0009 HORIZONTAL TABULATION (HT) + 0xA === $i || // U+000A LINE FEED (LF) + 0xD === $i || // U+000D CARRIAGE RETURN (CR) + /* + * The valid Unicode characters according to the XML specification: + * + * > any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + */ + ( 0x20 <= $i && $i <= 0xD7FF ) || + ( 0xE000 <= $i && $i <= 0xFFFD ) || + ( 0x10000 <= $i && $i <= 0x10FFFF ) ); } diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 5d95b0a188..e6c1098277 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -1070,7 +1070,6 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f list( $src, $width, $height ) = $image; $attachment = get_post( $attachment_id ); - $hwstring = image_hwstring( $width, $height ); $size_class = $size; if ( is_array( $size_class ) ) { @@ -1090,15 +1089,14 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f * * @param string $context The context. Default 'wp_get_attachment_image'. */ - $context = apply_filters( 'wp_get_attachment_image_context', 'wp_get_attachment_image' ); - $attr = wp_parse_args( $attr, $default_attr ); + $context = apply_filters( 'wp_get_attachment_image_context', 'wp_get_attachment_image' ); + $attr = wp_parse_args( $attr, $default_attr ); + $attr['width'] = $width; + $attr['height'] = $height; - $loading_attr = $attr; - $loading_attr['width'] = $width; - $loading_attr['height'] = $height; $loading_optimization_attr = wp_get_loading_optimization_attributes( 'img', - $loading_attr, + $attr, $context ); @@ -1169,8 +1167,16 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f */ $attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, $attachment, $size ); - $attr = array_map( 'esc_attr', $attr ); - $html = rtrim( "<img $hwstring" ); + if ( isset( $attr['height'] ) && is_numeric( $attr['height'] ) ) { + $height = absint( $attr['height'] ); + } + if ( isset( $attr['width'] ) && is_numeric( $attr['width'] ) ) { + $width = absint( $attr['width'] ); + } + unset( $attr['height'], $attr['width'] ); + $attr = array_map( 'esc_attr', $attr ); + $hwstring = image_hwstring( $width, $height ); + $html = rtrim( "<img $hwstring" ); foreach ( $attr as $name => $value ) { $html .= " $name=" . '"' . $value . '"'; @@ -5559,6 +5565,8 @@ function wpview_media_sandbox_styles() { /** * Registers the personal data exporter for media. * + * @since 4.9.6 + * * @param array[] $exporters An array of personal data exporters, keyed by their ID. * @return array[] Updated array of personal data exporters. */ diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php index b0ac65a647..767917d6f6 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php @@ -802,7 +802,16 @@ class WP_REST_Application_Passwords_Controller extends WP_REST_Controller { 'app_id' => array( 'description' => __( 'A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.' ), 'type' => 'string', - 'format' => 'uuid', + 'oneOf' => array( + array( + 'type' => 'string', + 'format' => 'uuid', + ), + array( + 'type' => 'string', + 'enum' => array( '' ), + ), + ), 'context' => array( 'view', 'edit', 'embed' ), ), 'name' => array( diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index cd2c06e4cc..3beddac135 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -2182,6 +2182,8 @@ function print_footer_scripts() { /** * Prints scripts (internal use only) * + * @since 2.8.0 + * * @ignore * * @global WP_Scripts $wp_scripts diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 3b43518692..6eca1068aa 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -23,14 +23,14 @@ $wp_version = '6.9-alpha-60093-src'; * * @global int $wp_db_version */ -$wp_db_version = 58975; +$wp_db_version = 60421; /** * Holds the TinyMCE version. * * @global string $tinymce_version */ -$tinymce_version = '49110-20201110'; +$tinymce_version = '49110-20250317'; /** * Holds the minimum required PHP version. |