Changeset 55540 for trunk/src/wp-includes/functions.php
- Timestamp:
- 03/13/2023 10:52:26 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r55514 r55540 1954 1954 */ 1955 1955 function wp_get_referer() { 1956 // Return early if called before wp_validate_redirect() is defined. 1956 1957 if ( ! function_exists( 'wp_validate_redirect' ) ) { 1957 1958 return false; … … 1960 1961 $ref = wp_get_raw_referer(); 1961 1962 1962 if ( $ref && wp_unslash( $_SERVER['REQUEST_URI'] ) !== $ref && home_url() . wp_unslash( $_SERVER['REQUEST_URI'] ) !== $ref ) { 1963 if ( $ref && wp_unslash( $_SERVER['REQUEST_URI'] ) !== $ref 1964 && home_url() . wp_unslash( $_SERVER['REQUEST_URI'] ) !== $ref 1965 ) { 1963 1966 return wp_validate_redirect( $ref, false ); 1964 1967 } … … 1994 1997 */ 1995 1998 function wp_get_original_referer() { 1996 if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) ) { 1999 // Return early if called before wp_validate_redirect() is defined. 2000 if ( ! function_exists( 'wp_validate_redirect' ) ) { 2001 return false; 2002 } 2003 2004 if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) ) { 1997 2005 return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false ); 1998 2006 }
Note: See TracChangeset
for help on using the changeset viewer.