Skip to content

Commit 696f180

Browse files
committed
Merge branch 'trunk' into 62622-php-74
2 parents 77ffa57 + c660027 commit 696f180

19 files changed

Lines changed: 147 additions & 62 deletions

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,8 @@ public function render_screen_meta() {
986986
/**
987987
* @global array $wp_meta_boxes Global meta box state.
988988
*
989+
* @since 3.3.0
990+
*
989991
* @return bool
990992
*/
991993
public function show_screen_options() {

src/wp-admin/includes/comment.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ function enqueue_comment_hotkeys_js() {
210210
/**
211211
* Displays error message at bottom of comments.
212212
*
213+
* @since 2.5.0
214+
*
213215
* @param string $msg Error Message. Assumed to contain HTML and be sanitized.
214216
*/
215217
function comment_footer_die( $msg ) {

src/wp-admin/includes/misc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,8 @@ function admin_color_scheme_picker( $user_id ) {
10591059
/**
10601060
*
10611061
* @global array $_wp_admin_css_colors
1062+
*
1063+
* @since 3.8.0
10621064
*/
10631065
function wp_color_scheme_settings() {
10641066
global $_wp_admin_css_colors;

src/wp-admin/includes/ms.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,8 @@ function _thickbox_path_admin_subfolder() {
854854
}
855855

856856
/**
857+
* @since 3.0.0
858+
*
857859
* @param array $users
858860
* @return bool
859861
*/

src/wp-admin/includes/template.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,8 @@ function get_submit_button( $text = '', $type = 'primary large', $name = 'submit
26322632
* Prints out the beginning of the admin HTML header.
26332633
*
26342634
* @global bool $is_IE
2635+
*
2636+
* @since 3.3.0
26352637
*/
26362638
function _wp_admin_html_begin() {
26372639
global $is_IE;

src/wp-content/themes/twentytwenty/functions.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,11 @@ function twentytwenty_get_custom_logo( $html ) {
361361
* @since Twenty Twenty 1.0
362362
*/
363363
function wp_body_open() {
364-
/** This action is documented in wp-includes/general-template.php */
364+
/**
365+
* Triggered after the opening <body> tag.
366+
*
367+
* @since Twenty Twenty 1.0
368+
*/
365369
do_action( 'wp_body_open' );
366370
}
367371
}

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

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3165,27 +3165,25 @@ public function handle_changeset_trash_request() {
31653165
return;
31663166
}
31673167

3168-
if ( $changeset_post_id ) {
3169-
if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) {
3170-
wp_send_json_error(
3171-
array(
3172-
'code' => 'changeset_trash_unauthorized',
3173-
'message' => __( 'Unable to trash changes.' ),
3174-
)
3175-
);
3176-
}
3168+
if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) {
3169+
wp_send_json_error(
3170+
array(
3171+
'code' => 'changeset_trash_unauthorized',
3172+
'message' => __( 'Unable to trash changes.' ),
3173+
)
3174+
);
3175+
}
31773176

3178-
$lock_user = (int) wp_check_post_lock( $changeset_post_id );
3177+
$lock_user = (int) wp_check_post_lock( $changeset_post_id );
31793178

3180-
if ( $lock_user && get_current_user_id() !== $lock_user ) {
3181-
wp_send_json_error(
3182-
array(
3183-
'code' => 'changeset_locked',
3184-
'message' => __( 'Changeset is being edited by other user.' ),
3185-
'lockUser' => $this->get_lock_user_data( $lock_user ),
3186-
)
3187-
);
3188-
}
3179+
if ( $lock_user && get_current_user_id() !== $lock_user ) {
3180+
wp_send_json_error(
3181+
array(
3182+
'code' => 'changeset_locked',
3183+
'message' => __( 'Changeset is being edited by other user.' ),
3184+
'lockUser' => $this->get_lock_user_data( $lock_user ),
3185+
)
3186+
);
31893187
}
31903188

31913189
if ( 'trash' === get_post_status( $changeset_post_id ) ) {

src/wp-includes/class-wp-theme-json.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,7 @@ private static function get_block_nodes( $theme_json, $selectors = array(), $opt
27812781
if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'] ) ) {
27822782
foreach ( $theme_json['styles']['blocks'][ $name ]['elements'] as $element => $node ) {
27832783
$node_path = array( 'styles', 'blocks', $name, 'elements', $element );
2784+
27842785
if ( $include_node_paths_only ) {
27852786
$nodes[] = array(
27862787
'path' => $node_path,
@@ -2798,12 +2799,6 @@ private static function get_block_nodes( $theme_json, $selectors = array(), $opt
27982799
foreach ( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $element ] as $pseudo_selector ) {
27992800
if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'][ $element ][ $pseudo_selector ] ) ) {
28002801
$node_path = array( 'styles', 'blocks', $name, 'elements', $element );
2801-
if ( $include_node_paths_only ) {
2802-
$nodes[] = array(
2803-
'path' => $node_path,
2804-
);
2805-
continue;
2806-
}
28072802

28082803
$nodes[] = array(
28092804
'path' => $node_path,

src/wp-includes/class-wp-user-meta-session-tokens.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ protected function get_sessions() {
3737
/**
3838
* Converts an expiration to an array of session information.
3939
*
40+
* @since 4.0.0
41+
*
4042
* @param mixed $session Session or expiration.
4143
* @return array Session.
4244
*/

src/wp-includes/comment-template.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,12 +834,8 @@ function get_comment_link( $comment = null, $args = array() ) {
834834

835835
if ( $cpage && get_option( 'page_comments' ) ) {
836836
if ( $wp_rewrite->using_permalinks() ) {
837-
if ( $cpage ) {
838-
$comment_link = trailingslashit( $comment_link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage;
839-
}
840-
841-
$comment_link = user_trailingslashit( $comment_link, 'comment' );
842-
} elseif ( $cpage ) {
837+
$comment_link = trailingslashit( $comment_link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage;
838+
} else {
843839
$comment_link = add_query_arg( 'cpage', $cpage, $comment_link );
844840
}
845841
}

0 commit comments

Comments
 (0)