Definition:
function wp_referer_field( $echo = true ) {}
Retrieve or display referer hidden field for forms.
The referer link is the current Request URI from the server super global. The input name is ‘_wp_http_referer’, in case you wanted to check manually.
Parameters
- bool $echo: Whether to echo or return the referer field.
Return values
returns:Referer field.
Source code
function wp_referer_field( $echo = true ) { $ref = esc_attr( $_SERVER['REQUEST_URI'] ); $referer_field = '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />'; if ( $echo ) echo $referer_field; return $referer_field; }
4017
No comments yet... Be the first to leave a reply!