wp_original_referer_field [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Retrieve or display original referer hidden field for forms.
The input name is '_wp_original_http_referer' and will be either the same value of {@link wp_referer_field()}, if that was posted already or it will be the current page, if it doesn't exist.
Source
<?php
function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) {
$jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
$ref = ( wp_get_original_referer() ) ? wp_get_original_referer() : $jump_back_to;
$orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( stripslashes( $ref ) ) . '" />';
if ( $echo )
echo $orig_referer_field;
return $orig_referer_field;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/wp original referer field « WordPress Codex
Description. Retrieve or display original referer hidden field for forms. The input name is '_wp_original_http_referer' and will be either the same value of ...
codex.wordpress.org - #3628 (Make wp_nonce_field, wp_referrer_field and - WordPress Trac
The wp_nonce_field, wp_referrer_field and wp_original_referer_field functions should return values instead of using echo. This would be more consistent with ...
core.trac.wordpress.org - Docs for page functions.core.php
wp_original_referer_field (line 554). Retrieve or display ... string wp_original_referer_field ([bool $echo = true], [string $jump_back_to = 'current']). bool $echo: ...
phpdoc.ftwr.co.uk - Register, auto login and then redirect - Jeff Farthing
... function tml_register_form() { wp_original_referer_field( true, 'previous' ); } add_action( 'register_form', 'tml_register_form' ); ?> The problem ...
www.jfarthing.com