[/wp_active.php]

Source: Internet
Author: User
Tags multisite

if (!is_multisite ()) {Wp_redirect (Site_url ('/wp-login.php?action=register '));//redirect the user to a pre-made absolute URI
Die (); }
$WP _query->is_404 = false; $WP _query is a wp_query entity object defined in the wp-blog-header.php file that provides information about the current request. This symbol accesses the properties and methods of the class instance;
Is_multisite () function source code, is the WordPress own definition of a function
function Is_multisite () {if (defined (' multisite ')) return multisite;if (defined (' Subdomain_install ') | | defined (' VH OST ') | | Defined (' SUNRISE ')) return True;return false;}


Function Source code:

Wp_redirect(302) {
Global$is _iis;/** * Filter the redirect location. * *@since 2.1.0 * *@param string $location the path to redirect. *@param int $status Status code to use. */$location = Apply_filters (' Wp_redirect ',$location,$status);/** * Filter the redirect status code. * *@since 2.3.0 * *@param int $status Status code to use. *@param string $location the path to redirect. */$status = Apply_filters (' Wp_redirect_status ', $status, $location);  if (! $location) 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 setupsheader ("Location: $location", true, $status); 
                                           
                                            return 
                                            true;} 
                                                           

  

  

[/wp_active.php]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.