public
Description: Only allow logged-in users to view your WordPress site.
Clone URL: git://github.com/ionfish/access_control.git
Return a 401 error when denying a user access
ionfish (author)
Wed Jul 23 17:19:17 -0700 2008
commit  338b84526e2ea4f1d689a072bfa9ce8c84949cfb
tree    d1e447e7f4c6a162d1feeb1944d4d23c74be16c2
parent  f6e25ad1126582f041e0aef4ff1acc58ecfc15e5
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@ function access_control() {
0
     && !function_exists('login_header')
0
     && WP_INSTALLING !== true
0
   ) {
0
- wp_redirect(site_url('/wp-login.php'));
0
+ wp_redirect(site_url('/wp-login.php'), 401);
0
     exit;
0
   } else {
0
     return;

Comments

    No one has commented yet.