mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Media: Allow users to switch from media grid to list mode in media library.
Fixes issue where media modal would open when switching from grid to list mode. Props mista-flo, mukesh27. Fixes #51396. git-svn-id: https://develop.svn.wordpress.org/trunk@49568 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -309,10 +309,10 @@ function wp_print_media_templates() {
|
||||
|
||||
<?php // Template for the view switchers, used for example in the Media Grid. ?>
|
||||
<script type="text/html" id="tmpl-media-library-view-switcher">
|
||||
<a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-list">
|
||||
<a href="<?php echo esc_url( add_query_arg( 'mode', 'list', admin_url( 'upload.php' ) ) ); ?>" class="view-list">
|
||||
<span class="screen-reader-text"><?php _e( 'List view' ); ?></span>
|
||||
</a>
|
||||
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current" aria-current="page">
|
||||
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', admin_url( 'upload.php' ) ) ); ?>" class="view-grid current" aria-current="page">
|
||||
<span class="screen-reader-text"><?php _e( 'Grid view' ); ?></span>
|
||||
</a>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user