I'd like to override the core Wordpress function wp_referer_field to change the value of $referer_field variable inside of it. I've found that wp_referer_field is not pluggable and that I need to use some other technics for that. Adding some filters or actions. I was trying to use these code:
add_filter( 'wp_referer_field' , 'wp_referer_field_cyrillic' );
function wp_referer_field_cyrillic( $echo = true ) {
$referer_field = '<input type="hidden" name="_my_wp_http_referer" value="'.urldecode(esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) )) . '" />';
if ( $echo )
echo $referer_field;
return $referer_field;
}
But it doesn't work. It seems that I did something wrong.