diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-admin/includes/meta-boxes.php --- a/wp/wp-admin/includes/meta-boxes.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-admin/includes/meta-boxes.php Fri Sep 05 18:40:08 2025 +0200 @@ -76,7 +76,7 @@ $preview_button = sprintf( '%1$s %2$s', $preview_button_text, - /* translators: Accessibility text. */ + /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) ); ?> @@ -132,11 +132,21 @@ $private_style = 'style="display:none"'; } ?> - class="edit-post-status hide-if-no-js" role="button"> + class="edit-post-status hide-if-no-js" role="button"> + +
- + @@ -257,7 +272,12 @@ /* translators: Post revisions heading. %s: The number of available revisions. */ printf( __( 'Revisions: %s' ), '' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); ?> - + + +
- + + +
- + + +
@@ -281,25 +311,24 @@ endif; if ( 'draft' === $post->post_status && get_post_meta( $post_id, '_customize_changeset_uuid', true ) ) : - ?> -
-

- unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ), - esc_url( - add_query_arg( - 'changeset_uuid', - rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ), - admin_url( 'customize.php' ) - ) - ) - ); - ?> -

-
- unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ), + esc_url( + add_query_arg( + 'changeset_uuid', + rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ), + admin_url( 'customize.php' ) + ) + ) + ); + wp_admin_notice( + $message, + array( + 'type' => 'info', + 'additional_classes' => array( 'notice-alt', 'inline' ), + ) + ); endif; /** @@ -405,7 +434,7 @@ post_date ) ), @@ -439,10 +468,20 @@ ID ) ) { if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { - echo "" . __( 'Move to Trash' ) . ''; + printf( + '%2$s', + get_delete_post_link( $post->ID ), + __( 'Move to Trash' ) + ); } else { - $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; - echo "" . __( 'Delete permanently' ) . ''; + $show_confirmation = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; + + printf( + '%3$s', + $show_confirmation, + get_delete_post_link( $post->ID, '', true ), + __( 'Delete permanently' ) + ); } } ?> @@ -492,7 +531,12 @@ ?>
- + + + />
/> @@ -700,13 +744,18 @@ */ function post_excerpt_meta_box( $post ) { ?> - +

Learn more about manual excerpts.' ), - __( 'https://wordpress.org/support/article/excerpt/' ) + __( 'https://wordpress.org/documentation/article/what-is-an-excerpt-classic-editor/' ) ); ?>

@@ -744,7 +793,7 @@ printf( /* translators: %s: Documentation URL. */ __( 'Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress sites, they’ll be notified automatically using pingbacks, no other action necessary.' ), - __( 'https://wordpress.org/support/article/introduction-to-blogging/#comments' ) + __( 'https://wordpress.org/documentation/article/introduction-to-blogging/#comments' ) ); ?>

@@ -781,7 +830,7 @@ printf( /* translators: %s: Documentation URL. */ __( 'Custom fields can be used to add extra metadata to a post that you can use in your theme.' ), - __( 'https://wordpress.org/support/article/custom-fields/' ) + __( 'https://wordpress.org/documentation/article/assign-custom-fields/' ) ); ?>

@@ -804,8 +853,8 @@ trackbacks and pingbacks on this page' ), - __( 'https://wordpress.org/support/article/introduction-to-blogging/#managing-comments' ) + __( 'Allow trackbacks and pingbacks' ), + __( 'https://wordpress.org/documentation/article/introduction-to-blogging/#managing-comments' ) ); ?> @@ -852,8 +901,8 @@ $total = get_comments( array( 'post_id' => $post->ID, - 'number' => 1, 'count' => true, + 'orderby' => 'none', ) ); $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' ); @@ -888,7 +937,12 @@ /** This filter is documented in wp-admin/edit-tag-form.php */ $editable_slug = apply_filters( 'editable_slug', $post->post_name, $post ); ?> - + post_type ); ?> - + 0 && get_option( 'page_for_posts' ) != $post->ID ) : + if ( count( get_page_templates( $post ) ) > 0 && (int) get_option( 'page_for_posts' ) !== $post->ID ) : $template = ! empty( $post->page_template ) ? $post->page_template : false; ?>

@@ -1143,7 +1202,12 @@

+
+ +

@@ -1254,7 +1323,13 @@ -
+
+ + + @@ -1262,7 +1337,13 @@ -
+
+ + + @@ -1273,13 +1354,19 @@ /> 
-
+
+ + + @@ -1287,7 +1374,13 @@ -
+
+ + + @@ -1298,7 +1391,13 @@ -
+
+ + + @@ -1306,13 +1405,19 @@ /> 
-
+
+ + + @@ -1329,13 +1434,19 @@ /> 
-
+
+ + + @@ -1384,7 +1495,7 @@ link_rating ) && $link->link_rating == $rating ) { + if ( isset( $link->link_rating ) && $link->link_rating === $rating ) { echo ' selected="selected"'; } echo '>' . $rating . ''; @@ -1459,13 +1570,13 @@ $publish_callback_args = array( '__back_compat_meta_box' => true ); if ( post_type_supports( $post_type, 'revisions' ) && 'auto-draft' !== $post->post_status ) { - $revisions = wp_get_post_revisions( $post->ID, array( 'fields' => 'ids' ) ); + $revisions = wp_get_latest_revision_id_and_total_count( $post->ID ); // We should aim to show the revisions meta box only when there are revisions. - if ( count( $revisions ) > 1 ) { + if ( ! is_wp_error( $revisions ) && $revisions['count'] > 1 ) { $publish_callback_args = array( - 'revisions_count' => count( $revisions ), - 'revision_id' => reset( $revisions ), + 'revisions_count' => $revisions['count'], + 'revision_id' => $revisions['latest_id'], '__back_compat_meta_box' => true, ); @@ -1560,21 +1671,27 @@ */ do_action_deprecated( 'dbx_post_advanced', array( $post ), '3.7.0', 'add_meta_boxes' ); - // Allow the Discussion meta box to show up if the post type supports comments, - // or if comments or pings are open. + /* + * Allow the Discussion meta box to show up if the post type supports comments, + * or if comments or pings are open. + */ if ( comments_open( $post ) || pings_open( $post ) || post_type_supports( $post_type, 'comments' ) ) { add_meta_box( 'commentstatusdiv', __( 'Discussion' ), 'post_comment_status_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => true ) ); } - $stati = get_post_stati( array( 'public' => true ) ); - if ( empty( $stati ) ) { - $stati = array( 'publish' ); + $statuses = get_post_stati( array( 'public' => true ) ); + + if ( empty( $statuses ) ) { + $statuses = array( 'publish' ); } - $stati[] = 'private'; + + $statuses[] = 'private'; - if ( in_array( get_post_status( $post ), $stati, true ) ) { - // If the post type support comments, or the post has comments, - // allow the Comments meta box. + if ( in_array( get_post_status( $post ), $statuses, true ) ) { + /* + * If the post type support comments, or the post has comments, + * allow the Comments meta box. + */ if ( comments_open( $post ) || pings_open( $post ) || $post->comment_count > 0 || post_type_supports( $post_type, 'comments' ) ) { add_meta_box( 'commentsdiv', __( 'Comments' ), 'post_comment_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => true ) ); }