Skip to content

Commit 3f7f227

Browse files
committed
Merge branch 'trunk' into html-api/auto-escape-javascript-json
2 parents 8246439 + 44f1517 commit 3f7f227

28 files changed

+167
-70
lines changed

src/wp-admin/includes/class-wp-upgrader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ public function install_package( $args = array() ) {
590590
* Filters the source file location for the upgrade package.
591591
*
592592
* @since 2.8.0
593-
* @since 4.4.0 The $hook_extra parameter became available.
593+
* @since 4.4.0 The `$hook_extra` parameter became available.
594594
*
595595
* @param string $source File source location.
596596
* @param string $remote_source Remote file source location.

src/wp-admin/includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,7 @@ function _admin_notice_post_locked() {
18941894
* Fires inside the post locked dialog before the buttons are displayed.
18951895
*
18961896
* @since 3.6.0
1897-
* @since 5.4.0 The $user parameter was added.
1897+
* @since 5.4.0 The `$user` parameter was added.
18981898
*
18991899
* @param WP_Post $post Post object.
19001900
* @param WP_User $user The user with the lock for the post.

src/wp-includes/abilities-api/class-wp-ability.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,15 @@ protected function prepare_properties( array $args ): array {
277277
);
278278
}
279279

280-
if ( empty( $args['execute_callback'] ) || ! is_callable( $args['execute_callback'] ) ) {
280+
// If we are not overriding `ability_class` parameter during instantiation, then we need to validate the execute_callback.
281+
if ( get_class( $this ) === self::class && ( empty( $args['execute_callback'] ) || ! is_callable( $args['execute_callback'] ) ) ) {
281282
throw new InvalidArgumentException(
282283
__( 'The ability properties must contain a valid `execute_callback` function.' )
283284
);
284285
}
285286

286-
if ( empty( $args['permission_callback'] ) || ! is_callable( $args['permission_callback'] ) ) {
287+
// If we are not overriding `ability_class` parameter during instantiation, then we need to validate the permission_callback.
288+
if ( get_class( $this ) === self::class && ( empty( $args['permission_callback'] ) || ! is_callable( $args['permission_callback'] ) ) ) {
287289
throw new InvalidArgumentException(
288290
__( 'The ability properties must provide a valid `permission_callback` function.' )
289291
);

src/wp-includes/class-wp-customize-setting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public function value() {
765765
* functions for available hooks.
766766
*
767767
* @since 3.4.0
768-
* @since 4.6.0 Added the `$this` setting instance as the second parameter.
768+
* @since 4.6.0 Added the `$setting` instance as the second parameter.
769769
*
770770
* @param mixed $default_value The setting default value. Default empty.
771771
* @param WP_Customize_Setting $setting The setting instance.

src/wp-includes/class-wp-image-editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public function set_quality( $quality = null, $dims = array() ) {
255255
* The WP_Image_Editor::set_quality() method has priority over the filter.
256256
*
257257
* @since 3.5.0
258-
* @since 6.8.0 Added the size parameter.
258+
* @since 6.8.0 Added the `$size` parameter.
259259
*
260260
* @param int $quality Quality level between 1 (low) and 100 (high).
261261
* @param string $mime_type Image mime type.

src/wp-includes/class-wp-query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,8 +1900,8 @@ public function get_posts() {
19001900
* Fires after the query variable object is created, but before the actual query is run.
19011901
*
19021902
* Note: If using conditional tags, use the method versions within the passed instance
1903-
* (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions
1904-
* like is_main_query() test against the global $wp_query instance, not the passed one.
1903+
* (e.g. `$query->is_main_query()` instead of `is_main_query()`). This is because the functions
1904+
* like `is_main_query()` test against the global `$wp_query` instance, not the passed one.
19051905
*
19061906
* @since 2.0.0
19071907
*

src/wp-includes/class-wp-styles.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,15 @@ class WP_Styles extends WP_Dependencies {
118118
*/
119119
public function __construct() {
120120
if (
121-
function_exists( 'is_admin' ) && ! is_admin()
122-
&&
123-
function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' )
121+
(
122+
function_exists( 'is_admin' ) &&
123+
! is_admin()
124+
)
125+
&&
126+
(
127+
function_exists( 'current_theme_supports' ) &&
128+
! current_theme_supports( 'html5', 'style' )
129+
)
124130
) {
125131
$this->type_attr = " type='text/css'";
126132
}

src/wp-includes/class-wp-user-query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ public function query() {
851851
* Filters SELECT FOUND_ROWS() query for the current WP_User_Query instance.
852852
*
853853
* @since 3.2.0
854-
* @since 5.1.0 Added the `$this` parameter.
854+
* @since 5.1.0 Added the `$query` parameter.
855855
*
856856
* @global wpdb $wpdb WordPress database abstraction object.
857857
*

src/wp-includes/class-wp-user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public function set_role( $role ) {
654654
* Fires after the user's role has changed.
655655
*
656656
* @since 2.9.0
657-
* @since 3.6.0 Added $old_roles to include an array of the user's previous roles.
657+
* @since 3.6.0 Added `$old_roles` to include an array of the user's previous roles.
658658
*
659659
* @param int $user_id The user ID.
660660
* @param string $role The new role.

src/wp-includes/comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ function wp_set_comment_cookies( $comment, $user, $cookies_consent = true ) {
598598
* Filters the lifetime of the comment cookie in seconds.
599599
*
600600
* @since 2.8.0
601-
* @since 6.6.0 The default $seconds value changed from 30000000 to YEAR_IN_SECONDS.
601+
* @since 6.6.0 The default `$seconds` value changed from 30000000 to YEAR_IN_SECONDS.
602602
*
603603
* @param int $seconds Comment cookie lifetime. Default YEAR_IN_SECONDS.
604604
*/

0 commit comments

Comments
 (0)