diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/_enqueues/admin/user-profile.js | 10 | ||||
-rw-r--r-- | src/wp-admin/includes/file.php | 2 | ||||
-rw-r--r-- | src/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss | 6 | ||||
-rw-r--r-- | src/wp-content/themes/twentynineteen/style-rtl.css | 6 | ||||
-rw-r--r-- | src/wp-content/themes/twentynineteen/style.css | 6 | ||||
-rw-r--r-- | src/wp-includes/class-wp-image-editor-imagick.php | 2 | ||||
-rw-r--r-- | src/wp-includes/class-wp-oembed.php | 14 | ||||
-rw-r--r-- | src/wp-includes/comment-template.php | 5 | ||||
-rw-r--r-- | src/wp-includes/embed.php | 16 | ||||
-rw-r--r-- | src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php | 12 | ||||
-rw-r--r-- | src/wp-includes/user.php | 2 |
11 files changed, 59 insertions, 22 deletions
diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js index ad808d3131..ce680ef4c4 100644 --- a/src/js/_enqueues/admin/user-profile.js +++ b/src/js/_enqueues/admin/user-profile.js @@ -101,6 +101,8 @@ return; } $toggleButton = $pass1Row.find('.wp-hide-pw'); + + // Toggle between showing and hiding the password. $toggleButton.show().on( 'click', function () { if ( 'password' === $pass1.attr( 'type' ) ) { $pass1.attr( 'type', 'text' ); @@ -110,6 +112,14 @@ resetToggle( true ); } }); + + // Ensure the password input type is set to password when the form is submitted. + $pass1Row.closest( 'form' ).on( 'submit', function() { + if ( $pass1.attr( 'type' ) === 'text' ) { + $pass1.attr( 'type', 'password' ); + resetToggle( true ); + } + } ); } /** diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 40059273ba..0658662126 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -2622,7 +2622,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false, <?php if ( isset( $types['ssh'] ) ) { $hidden_class = ''; - if ( 'ssh' !== $connection_type || empty( $connection_type ) ) { + if ( 'ssh' !== $connection_type ) { $hidden_class = ' class="hidden"'; } ?> diff --git a/src/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss b/src/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss index d1e30256f3..6d6d744ed8 100644 --- a/src/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss +++ b/src/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss @@ -433,9 +433,13 @@ white-space: inherit; } + &:not(:has(.sub-menu.expanded-true)) { + overflow-y: scroll; + } + &.expanded-true { - display: table; + display: block; margin-top: 0; opacity: 1; padding-left: 0; diff --git a/src/wp-content/themes/twentynineteen/style-rtl.css b/src/wp-content/themes/twentynineteen/style-rtl.css index da1b3636c0..9f1700c012 100644 --- a/src/wp-content/themes/twentynineteen/style-rtl.css +++ b/src/wp-content/themes/twentynineteen/style-rtl.css @@ -3271,8 +3271,12 @@ body.page .main-navigation { white-space: inherit; } +.main-navigation .main-menu .menu-item-has-children.off-canvas .sub-menu:not(:has(.sub-menu.expanded-true)) { + overflow-y: scroll; +} + .main-navigation .main-menu .menu-item-has-children.off-canvas .sub-menu.expanded-true { - display: table; + display: block; margin-top: 0; opacity: 1; padding-right: 0; diff --git a/src/wp-content/themes/twentynineteen/style.css b/src/wp-content/themes/twentynineteen/style.css index 2124cf584f..634a947b3a 100644 --- a/src/wp-content/themes/twentynineteen/style.css +++ b/src/wp-content/themes/twentynineteen/style.css @@ -3271,8 +3271,12 @@ body.page .main-navigation { white-space: inherit; } +.main-navigation .main-menu .menu-item-has-children.off-canvas .sub-menu:not(:has(.sub-menu.expanded-true)) { + overflow-y: scroll; +} + .main-navigation .main-menu .menu-item-has-children.off-canvas .sub-menu.expanded-true { - display: table; + display: block; margin-top: 0; opacity: 1; padding-left: 0; diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php index 2e7c7039d5..f57e6f281f 100644 --- a/src/wp-includes/class-wp-image-editor-imagick.php +++ b/src/wp-includes/class-wp-image-editor-imagick.php @@ -305,7 +305,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { * image operations within the time of the HTTP request. * * @since 6.2.0 - * @since 6.3.0 This method was deprecated. + * @deprecated 6.3.0 No longer used in core. * * @return int|null The new limit on success, null on failure. */ diff --git a/src/wp-includes/class-wp-oembed.php b/src/wp-includes/class-wp-oembed.php index 2d59c2217d..43f95ed150 100644 --- a/src/wp-includes/class-wp-oembed.php +++ b/src/wp-includes/class-wp-oembed.php @@ -739,9 +739,9 @@ class WP_oEmbed { * * @since 2.9.0 * - * @param string $return The returned oEmbed HTML. - * @param object $data A data object result from an oEmbed provider. - * @param string $url The URL of the content to be embedded. + * @param string|false $return The returned oEmbed HTML, or false on failure. + * @param object $data A data object result from an oEmbed provider. + * @param string $url The URL of the content to be embedded. */ return apply_filters( 'oembed_dataparse', $return, $data, $url ); } @@ -752,10 +752,10 @@ class WP_oEmbed { * @since 2.9.0 as strip_scribd_newlines() * @since 3.0.0 * - * @param string $html Existing HTML. - * @param object $data Data object from WP_oEmbed::data2html() - * @param string $url The original URL passed to oEmbed. - * @return string Possibly modified $html + * @param string|false $html Existing HTML. + * @param object $data Data object from WP_oEmbed::data2html() + * @param string $url The original URL passed to oEmbed. + * @return string|false Possibly modified $html. */ public function _strip_newlines( $html, $data, $url ) { if ( ! str_contains( $html, "\n" ) ) { diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index cd41d4b200..f023c03cd0 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -2446,6 +2446,7 @@ function wp_list_comments( $args = array(), $comments = null ) { * @since 4.6.0 Introduced the 'action' argument. * @since 4.9.6 Introduced the 'cookies' default comment field. * @since 5.5.0 Introduced the 'class_container' argument. + * @since 6.8.2 Introduced the 'novalidate' argument. * * @param array $args { * Optional. Default arguments and form fields to override. @@ -2467,6 +2468,7 @@ function wp_list_comments( $args = array(), $comments = null ) { * Default 'Your email address will not be published.'. * @type string $comment_notes_after HTML element for a message displayed after the textarea field. * @type string $action The comment form element action attribute. Default '/wp-comments-post.php'. + * @type bool $novalidate Whether the novalidate attribute is added to the comment form. Default false. * @type string $id_form The comment form element id attribute. Default 'commentform'. * @type string $id_submit The comment submit element id attribute. Default 'submit'. * @type string $class_container The comment form container class attribute. Default 'comment-respond'. @@ -2646,6 +2648,7 @@ function comment_form( $args = array(), $post = null ) { ), 'comment_notes_after' => '', 'action' => site_url( '/wp-comments-post.php' ), + 'novalidate' => false, 'id_form' => 'commentform', 'id_submit' => 'submit', 'class_container' => 'comment-respond', @@ -2729,7 +2732,7 @@ function comment_form( $args = array(), $post = null ) { esc_url( $args['action'] ), esc_attr( $args['id_form'] ), esc_attr( $args['class_form'] ), - ( $html5 ? ' novalidate' : '' ) + ( $args['novalidate'] ? ' novalidate' : '' ) ); /** diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php index b5b30acead..a3c23be931 100644 --- a/src/wp-includes/embed.php +++ b/src/wp-includes/embed.php @@ -843,10 +843,10 @@ function _oembed_create_xml( $data, $node = null ) { * * @since 5.2.0 * - * @param string $result The oEmbed HTML result. - * @param object $data A data object result from an oEmbed provider. - * @param string $url The URL of the content to be embedded. - * @return string The filtered oEmbed result. + * @param string|false $result The oEmbed HTML result. + * @param object $data A data object result from an oEmbed provider. + * @param string $url The URL of the content to be embedded. + * @return string|false The filtered oEmbed result. */ function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) { if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) { @@ -910,10 +910,10 @@ function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) { * * @since 4.4.0 * - * @param string $result The oEmbed HTML result. - * @param object $data A data object result from an oEmbed provider. - * @param string $url The URL of the content to be embedded. - * @return string The filtered and sanitized oEmbed result. + * @param string|false $result The oEmbed HTML result. + * @param object $data A data object result from an oEmbed provider. + * @param string $url The URL of the content to be embedded. + * @return string|false The filtered and sanitized oEmbed result. */ function wp_filter_oembed_result( $result, $data, $url ) { if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) { diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php index 004f5851a2..66cf8785e4 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php @@ -147,6 +147,18 @@ class WP_REST_Settings_Controller extends WP_REST_Controller { $params = $request->get_params(); + if ( empty( $params ) || ! empty( array_diff_key( $params, $options ) ) ) { + $message = empty( $params ) + ? __( 'Request body cannot be empty.' ) + : __( 'Invalid parameter(s) provided.' ); + + return new WP_Error( + 'rest_invalid_param', + $message, + array( 'status' => 400 ) + ); + } + foreach ( $options as $name => $args ) { if ( ! array_key_exists( $name, $params ) ) { continue; diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 4dacf58628..ecd22ab38c 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -477,7 +477,7 @@ function wp_authenticate_application_password( */ do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password ); - if ( is_wp_error( $error ) && $error->has_errors() ) { + if ( $error->has_errors() ) { /** This action is documented in wp-includes/user.php */ do_action( 'application_password_failed_authentication', $error ); |