Plugin Directory

Changeset 915947


Ignore:
Timestamp:
05/17/2014 03:19:08 AM (12 years ago)
Author:
Beej
Message:

Updated with admin message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • block-default-login-attempts/trunk/block-default-login-attempts.php

    r915935 r915947  
    33Plugin Name: Block Default Login Attempts
    44Description: Completely block default admin user login attempts in WordPress.
    5 Version: 1.0.0
     5Version: 1.1.0
    66Author: Ben Yates
    77*/
     
    7171}
    7272
     73if ((defined('DOING_AJAX') and DOING_AJAX) or (defined('DOING_CRON') and DOING_CRON)) return;
     74
     75if (!function_exists('bdla_admin_notices')) {
     76    function bdla_admin_notices() {
     77        $user = get_user_by('login', 'admin');
     78        if (empty($user) or empty($user->ID)) return;
     79        ?>
     80            <div class="error">
     81                <p>
     82                    The default user &quot;admin&quot; still exists. Either replace it, or
     83                    deactivate the plugin &quot;Block Default Login Attempts&quot; until you
     84                    do so. Otherwise, you may not be able to log in again!
     85                </p>
     86            </div>
     87        <?php
     88    }
     89    add_action('admin_notices', 'bdla_admin_notices');
     90}
     91
    7392?>
Note: See TracChangeset for help on using the changeset viewer.