Changeset 2833264
- Timestamp:
- 12/13/2022 07:56:31 PM (3 years ago)
- Location:
- lock-login/trunk
- Files:
-
- 3 edited
-
Readme.txt (modified) (2 diffs)
-
includes/App.php (modified) (8 diffs)
-
locklogin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lock-login/trunk/Readme.txt
r2825392 r2833264 3 3 Tags: security, login, lock, unlock, login failed 4 4 Tested up to: 6.1 5 Stable tag: 0.1. 45 Stable tag: 0.1.5 6 6 Requires PHP: 7.4 7 7 License: GPLv2 or later … … 24 24 0.1.3 31-oct-22 Add an admin panel for unlock users gracefully 25 25 0.1.4 28-nov-22 Add the version of the browser for understand if is a bot or a real browser 26 0.1.5 13-dic-22 Refactor the main class application for one step on instantiation and document the App class -
lock-login/trunk/includes/App.php
r2825392 r2833264 6 6 class App 7 7 { 8 private static $instance = null; 9 8 10 private $db; 9 11 … … 24 26 add_action('admin_init', array($this, 'unlock_users')); 25 27 add_action('admin_menu', array($this, 'register_admin_menu')); 28 } 29 30 /** 31 * Static function for boot the application 32 */ 33 public static function boot() 34 { 35 if(static::$instance === null){ 36 static::$instance = new static(); 37 } 26 38 } 27 39 … … 62 74 } 63 75 76 /** 77 * @param $error_code array 78 * 79 * @return $error_cores array 80 */ 64 81 public function failure_shake($error_code) 65 82 { … … 68 85 } 69 86 87 /** 88 * @return anonymous array 89 */ 70 90 private function get_server_data() 71 91 { … … 82 102 } 83 103 104 /** 105 * Add two more types of schedules, one for 20 minutes and other for 30 minutes 106 * 107 * @param $schedules array 108 * 109 * @return $schedules array 110 */ 84 111 public function cron_schedules($schedules) 85 112 { … … 97 124 } 98 125 126 /** 127 * Unlock a determinated user for allow to login once again 128 */ 99 129 public function unlock_users() 100 130 { … … 106 136 } 107 137 138 /** 139 * Register the admin menu for the wordpress panel 140 */ 108 141 public function register_admin_menu() 109 142 { … … 118 151 } 119 152 153 /** 154 * Callback function for construct the admin page 155 */ 120 156 public function admin_callback() 121 157 { -
lock-login/trunk/locklogin.php
r2825392 r2833264 5 5 * Author: TocinoDev 6 6 * Author URI: https://tocino.mx 7 * Version: 0.1. 47 * Version: 0.1.5 8 8 * Tested up to: 6.0 9 9 * Requires PHP: 7.4 … … 20 20 require 'vendor/autoload.php'; 21 21 22 function lockloginstart() 23 { 24 static $instance = null; 25 26 if($instance === null){ 27 $instance = new LockloginApp(); 28 } 29 30 return $instance; 31 } 32 33 lockloginstart(); 22 LockloginApp::boot();
Note: See TracChangeset
for help on using the changeset viewer.