wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_original_referer_field › WordPress Function
Seit2.0.4
Veraltetn/v
› wp_original_referer_field ( $display = true, $jump_back_to = 'current' )
Parameter: (2) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Retrieves or displays original referer hidden field for forms.
The input name is '_wp_original_http_referer' and will be either the same value of wp_referer_field(), if that was posted already or it will be the current page, if it doesn't exist.Ähnliche Funktionen: wp_get_original_referer, wp_referer_field, wp_get_referer, wp_strict_cross_origin_referrer, wp_get_original_image_url
Quellcode
function wp_original_referer_field( $display = true, $jump_back_to = 'current' ) { $ref = wp_get_original_referer(); if ( ! $ref ) { $ref = ( 'previous' === $jump_back_to ) ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] ); } $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $ref ) . '" />'; if ( $display ) { echo $orig_referer_field; } return $orig_referer_field; }