Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_referer_field [ WordPress Function ]

wp_referer_field ( $echo = true )
Parameters:
  • (bool) $echo Whether to echo or return the referer field.
Returns:
  • (string) Referer field.
Defined at:



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.

Source


<?php
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;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics