Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -461,7 +461,7 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
||||
<legend>
|
||||
<span class="hidden" id="editlegend"><?php _e( 'Edit Comment' ); ?></span>
|
||||
<span class="hidden" id="replyhead"><?php _e( 'Reply to Comment' ); ?></span>
|
||||
<span class="hidden" id="addhead"><?php _e( 'Add new Comment' ); ?></span>
|
||||
<span class="hidden" id="addhead"><?php _e( 'Add New Comment' ); ?></span>
|
||||
</legend>
|
||||
|
||||
<div id="replycontainer">
|
||||
@@ -512,9 +512,16 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
||||
<button type="button" class="cancel button"><?php _e( 'Cancel' ); ?></button>
|
||||
<span class="waiting spinner"></span>
|
||||
</p>
|
||||
<div class="notice notice-error notice-alt inline hidden">
|
||||
<p class="error"></p>
|
||||
</div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
'<p class="error"></p>',
|
||||
array(
|
||||
'type' => 'error',
|
||||
'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ),
|
||||
'paragraph_wrap' => false,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="action" id="action" value="" />
|
||||
@@ -900,7 +907,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
||||
* @since 4.7.0 Added the `$post_type` parameter.
|
||||
*
|
||||
* @param string $default_template Optional. The template file name. Default empty.
|
||||
* @param string $post_type Optional. Post type to get templates for. Default 'post'.
|
||||
* @param string $post_type Optional. Post type to get templates for. Default 'page'.
|
||||
*/
|
||||
function page_template_dropdown( $default_template = '', $post_type = 'page' ) {
|
||||
$templates = get_page_templates( null, $post_type );
|
||||
@@ -1006,10 +1013,15 @@ function wp_import_upload_form( $action ) {
|
||||
$size = size_format( $bytes );
|
||||
$upload_dir = wp_upload_dir();
|
||||
if ( ! empty( $upload_dir['error'] ) ) :
|
||||
?>
|
||||
<div class="error"><p><?php _e( 'Before you can upload your import file, you will need to fix the following error:' ); ?></p>
|
||||
<p><strong><?php echo $upload_dir['error']; ?></strong></p></div>
|
||||
<?php
|
||||
$upload_directory_error = '<p>' . __( 'Before you can upload your import file, you will need to fix the following error:' ) . '</p>';
|
||||
$upload_directory_error .= '<p><strong>' . $upload_dir['error'] . '</strong></p>';
|
||||
wp_admin_notice(
|
||||
$upload_directory_error,
|
||||
array(
|
||||
'additional_classes' => array( 'error' ),
|
||||
'paragraph_wrap' => false,
|
||||
)
|
||||
);
|
||||
else :
|
||||
?>
|
||||
<form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
|
||||
@@ -1355,7 +1367,7 @@ function do_meta_boxes( $screen, $context, $data_object ) {
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
++$i;
|
||||
// get_hidden_meta_boxes() doesn't apply in the block editor.
|
||||
$hidden_class = ( ! $screen->is_block_editor() && in_array( $box['id'], $hidden, true ) ) ? ' hide-if-js' : '';
|
||||
echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes( $box['id'], $page ) . $hidden_class . '" ' . '>' . "\n";
|
||||
@@ -1427,16 +1439,17 @@ function do_meta_boxes( $screen, $context, $data_object ) {
|
||||
if ( WP_DEBUG && ! $block_compatible && 'edit' === $screen->parent_base && ! $screen->is_block_editor() && ! isset( $_GET['meta-box-loader'] ) ) {
|
||||
$plugin = _get_plugin_from_callback( $box['callback'] );
|
||||
if ( $plugin ) {
|
||||
?>
|
||||
<div class="error inline">
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %s: The name of the plugin that generated this meta box. */
|
||||
printf( __( 'This meta box, from the %s plugin, is not compatible with the block editor.' ), "<strong>{$plugin['Name']}</strong>" );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
$meta_box_not_compatible_message = sprintf(
|
||||
/* translators: %s: The name of the plugin that generated this meta box. */
|
||||
__( 'This meta box, from the %s plugin, is not compatible with the block editor.' ),
|
||||
"<strong>{$plugin['Name']}</strong>"
|
||||
);
|
||||
wp_admin_notice(
|
||||
$meta_box_not_compatible_message,
|
||||
array(
|
||||
'additional_classes' => array( 'error', 'inline' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1451,7 +1464,6 @@ function do_meta_boxes( $screen, $context, $data_object ) {
|
||||
echo '</div>';
|
||||
|
||||
return $i;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1551,7 +1563,7 @@ function do_accordion_sections( $screen, $context, $data_object ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$i++;
|
||||
++$i;
|
||||
$hidden_class = in_array( $box['id'], $hidden, true ) ? 'hide-if-js' : '';
|
||||
|
||||
$open_class = '';
|
||||
@@ -2689,17 +2701,22 @@ function convert_to_screen( $hook_name ) {
|
||||
* @access private
|
||||
*/
|
||||
function _local_storage_notice() {
|
||||
?>
|
||||
<div id="local-storage-notice" class="hidden notice is-dismissible">
|
||||
<p class="local-restore">
|
||||
<?php _e( 'The backup of this post in your browser is different from the version below.' ); ?>
|
||||
<button type="button" class="button restore-backup"><?php _e( 'Restore the backup' ); ?></button>
|
||||
</p>
|
||||
<p class="help">
|
||||
<?php _e( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
$local_storage_message = '<p class="local-restore">';
|
||||
$local_storage_message .= __( 'The backup of this post in your browser is different from the version below.' );
|
||||
$local_storage_message .= '<button type="button" class="button restore-backup">' . __( 'Restore the backup' ) . '</button></p>';
|
||||
$local_storage_message .= '<p class="help">';
|
||||
$local_storage_message .= __( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' );
|
||||
$local_storage_message .= '</p>';
|
||||
|
||||
wp_admin_notice(
|
||||
$local_storage_message,
|
||||
array(
|
||||
'id' => 'local-storage-notice',
|
||||
'additional_classes' => array( 'hidden' ),
|
||||
'dismissible' => true,
|
||||
'paragraph_wrap' => false,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2777,9 +2794,12 @@ function wp_star_rating( $args = array() ) {
|
||||
* @since 4.2.0
|
||||
*/
|
||||
function _wp_posts_page_notice() {
|
||||
printf(
|
||||
'<div class="notice notice-warning inline"><p>%s</p></div>',
|
||||
__( 'You are currently editing the page that shows your latest posts.' )
|
||||
wp_admin_notice(
|
||||
__( 'You are currently editing the page that shows your latest posts.' ),
|
||||
array(
|
||||
'type' => 'warning',
|
||||
'additional_classes' => array( 'inline' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user