wp_redirect [ WordPress Function ]
wp_redirect ( $location, $status = 302 )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: is_redirect, wp_safe_redirect, wp_credits, auth_redirect, wp_old_slug_redirect
Redirects to another page.
Source
<?php
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status);
$status = apply_filters('wp_redirect_status', $status, $location);
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false;
$location = wp_sanitize_redirect($location);
if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_redirect() - WordPress Codex
wp_redirect() does not exit automatically and should almost always be ... Please note: wp_redirect will not be called if the page has started, so make sure to call ...
codex.wordpress.org - Where does wp_redirect need to be placed to make it work?
May 17, 2012 ... wp_redirect says "wp_redirect will not be called if the page has started, so make sure to call it higher up." - but after having placed the code at ...
wordpress.stackexchange.com - Using the wp_redirect() function
Did you know that WordPress provides a function which allows you a safe way to redirect to any URL? It's a pluggable function called ...
forums.appthemes.com - Wordpress and wp_redirect() function problem - LessThanWeb
Jun 28, 2010 ... Today while writing a WordPress plugin, I found out that using just wp_redirect() function alone doesn't work really. After some investigation I ...
www.lessthanweb.com
Gebruikersdiscussies [ wordpress.org ]
- becskr on "WP_Redirect using shortcode for form"
- ngn-rashell on "Redirect after Comments post by post"
- good_bad on "Warning: Cannot modify header information - headers already sent by (output star"
- webladynz on "wp_login_failed not working if only one field is filled out"
- jst on "wp_login_failed not working if only one field is filled out"
- Jackson on "wp_login_failed not working if only one field is filled out"
- jst on "wp_login_failed not working if only one field is filled out"
- grosbouff on "rewriting & wp_redirect problem"
- grosbouff on "rewriting & wp_redirect problem"
- luis.ferro on "wp_redirect with ALTERNATE_WP_CRON"