Changeset 23554 for trunk/wp-includes/functions.php
- Timestamp:
- 03/01/2013 04:28:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r23543 r23554 469 469 470 470 if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) { 471 wp_add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" );471 add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" ); 472 472 } 473 473 } … … 1258 1258 */ 1259 1259 function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) { 1260 $jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] );1260 $jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : $_SERVER['REQUEST_URI']; 1261 1261 $ref = ( wp_get_original_referer() ) ? wp_get_original_referer() : $jump_back_to; 1262 $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $ref) . '" />';1262 $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( stripslashes( $ref ) ) . '" />'; 1263 1263 if ( $echo ) 1264 1264 echo $orig_referer_field; … … 1279 1279 $ref = false; 1280 1280 if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) 1281 $ref = wp_unslash( $_REQUEST['_wp_http_referer'] );1281 $ref = $_REQUEST['_wp_http_referer']; 1282 1282 else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) 1283 $ref = wp_unslash( $_SERVER['HTTP_REFERER'] );1284 1285 if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ))1283 $ref = $_SERVER['HTTP_REFERER']; 1284 1285 if ( $ref && $ref !== $_SERVER['REQUEST_URI'] ) 1286 1286 return $ref; 1287 1287 return false; … … 1299 1299 function wp_get_original_referer() { 1300 1300 if ( !empty( $_REQUEST['_wp_original_http_referer'] ) ) 1301 return wp_unslash( $_REQUEST['_wp_original_http_referer'] );1301 return $_REQUEST['_wp_original_http_referer']; 1302 1302 return false; 1303 1303 }
Note: See TracChangeset
for help on using the changeset viewer.