summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-admin
diff options
context:
space:
mode:
Diffstat (limited to 'src/wp-admin')
-rw-r--r--src/wp-admin/async-upload.php19
-rw-r--r--src/wp-admin/css/list-tables.css8
-rw-r--r--src/wp-admin/css/revisions.css30
-rw-r--r--src/wp-admin/includes/class-wp-filesystem-ftpext.php9
-rw-r--r--src/wp-admin/includes/media.php2
-rw-r--r--src/wp-admin/includes/revision.php72
-rw-r--r--src/wp-admin/includes/template.php3
-rw-r--r--src/wp-admin/includes/update-core.php1
-rw-r--r--src/wp-admin/options-discussion.php2
9 files changed, 95 insertions, 51 deletions
diff --git a/src/wp-admin/async-upload.php b/src/wp-admin/async-upload.php
index 2ac2f20e76..135568507c 100644
--- a/src/wp-admin/async-upload.php
+++ b/src/wp-admin/async-upload.php
@@ -112,12 +112,14 @@ if ( isset( $_REQUEST['post_id'] ) ) {
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error( $id ) ) {
- $button_unique_id = uniqid( 'dismiss-' );
- $message = sprintf(
+ $button_unique_id = uniqid( 'dismiss-' );
+ $error_description_id = uniqid( 'error-description-' );
+ $message = sprintf(
'%s <strong>%s</strong><br />%s',
sprintf(
- '<button type="button" id="%s" class="dismiss button-link">%s</button>',
+ '<button type="button" id="%1$s" class="dismiss button-link" aria-describedby="%2$s">%3$s</button>',
esc_attr( $button_unique_id ),
+ esc_attr( $error_description_id ),
__( 'Dismiss' )
),
sprintf(
@@ -127,14 +129,23 @@ if ( is_wp_error( $id ) ) {
),
esc_html( $id->get_error_message() )
);
+
wp_admin_notice(
$message,
array(
+ 'id' => $error_description_id,
'additional_classes' => array( 'error-div', 'error' ),
'paragraph_wrap' => false,
)
);
- echo "<script>jQuery( 'button#{$button_unique_id}' ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();})});</script>\n";
+
+ $speak_message = sprintf(
+ /* translators: %s: Name of the file that failed to upload. */
+ __( '%s has failed to upload.' ),
+ esc_js( $_FILES['async-upload']['name'] )
+ );
+
+ echo "<script>_.delay(function() {wp.a11y.speak('" . esc_js( $speak_message ) . "');}, 1500);jQuery( 'button#{$button_unique_id}' ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );jQuery( '#plupload-browse-button' ).trigger( 'focus' );})});</script>\n";
exit;
}
diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css
index da4bb599be..bc38d64b38 100644
--- a/src/wp-admin/css/list-tables.css
+++ b/src/wp-admin/css/list-tables.css
@@ -2064,7 +2064,6 @@ div.action-links,
}
.row-actions {
- margin-left: -8px;
margin-right: -8px;
padding-top: 4px;
}
@@ -2077,10 +2076,15 @@ div.action-links,
color: transparent;
}
+ .row-actions span {
+ font-size: 0;
+ }
+
.row-actions span a,
.row-actions span .button-link {
display: inline-block;
- padding: 4px 8px;
+ padding: 4px 16px 4px 0;
+ font-size: 13px;
line-height: 1.5;
}
diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css
index 9d3a0b3a91..e16143cf48 100644
--- a/src/wp-admin/css/revisions.css
+++ b/src/wp-admin/css/revisions.css
@@ -572,6 +572,28 @@ div.revisions-controls > .wp-slider > .ui-slider-handle {
}
}
+@media screen and (max-width: 600px) {
+ .revisions-meta .author-card:not(.comparing-two-revisions .author-card) {
+ display: flex;
+ flex-direction: column;
+ width: fit-content;
+ gap: 16px;
+ }
+
+ .comparing-two-revisions .revisions-meta .restore-revision {
+ margin-top: 16px;
+ }
+
+ .revisions-controls {
+ padding-top: 0;
+ }
+
+ .revision-toggle-compare-mode {
+ position: relative;
+ padding: 1rem 0;
+ }
+}
+
@media screen and (max-width: 782px) {
#diff-next-revision,
#diff-previous-revision {
@@ -585,14 +607,18 @@ div.revisions-controls > .wp-slider > .ui-slider-handle {
.revisions-controls,
.comparing-two-revisions .revisions-controls {
- height: 170px;
+ height: fit-content;
}
.revisions-tooltip {
- bottom: 130px;
+ bottom: 155px;
z-index: 2;
}
+ .comparing-two-revisions .revisions-tooltip {
+ bottom: 200px;
+ }
+
.diff-meta {
overflow: hidden;
}
diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php
index 0294720ccd..7c721734c3 100644
--- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php
+++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php
@@ -601,9 +601,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
}
/**
- * @param string $line
- * @return array {
- * Array of file information.
+ * Parses an individual entry from the FTP LIST command output.
+ *
+ * @param string $line A line from the directory listing.
+ * @return array|string {
+ * Array of file information. Empty string if the line could not be parsed.
*
* @type string $name Name of the file or directory.
* @type string $perms *nix representation of permissions.
@@ -658,7 +660,6 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
$lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY );
if ( $lucifer ) {
- // echo $line."\n";
$lcount = count( $lucifer );
if ( $lcount < 8 ) {
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 5c0b5d0b38..7d9fd638fb 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -3337,7 +3337,7 @@ function attachment_submitbox_metadata() {
$uploaded_by_link = get_edit_user_link( $author->ID );
}
?>
- <div class="misc-pub-section misc-pub-uploadedby">
+ <div class="misc-pub-section misc-pub-uploadedby word-wrap-break-word">
<?php if ( $uploaded_by_link ) { ?>
<?php _e( 'Uploaded by:' ); ?> <a href="<?php echo $uploaded_by_link; ?>"><strong><?php echo $uploaded_by_name; ?></strong></a>
<?php } else { ?>
diff --git a/src/wp-admin/includes/revision.php b/src/wp-admin/includes/revision.php
index df7201e958..ec2460c0ca 100644
--- a/src/wp-admin/includes/revision.php
+++ b/src/wp-admin/includes/revision.php
@@ -407,41 +407,43 @@ function wp_print_revision_templates() {
<strong id="diff-title-to"><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>
<# } #>
<div class="author-card<# if ( data.attributes.autosave ) { #> autosave<# } #>">
- {{{ data.attributes.author.avatar }}}
- <div class="author-info" id="diff-title-author">
- <# if ( data.attributes.autosave ) { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Autosave by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } else if ( data.attributes.current ) { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Current Revision by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } else { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Revision by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } #>
- <span class="time-ago">{{ data.attributes.timeAgo }}</span>
- <span class="date">({{ data.attributes.dateShort }})</span>
+ <div>
+ {{{ data.attributes.author.avatar }}}
+ <div class="author-info" id="diff-title-author">
+ <# if ( data.attributes.autosave ) { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Autosave by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } else if ( data.attributes.current ) { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Current Revision by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } else { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Revision by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } #>
+ <span class="time-ago">{{ data.attributes.timeAgo }}</span>
+ <span class="date">({{ data.attributes.dateShort }})</span>
+ </div>
</div>
<# if ( 'to' === data.type && data.attributes.restoreUrl ) { #>
<input <?php if ( wp_check_post_lock( $post->ID ) ) { ?>
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 127027d8f5..16da3388ae 100644
--- a/src/wp-admin/includes/template.php
+++ b/src/wp-admin/includes/template.php
@@ -817,9 +817,6 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
$tab_index_attribute = " tabindex=\"$tab_index\"";
}
- // @todo Remove this?
- // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
-
$post_date = ( $for_post ) ? $post->post_date : get_comment()->comment_date;
$jj = ( $edit ) ? mysql2date( 'd', $post_date, false ) : current_time( 'd' );
$mm = ( $edit ) ? mysql2date( 'm', $post_date, false ) : current_time( 'm' );
diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php
index f1731f9c8f..2d925afa63 100644
--- a/src/wp-admin/includes/update-core.php
+++ b/src/wp-admin/includes/update-core.php
@@ -1023,6 +1023,7 @@ $_new_bundled_files = array(
* @global string[] $_old_requests_files
* @global string[] $_new_bundled_files
* @global wpdb $wpdb WordPress database abstraction object.
+ * @global string $wp_version The WordPress version string.
*
* @param string $from New release unzipped path.
* @param string $to Path to old WordPress installation.
diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php
index 6bb8ce2f54..e0e12dc21f 100644
--- a/src/wp-admin/options-discussion.php
+++ b/src/wp-admin/options-discussion.php
@@ -309,6 +309,8 @@ $avatar_defaults = array(
'monsterid' => __( 'MonsterID (Generated)' ),
'retro' => __( 'Retro (Generated)' ),
'robohash' => __( 'RoboHash (Generated)' ),
+ 'initials' => __( 'Initials (Generated)' ),
+ 'color' => __( 'Color (Generated)' ),
);
/**
* Filters the default avatars.