Ticket #16858: 16858.patch
File 16858.patch, 1.8 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/class-wp-list-table.php
475 475 476 476 $current = $this->get_pagenum(); 477 477 478 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];478 $current_url = self_admin_url(self_admin_path()); 479 479 480 480 $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url ); 481 481 … … 631 631 632 632 list( $columns, $hidden, $sortable ) = $this->get_column_info(); 633 633 634 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];634 $current_url = self_admin_url(self_admin_path()); 635 635 $current_url = remove_query_arg( 'paged', $current_url ); 636 636 637 637 if ( isset( $_GET['orderby'] ) ) -
wp-includes/link-template.php
2279 2279 } 2280 2280 2281 2281 /** 2282 * retrieve admin path component of current 2283 * request. 2284 * 2285 * @since 3.2.0 2286 * @return string admin path component or empty string if component could not be retrieved. 2287 */ 2288 function self_admin_path() { 2289 $path = ''; 2290 $request = $_SERVER['REQUEST_URI']; 2291 $admin = parse_url( self_admin_url(), PHP_URL_PATH ); 2292 $len = strlen( $admin ); 2293 if ( $len && $admin === substr( $request, 0, $len ) ) 2294 $path = substr( $request, $len ); 2295 return $path; 2296 } 2297 2298 /** 2282 2299 * Get the URL to the user's dashboard. 2283 2300 * 2284 2301 * If a user does not belong to any sites, the global user dashboard is used. If the user belongs to the current site,