Plugin Directory

Changeset 2690800


Ignore:
Timestamp:
03/08/2022 01:06:31 PM (4 years ago)
Author:
ClearcodeHQ
Message:

Version 1.1.0

Location:
cc-disable-users
Files:
61 added
9 edited

Legend:

Unmodified
Added
Removed
  • cc-disable-users/trunk/README.txt

    r1894952 r2690800  
    44Requires PHP: 7.0
    55Requires at least: 4.9.6
    6 Tested up to: 4.9.6
     6Tested up to: 5.9.1
    77Stable tag: trunk
    88License: GPLv3
     
    4848== Changelog ==
    4949
     50= 1.1.0 =
     51* Release date: 08.03.2022*
     52
     53* Fixed Multisite support.
     54
    5055= 1.0.0 =
    5156* Release date: 18.06.2018*
  • cc-disable-users/trunk/includes/Disable_Users.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
     
    4242        public function filter_authenticate( $user, $username ) {
    4343            if ( ! $current_user = get_user_by( 'login', $username ) ) return $user;
    44             if ( ! $current_user->has_cap( Settings::OPTION        ) ) return $user;
     44            if ( ! isset( $current_user->caps[ Settings::OPTION ]  ) ) return $user;
    4545
    4646            $sessions = WP_Session_Tokens::get_instance( $current_user->ID );
     
    5858
    5959        public function action_init() {
    60             if ( ! $user = wp_get_current_user() ) return;
    61             if ( $user->has_cap( Settings::OPTION ) && is_user_logged_in() ) wp_logout();
     60            if ( ! $current_user = wp_get_current_user() ) return;
     61            if ( isset( $current_user->caps[ Settings::OPTION ] ) && is_user_logged_in() ) wp_logout();
    6262        }
    6363
    6464        public function filter_plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
    65             if ( empty( self::get( 'name' )   ) ) return $plugin_meta;
    66             if ( empty( $plugin_data['Name']  ) ) return $plugin_meta;
     65            if ( empty( self::get( 'name' )  ) ) return $plugin_meta;
     66            if ( empty( $plugin_data['Name'] ) ) return $plugin_meta;
    6767            if ( self::get( 'name' ) == $plugin_data['Name'] ) {
    6868                $plugin_meta[] = self::__( 'Authors' )
  • cc-disable-users/trunk/includes/Settings.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
  • cc-disable-users/trunk/plugin.php

    r1894952 r2690800  
    77 * @author      Nikodem Jankiewicz
    88 * @author      Piotr Niewiadomski
    9  * @copyright   2018 Clearcode
     9 * @copyright   2022 Clearcode
    1010 * @license     GPL-3.0+
    1111 *
     
    1414 * Plugin URI:  https://wordpress.org/plugins/cc-disable-users
    1515 * Description: This plugin allows to disable the access to WordPress Dashboard for selected user accounts.
    16  * Version:     1.0.0
     16 * Version:     1.1.0
    1717 * Author:      Clearcode
    1818 * Author URI:  https://clearcode.cc
     
    2222 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
    2323
    24     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     24    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    2525    and associates (see AUTHORS.txt file).
    2626
  • cc-disable-users/trunk/uninstall.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
  • cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Autoloader.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
  • cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Filterer.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
  • cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Plugin.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
  • cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Singleton.php

    r1894952 r2690800  
    22
    33/*
    4     Copyright (C) 2018 by Clearcode <https://clearcode.cc>
     4    Copyright (C) 2022 by Clearcode <https://clearcode.cc>
    55    and associates (see AUTHORS.txt file).
    66
Note: See TracChangeset for help on using the changeset viewer.