Changeset 2452372
- Timestamp:
- 01/08/2021 08:53:59 AM (5 years ago)
- Location:
- 2fas-light/trunk
- Files:
-
- 7 edited
-
changelog.txt (modified) (1 diff)
-
constants.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
src/Hooks/Add_Custom_Column_Filter.php (modified) (7 diffs)
-
twofas_light.php (modified) (1 diff)
-
vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
2fas-light/trunk/changelog.txt
r2449827 r2452372 1 1 == Changelog == 2 2 3 = 3.0.1 (Jan. 1, 2021) = 3 = 3.0.2 (Jan. 8, 2021) = 4 * Fixed bug in custom column filter 5 6 = 3.0.1 (Jan. 4, 2021) = 4 7 * Fixed bug in custom column filter 5 8 -
2fas-light/trunk/constants.php
r2449827 r2452372 15 15 define( 'TWOFAS_LIGHT_TEMPLATES_PATH', $templates_path ); 16 16 define( 'TWOFAS_LIGHT_WP_ADMIN_PATH', $admin_url ); 17 define( 'TWOFAS_LIGHT_PLUGIN_VERSION', '3.0. 1' );17 define( 'TWOFAS_LIGHT_PLUGIN_VERSION', '3.0.2' ); -
2fas-light/trunk/readme.txt
r2449827 r2452372 103 103 == Changelog == 104 104 105 = 3.0.1 (Jan. 1, 2021) = 105 = 3.0.2 (Jan. 8, 2021) = 106 * Fixed bug in custom column filter 107 108 = 3.0.1 (Jan. 4, 2021) = 106 109 * Fixed bug in custom column filter 107 110 -
2fas-light/trunk/src/Hooks/Add_Custom_Column_Filter.php
r2449827 r2452372 1 1 <?php 2 declare( strict_types=1);2 declare( strict_types=1 ); 3 3 4 4 namespace TwoFAS\Light\Hooks; … … 15 15 16 16 class Add_Custom_Column_Filter implements Hook_Interface { 17 17 18 18 /** 19 19 * @var FactoryInterface 20 20 */ 21 21 private $user_factory; 22 22 23 23 /** 24 24 * @param FactoryInterface $user_factory … … 27 27 $this->user_factory = $user_factory; 28 28 } 29 29 30 30 public function register_hook() { 31 31 add_filter( 'user_row_actions', [ $this, 'user_row_actions' ], 10, 2 ); … … 33 33 add_filter( 'manage_users_custom_column', [ $this, 'manage_users_custom_column' ], 10, 3 ); 34 34 } 35 35 36 36 /** 37 37 * @param array $actions … … 51 51 __( 'Edit your 2FAS settings', '2fas' ) ) . '">2FAS</a>'; 52 52 } 53 53 54 54 return $actions; 55 55 } 56 56 57 57 public function manage_users_columns( array $columns ): array { 58 58 if ( current_user_can( Capabilities::ADMIN ) ) { 59 59 $columns['twofas_2fa_status'] = '2FAS'; 60 60 } 61 61 62 62 return $columns; 63 63 } 64 64 65 65 /** 66 * @param string $value67 * @param string $column_name68 * @param int $user_id66 * @param string|null $value 67 * @param string $column_name 68 * @param int $user_id 69 69 * 70 * @return string 70 * @return string|null 71 71 * 72 72 * @throws InvalidArgumentException … … 74 74 * @throws NotFoundException 75 75 */ 76 public function manage_users_custom_column( $value, string $column_name, int $user_id ) : string{76 public function manage_users_custom_column( $value, string $column_name, int $user_id ) { 77 77 switch ( $column_name ) { 78 78 case 'twofas_2fa_status': … … 81 81 $user_storage->set_wp_user( new WP_User( $user_id ) ); 82 82 $value = $user_storage->is_totp_enabled() ? __( 'Active', '2fas' ) : __( 'Inactive', '2fas' ); 83 83 84 84 break; 85 85 } 86 86 87 87 return $value; 88 88 } -
2fas-light/trunk/twofas_light.php
r2449827 r2452372 4 4 * Plugin URI: https://wordpress.org/plugins/2fas-light/ 5 5 * Description: Free, simple, token-based authentication (Google Authenticator) for your WordPress. No registration needed. 6 * Version: 3.0. 16 * Version: 3.0.2 7 7 * Requires PHP: 7.0 8 8 * Requires at least: 4.9 -
2fas-light/trunk/vendor/composer/InstalledVersions.php
r2449827 r2452372 20 20 array ( 21 21 ), 22 'reference' => ' 6a5bc1a9c38312b15f39bf27d550475c5fec9e8c',22 'reference' => '365fa139f5071111df87589441869d48c5ee6d61', 23 23 'name' => 'twofas/wp-plugin-secure', 24 24 ), … … 210 210 array ( 211 211 ), 212 'reference' => ' 6a5bc1a9c38312b15f39bf27d550475c5fec9e8c',212 'reference' => '365fa139f5071111df87589441869d48c5ee6d61', 213 213 ), 214 214 'whichbrowser/parser' => -
2fas-light/trunk/vendor/composer/installed.php
r2449827 r2452372 7 7 array ( 8 8 ), 9 'reference' => ' 6a5bc1a9c38312b15f39bf27d550475c5fec9e8c',9 'reference' => '365fa139f5071111df87589441869d48c5ee6d61', 10 10 'name' => 'twofas/wp-plugin-secure', 11 11 ), … … 197 197 array ( 198 198 ), 199 'reference' => ' 6a5bc1a9c38312b15f39bf27d550475c5fec9e8c',199 'reference' => '365fa139f5071111df87589441869d48c5ee6d61', 200 200 ), 201 201 'whichbrowser/parser' =>
Note: See TracChangeset
for help on using the changeset viewer.