Switch language

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




wpmu_admin_do_redirect [ WordPress Function ]

wpmu_admin_do_redirect ( $url = '' )
Parameters:
  • (string) $url
Uses:
Defined at:



Redirect a user based on $_GET or $_POST arguments.

The function looks for redirect arguments in the following order: 1) $_GET['ref'] 2) $_POST['ref'] 3) $_SERVER['HTTP_REFERER'] 4) $_GET['redirect'] 5) $_POST['redirect'] 6) $url

Source


<?php
function wpmu_admin_do_redirect$url '' ) {
    
_deprecated_function__FUNCTION__'3.3' );

    
$ref '';
    if ( isset( 
$_GET['ref'] ) )
        
$ref $_GET['ref'];
    if ( isset( 
$_POST['ref'] ) )
        
$ref $_POST['ref'];

    if ( 
$ref ) {
        
$ref wpmu_admin_redirect_add_updated_param$ref );
        
wp_redirect$ref );
        exit();
    }
    if ( empty( 
$_SERVER['HTTP_REFERER'] ) == false ) {
        
wp_redirect$_SERVER['HTTP_REFERER'] );
        exit();
    }

    
$url wpmu_admin_redirect_add_updated_param$url );
    if ( isset( 
$_GET['redirect'] ) ) {
        if ( 
substr$_GET['redirect'], 0) == 's_' )
            
$url .= '&action=blogs&s='esc_htmlsubstr$_GET['redirect'], ) );
    } elseif ( isset( 
$_POST['redirect'] ) ) {
        
$url wpmu_admin_redirect_add_updated_param$_POST['redirect'] );
    }
    
wp_redirect$url );
    exit();
}
?>

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