diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 021547fd18..e5cc4b3bb8 100644
a
|
b
|
class WP_List_Table { |
795 | 795 | $current = $this->get_pagenum(); |
796 | 796 | $removable_query_args = wp_removable_query_args(); |
797 | 797 | |
798 | | $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); |
| 798 | $siteurl = get_option('siteurl'); |
| 799 | $current_url = parse_url($siteurl, PHP_URL_SCHEME) . '://' . parse_url($siteurl, PHP_URL_HOST) . $_SERVER['REQUEST_URI']; |
799 | 800 | |
800 | 801 | $current_url = remove_query_arg( $removable_query_args, $current_url ); |
801 | 802 | |
… |
… |
class WP_List_Table { |
1082 | 1083 | public function print_column_headers( $with_id = true ) { |
1083 | 1084 | list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); |
1084 | 1085 | |
1085 | | $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); |
| 1086 | $siteurl = get_option('siteurl'); |
| 1087 | $current_url = parse_url($siteurl, PHP_URL_SCHEME) . '://' . parse_url($siteurl, PHP_URL_HOST) . $_SERVER['REQUEST_URI']; |
1086 | 1088 | $current_url = remove_query_arg( 'paged', $current_url ); |
1087 | 1089 | |
1088 | 1090 | if ( isset( $_GET['orderby'] ) ) { |
diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
index 5c5560d60f..5b57bd61ae 100644
a
|
b
|
function wp_admin_canonical_url() { |
1177 | 1177 | } |
1178 | 1178 | |
1179 | 1179 | // Ensure we're using an absolute URL. |
1180 | | $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); |
| 1180 | $siteurl = get_option('siteurl'); |
| 1181 | $current_url = parse_url($siteurl, PHP_URL_SCHEME) . '://' . parse_url($siteurl, PHP_URL_HOST) . $_SERVER['REQUEST_URI']; |
1181 | 1182 | $filtered_url = remove_query_arg( $removable_query_args, $current_url ); |
1182 | 1183 | ?> |
1183 | 1184 | <link id="wp-admin-canonical" rel="canonical" href="<?php echo esc_url( $filtered_url ); ?>" /> |