diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index 1f69382f12..30b9d8a6f7 100644
a
|
b
|
function wp_print_media_templates() { |
309 | 309 | |
310 | 310 | <?php // Template for the view switchers, used for example in the Media Grid. ?> |
311 | 311 | <script type="text/html" id="tmpl-media-library-view-switcher"> |
312 | | <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-list"> |
| 312 | <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', admin_url( 'upload.php' ) ) ); ?>" class="view-list"> |
313 | 313 | <span class="screen-reader-text"><?php _e( 'List view' ); ?></span> |
314 | 314 | </a> |
315 | | <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current" aria-current="page"> |
| 315 | <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', admin_url( 'upload.php' ) ) ); ?>" class="view-grid current" aria-current="page"> |
316 | 316 | <span class="screen-reader-text"><?php _e( 'Grid view' ); ?></span> |
317 | 317 | </a> |
318 | 318 | </script> |