Changeset 2690800
- Timestamp:
- 03/08/2022 01:06:31 PM (4 years ago)
- Location:
- cc-disable-users
- Files:
-
- 61 added
- 9 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/.gitignore (added)
-
tags/1.1.0/.htaccess (added)
-
tags/1.1.0/AUTHORS.txt (added)
-
tags/1.1.0/LICENSE.txt (added)
-
tags/1.1.0/README.txt (added)
-
tags/1.1.0/assets (added)
-
tags/1.1.0/assets/css (added)
-
tags/1.1.0/assets/css/index.html (added)
-
tags/1.1.0/assets/css/style.css (added)
-
tags/1.1.0/assets/index.html (added)
-
tags/1.1.0/composer.json (added)
-
tags/1.1.0/composer.lock (added)
-
tags/1.1.0/includes (added)
-
tags/1.1.0/includes/Disable_Users.php (added)
-
tags/1.1.0/includes/Settings.php (added)
-
tags/1.1.0/includes/index.html (added)
-
tags/1.1.0/index.html (added)
-
tags/1.1.0/languages (added)
-
tags/1.1.0/languages/cc-disable-users-pl_PL.mo (added)
-
tags/1.1.0/languages/cc-disable-users-pl_PL.po (added)
-
tags/1.1.0/languages/index.html (added)
-
tags/1.1.0/plugin.php (added)
-
tags/1.1.0/screenshot-1.png (added)
-
tags/1.1.0/screenshot-2.png (added)
-
tags/1.1.0/screenshot-3.png (added)
-
tags/1.1.0/templates (added)
-
tags/1.1.0/templates/icon.php (added)
-
tags/1.1.0/templates/index.html (added)
-
tags/1.1.0/templates/link.php (added)
-
tags/1.1.0/templates/message.php (added)
-
tags/1.1.0/templates/settings.php (added)
-
tags/1.1.0/uninstall.php (added)
-
tags/1.1.0/vendor (added)
-
tags/1.1.0/vendor/autoload.php (added)
-
tags/1.1.0/vendor/clearcode (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/.gitignore (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/.htaccess (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/AUTHORS.txt (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/LICENSE.txt (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/README.md (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/composer.json (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/index.html (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/index.html (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/v3 (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/v3/Autoloader.php (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/v3/Filterer.php (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/v3/Plugin.php (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/v3/Singleton.php (added)
-
tags/1.1.0/vendor/clearcode/wordpress-framework/src/v3/index.html (added)
-
tags/1.1.0/vendor/composer (added)
-
tags/1.1.0/vendor/composer/ClassLoader.php (added)
-
tags/1.1.0/vendor/composer/LICENSE (added)
-
tags/1.1.0/vendor/composer/autoload_classmap.php (added)
-
tags/1.1.0/vendor/composer/autoload_namespaces.php (added)
-
tags/1.1.0/vendor/composer/autoload_psr4.php (added)
-
tags/1.1.0/vendor/composer/autoload_real.php (added)
-
tags/1.1.0/vendor/composer/autoload_static.php (added)
-
tags/1.1.0/vendor/composer/installed.json (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/Disable_Users.php (modified) (3 diffs)
-
trunk/includes/Settings.php (modified) (1 diff)
-
trunk/plugin.php (modified) (3 diffs)
-
trunk/uninstall.php (modified) (1 diff)
-
trunk/vendor/clearcode/wordpress-framework/src/v3/Autoloader.php (modified) (1 diff)
-
trunk/vendor/clearcode/wordpress-framework/src/v3/Filterer.php (modified) (1 diff)
-
trunk/vendor/clearcode/wordpress-framework/src/v3/Plugin.php (modified) (1 diff)
-
trunk/vendor/clearcode/wordpress-framework/src/v3/Singleton.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cc-disable-users/trunk/README.txt
r1894952 r2690800 4 4 Requires PHP: 7.0 5 5 Requires at least: 4.9.6 6 Tested up to: 4.9.66 Tested up to: 5.9.1 7 7 Stable tag: trunk 8 8 License: GPLv3 … … 48 48 == Changelog == 49 49 50 = 1.1.0 = 51 * Release date: 08.03.2022* 52 53 * Fixed Multisite support. 54 50 55 = 1.0.0 = 51 56 * Release date: 18.06.2018* -
cc-disable-users/trunk/includes/Disable_Users.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6 … … 42 42 public function filter_authenticate( $user, $username ) { 43 43 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; 45 45 46 46 $sessions = WP_Session_Tokens::get_instance( $current_user->ID ); … … 58 58 59 59 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(); 62 62 } 63 63 64 64 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; 67 67 if ( self::get( 'name' ) == $plugin_data['Name'] ) { 68 68 $plugin_meta[] = self::__( 'Authors' ) -
cc-disable-users/trunk/includes/Settings.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6 -
cc-disable-users/trunk/plugin.php
r1894952 r2690800 7 7 * @author Nikodem Jankiewicz 8 8 * @author Piotr Niewiadomski 9 * @copyright 20 18Clearcode9 * @copyright 2022 Clearcode 10 10 * @license GPL-3.0+ 11 11 * … … 14 14 * Plugin URI: https://wordpress.org/plugins/cc-disable-users 15 15 * Description: This plugin allows to disable the access to WordPress Dashboard for selected user accounts. 16 * Version: 1. 0.016 * Version: 1.1.0 17 17 * Author: Clearcode 18 18 * Author URI: https://clearcode.cc … … 22 22 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt 23 23 24 Copyright (C) 20 18by Clearcode <https://clearcode.cc>24 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 25 25 and associates (see AUTHORS.txt file). 26 26 -
cc-disable-users/trunk/uninstall.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6 -
cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Autoloader.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6 -
cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Filterer.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6 -
cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Plugin.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6 -
cc-disable-users/trunk/vendor/clearcode/wordpress-framework/src/v3/Singleton.php
r1894952 r2690800 2 2 3 3 /* 4 Copyright (C) 20 18by Clearcode <https://clearcode.cc>4 Copyright (C) 2022 by Clearcode <https://clearcode.cc> 5 5 and associates (see AUTHORS.txt file). 6 6
Note: See TracChangeset
for help on using the changeset viewer.