Switch language

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




wp_sanitize_redirect [ WordPress Function ]

wp_sanitize_redirect ( $location )
Returns:
  • (string) redirect-sanitized URL
Defined at:



Sanitizes a URL for use in a redirect.

Source


<?php
function wp_sanitize_redirect($location) {
    
$location preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i'''$location);
    
$location wp_kses_no_null($location);

    
// remove %0d and %0a from location
    
$strip = array('%0d''%0a''%0D''%0A');
    
$location _deep_replace($strip$location);
    return 
$location;
}
?>

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