diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index c4d06a610e..d12040cc7f 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -837,6 +837,7 @@ hr { } abbr.required, +span.required, .file-error, .widget-control-remove:hover, .row-actions .delete a:hover, diff --git a/src/wp-admin/css/deprecated-media.css b/src/wp-admin/css/deprecated-media.css index 9e8f3e3b27..5365a18e92 100644 --- a/src/wp-admin/css/deprecated-media.css +++ b/src/wp-admin/css/deprecated-media.css @@ -152,7 +152,8 @@ thead.media-item-info tr { border: 8px solid #fff; } -abbr.required { +abbr.required, +span.required { text-decoration: none; border: none; } @@ -364,9 +365,14 @@ h4.media-sub-title { } p.media-types { + margin: 0; padding: 1em; } +p.media-types-required-info { + padding-top: 0; +} + tr.not-image { display: none; } diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index d9dd1e67cd..2f7e585731 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -1464,8 +1464,9 @@ function get_media_item( $attachment_id, $args = null ) { $item .= "
-" . sprintf( __( 'Required fields are marked %s' ), '*' ) . "
" . join( "
\n", array_unique( (array) $field['helps'] ) ) . '
'; @@ -1690,8 +1692,9 @@ function get_compat_media_markup( $attachment_id, $args = null ) { } $readonly = ! $user_can_edit && ! empty( $field['taxonomy'] ) ? " readonly='readonly' " : ''; - $required = $field['required'] ? '*' : ''; - $aria_required = $field['required'] ? " aria-required='true' " : ''; + $required = $field['required'] ? '*' : ''; + $required_attr = $field['required'] ? ' required' : ''; + $aria_required = $field['required'] ? " aria-required='true'" : ''; $class = 'compat-field-' . $id; $class .= $field['required'] ? ' form-required' : ''; @@ -1706,9 +1709,9 @@ function get_compat_media_markup( $attachment_id, $args = null ) { // sanitize_post() skips the post_content when user_can_richedit. $field['value'] = htmlspecialchars( $field['value'], ENT_QUOTES ); } - $item .= "'; + $item .= "'; } else { - $item .= ""; + $item .= ""; } if ( !empty( $field['helps'] ) ) $item .= "" . join( "
\n", array_unique( (array) $field['helps'] ) ) . '
'; @@ -1732,8 +1735,12 @@ function get_compat_media_markup( $attachment_id, $args = null ) { if ( !empty( $form_fields['_final'] ) ) $item .= "\t\t' . + sprintf( __( 'Required fields are marked %s' ), '*' ) . '
++
' . sprintf( __( 'Required fields are marked %s' ), '*' ) . '
- - * + + | -+ | |
---|---|---|
- - * + | -+ | |
' . __('Link text, e.g. “Ransom Demands (PDF)”') . ' |