Plugin Directory

Changeset 221423


Ignore:
Timestamp:
03/24/2010 05:38:21 PM (16 years ago)
Author:
aizatto
Message:

Fix bugs, refer to r221421

File:
1 edited

Legend:

Unmodified
Added
Removed
  • super-secret/tags/0.1/super_secret.php

    r221401 r221423  
    1111
    1212function super_secret() {
    13     if (basename($_SERVER['PHP_SELF']) != 'wp-login.php') {
     13    global $current_user;
     14
     15    if ($current_user->ID == 0 && basename($_SERVER['PHP_SELF']) != 'wp-login.php') {
    1416            header("HTTP/1.0 404 Not Found"); ?>
    1517<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
     
    2022The requested URL was not found on this server.
    2123<HR>
    22 <?php if ($_SERVER['REMOTE_ADDR']): ?>
     24<?php if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1'): ?>
    2325    The WordPress Plugin Super Secret stopped you. You need to login to access your <a href="<?php echo wp_login_url(); ?>">installation.</a>
    2426<?php endif; ?>
     
    2931}
    3032
    31 add_action('auth_cookie_malformed', 'super_secret');
     33add_action('set_current_user', 'super_secret');
Note: See TracChangeset for help on using the changeset viewer.