Revert [29428] to avoid errors with Add Media for now.
See #29026. git-svn-id: https://develop.svn.wordpress.org/trunk@29432 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3aa94852b3
commit
0653e60a5d
@ -371,7 +371,7 @@ class WP_List_Table {
|
|||||||
if ( empty( $this->_actions ) )
|
if ( empty( $this->_actions ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
|
echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select Bulk Action' ) . "</label>";
|
||||||
echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
|
echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
|
||||||
echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
|
echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
|
||||||
|
|
||||||
@ -469,8 +469,7 @@ class WP_List_Table {
|
|||||||
|
|
||||||
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
|
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
|
||||||
?>
|
?>
|
||||||
<label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
|
<select name="m">
|
||||||
<select name="m" id="filter-by-date">
|
|
||||||
<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
|
<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $months as $arc_row ) {
|
foreach ( $months as $arc_row ) {
|
||||||
|
@ -565,8 +565,7 @@
|
|||||||
* @augments Backbone.View
|
* @augments Backbone.View
|
||||||
*/
|
*/
|
||||||
media.view.BulkSelectionActionDropdown = media.View.extend({
|
media.view.BulkSelectionActionDropdown = media.View.extend({
|
||||||
tagName: 'select',
|
tagName: 'select',
|
||||||
id: 'bulk-select-dropdown',
|
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
media.view.Button.prototype.initialize.apply( this, arguments );
|
media.view.Button.prototype.initialize.apply( this, arguments );
|
||||||
|
@ -5697,10 +5697,7 @@
|
|||||||
var filters,
|
var filters,
|
||||||
LibraryViewSwitcher,
|
LibraryViewSwitcher,
|
||||||
FiltersConstructor,
|
FiltersConstructor,
|
||||||
filterByTypeLabel,
|
screenReaderText;
|
||||||
bulkActionsLabel,
|
|
||||||
filterByDateLabel,
|
|
||||||
searchLabel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @member {wp.media.view.Toolbar}
|
* @member {wp.media.view.Toolbar}
|
||||||
@ -5715,32 +5712,24 @@
|
|||||||
// browser view. Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar );
|
// browser view. Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar );
|
||||||
// which the controller can tap into and add this view?
|
// which the controller can tap into and add this view?
|
||||||
if ( this.controller.activeModes.where( { id: 'grid' } ).length ) {
|
if ( this.controller.activeModes.where( { id: 'grid' } ).length ) {
|
||||||
|
|
||||||
LibraryViewSwitcher = media.View.extend({
|
LibraryViewSwitcher = media.View.extend({
|
||||||
className: 'view-switch media-grid-view-switch',
|
className: 'view-switch media-grid-view-switch',
|
||||||
template: media.template( 'media-library-view-switcher')
|
template: media.template( 'media-library-view-switcher')
|
||||||
});
|
});
|
||||||
|
|
||||||
this.toolbar.set( 'libraryViewSwitcher', new LibraryViewSwitcher({
|
this.toolbar.set( 'libraryViewSwitcher', new LibraryViewSwitcher({
|
||||||
controller: this.controller,
|
controller: this.controller,
|
||||||
priority: -90
|
priority: -90
|
||||||
}).render() );
|
}).render() );
|
||||||
|
|
||||||
this.toolbar.set( 'dateFilter', new media.view.DateFilter({
|
|
||||||
controller: this.controller,
|
|
||||||
model: this.collection.props,
|
|
||||||
priority: -75
|
|
||||||
}).render() );
|
|
||||||
|
|
||||||
this.toolbar.set( 'bulkSelection', new media.view.BulkSelection({
|
this.toolbar.set( 'bulkSelection', new media.view.BulkSelection({
|
||||||
controller: this.controller,
|
controller: this.controller,
|
||||||
priority: -70
|
priority: -70
|
||||||
}).render() );
|
}).render() );
|
||||||
|
this.toolbar.set( 'dateFilter', new media.view.DateFilter({
|
||||||
this.toolbar.set( 'spinner', new media.view.Spinner({
|
controller: this.controller,
|
||||||
priority: -60
|
model: this.collection.props,
|
||||||
}) );
|
priority: -75
|
||||||
|
}).render() );
|
||||||
}
|
}
|
||||||
|
|
||||||
filters = this.options.filters;
|
filters = this.options.filters;
|
||||||
@ -5757,24 +5746,22 @@
|
|||||||
priority: -80
|
priority: -80
|
||||||
}).render() );
|
}).render() );
|
||||||
|
|
||||||
filterByTypeLabel = $( '<label class="screen-reader-text" for="media-attachment-filters">' + l10n.filterByType + '</label>' );
|
screenReaderText = $( '<label class="screen-reader-text" for="media-attachment-filters">' + l10n.select + '</label>' );
|
||||||
this.toolbar.get( 'filters' ).$el.before( filterByTypeLabel );
|
this.toolbar.get( 'filters' ).$el.before( screenReaderText );
|
||||||
|
|
||||||
filterByDateLabel = $( '<label class="screen-reader-text" for="media-attachment-date-filters">' + l10n.filterByDate + '</label>' );
|
|
||||||
this.toolbar.get( 'dateFilter' ).$el.before( filterByDateLabel );
|
|
||||||
|
|
||||||
bulkActionsLabel = $( '<label class="screen-reader-text" for="bulk-select-dropdown">' + l10n.bulkActionsLabel + '</label>' );
|
|
||||||
this.toolbar.get( 'bulkSelection' ).$el.before( bulkActionsLabel );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.toolbar.set( 'spinner', new media.view.Spinner({
|
||||||
|
priority: -70
|
||||||
|
}) );
|
||||||
|
|
||||||
if ( this.options.search ) {
|
if ( this.options.search ) {
|
||||||
this.toolbar.set( 'search', new media.view.Search({
|
this.toolbar.set( 'search', new media.view.Search({
|
||||||
controller: this.controller,
|
controller: this.controller,
|
||||||
model: this.collection.props,
|
model: this.collection.props,
|
||||||
priority: 60
|
priority: 60
|
||||||
}).render() );
|
}).render() );
|
||||||
searchLabel = $( '<label class="screen-reader-text" for="media-search-input">' + l10n.searchMediaLabel + '</label>' );
|
screenReaderText = $( '<label class="screen-reader-text" for="media-search-input">' + l10n.search + '</label>' );
|
||||||
this.toolbar.get( 'search' ).$el.before( searchLabel );
|
this.toolbar.get( 'search' ).$el.before( screenReaderText );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.options.dragInfo ) {
|
if ( this.options.dragInfo ) {
|
||||||
|
@ -2937,12 +2937,8 @@ function wp_enqueue_media( $args = array() ) {
|
|||||||
'warnDelete' => __( "You are about to permanently delete this item.\n 'Cancel' to stop, 'OK' to delete." ),
|
'warnDelete' => __( "You are about to permanently delete this item.\n 'Cancel' to stop, 'OK' to delete." ),
|
||||||
'warnBulkDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ),
|
'warnBulkDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ),
|
||||||
'bulkActions' => __( 'Bulk Actions' ),
|
'bulkActions' => __( 'Bulk Actions' ),
|
||||||
'bulkActionsLabel' => __( 'Select bulk action' ),
|
|
||||||
'deletePermanently' => __( 'Delete Permanently' ),
|
'deletePermanently' => __( 'Delete Permanently' ),
|
||||||
'apply' => __( 'Apply' ),
|
'apply' => __( 'Apply' ),
|
||||||
'filterByDate' => __( 'Filter by date' ),
|
|
||||||
'filterByType' => __( 'Filter by type' ),
|
|
||||||
'searchMediaLabel' => __( 'Search Media' ),
|
|
||||||
|
|
||||||
// Library Details
|
// Library Details
|
||||||
'attachmentDetails' => __( 'Attachment Details' ),
|
'attachmentDetails' => __( 'Attachment Details' ),
|
||||||
|
Loading…
Reference in New Issue
Block a user