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.

Built from https://develop.svn.wordpress.org/trunk@49568


git-svn-id: http://core.svn.wordpress.org/trunk@49306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
antpb 2020-11-12 15:46:07 +00:00
parent 8efbef867c
commit 522a7a5d40
2 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-beta3-49567';
$wp_version = '5.6-beta3-49568';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.