Widgets: Remove "Replace Gallery" button from Gallery widget since redundant with "Edit Gallery".
Props Presskopp, juhise, melchoyce. See #41914. Fixes #41994. git-svn-id: https://develop.svn.wordpress.org/trunk@41772 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f23be16bd2
commit
6e25b4bb6d
@ -29,8 +29,8 @@ class WP_Widget_Media_Gallery extends WP_Widget_Media {
|
|||||||
|
|
||||||
$this->l10n = array_merge( $this->l10n, array(
|
$this->l10n = array_merge( $this->l10n, array(
|
||||||
'no_media_selected' => __( 'No images selected' ),
|
'no_media_selected' => __( 'No images selected' ),
|
||||||
'add_media' => _x( 'Select Images', 'label for button in the gallery widget; should not be longer than ~13 characters long' ),
|
'add_media' => _x( 'Add Images', 'label for button in the gallery widget; should not be longer than ~13 characters long' ),
|
||||||
'replace_media' => _x( 'Replace Gallery', 'label for button in the gallery widget; should not be longer than ~13 characters long' ),
|
'replace_media' => '',
|
||||||
'edit_media' => _x( 'Edit Gallery', 'label for button in the gallery widget; should not be longer than ~13 characters long' ),
|
'edit_media' => _x( 'Edit Gallery', 'label for button in the gallery widget; should not be longer than ~13 characters long' ),
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
@ -403,9 +403,11 @@ abstract class WP_Widget_Media extends WP_Widget {
|
|||||||
<button type="button" class="button edit-media selected">
|
<button type="button" class="button edit-media selected">
|
||||||
<?php echo esc_html( $this->l10n['edit_media'] ); ?>
|
<?php echo esc_html( $this->l10n['edit_media'] ); ?>
|
||||||
</button>
|
</button>
|
||||||
|
<?php if ( ! empty( $this->l10n['replace_media'] ) ) : ?>
|
||||||
<button type="button" class="button change-media select-media selected">
|
<button type="button" class="button change-media select-media selected">
|
||||||
<?php echo esc_html( $this->l10n['replace_media'] ); ?>
|
<?php echo esc_html( $this->l10n['replace_media'] ); ?>
|
||||||
</button>
|
</button>
|
||||||
|
<?php endif; ?>
|
||||||
<button type="button" class="button select-media not-selected">
|
<button type="button" class="button select-media not-selected">
|
||||||
<?php echo esc_html( $this->l10n['add_media'] ); ?>
|
<?php echo esc_html( $this->l10n['add_media'] ); ?>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user