public
Description: Only allow logged-in users to view your WordPress site.
Clone URL: git://github.com/ionfish/access_control.git
Reorder logic to put return statement at the end
ionfish (author)
Wed Jul 23 16:49:07 -0700 2008
commit  08d5fdb67388781051a93ac4f9f7ebe31b0e9b79
tree    aebed43be9adff98235a72c4dec3d70698d672e2
parent  0050f7fe1f8c110c5f8a97f2df514e637e846686
...
10
11
12
13
14
15
 
 
 
16
17
18
19
20
 
 
21
22
23
...
10
11
12
 
 
 
13
14
15
16
 
 
17
18
19
20
21
22
23
0
@@ -10,14 +10,14 @@ Author URI: http://extralogical.net/
0
 
0
 function access_control() {
0
   if (
0
- is_user_logged_in()
0
- || function_exists('login_header')
0
- || WP_INSTALLING === true
0
+ !is_user_logged_in()
0
+ && !function_exists('login_header')
0
+ && WP_INSTALLING !== true
0
   ) {
0
- return;
0
- } else {
0
     wp_redirect(get_bloginfo('wpurl') . '/wp-login.php');
0
     exit;
0
+ } else {
0
+ return;
0
   }
0
 }
0
 

Comments

    No one has commented yet.