| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Teydea Password Reset - Force Password Reset & Expiration |
| 4 |
* Plugin URI: https://teydeastudio.com/?utm_source=Teydea+Password+Reset |
| 5 |
* Description: Easily enforce password reset for WordPress users. Choose to force password changes site-wide, by user and/or by role, to boost your site's security. |
| 6 |
* Version: 1.13.0 |
| 7 |
* Text Domain: password-reset-enforcement |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Requires at least: 6.6 |
| 10 |
* Tested up to: 7.1 |
| 11 |
* Author: Teydea Studio |
| 12 |
* Author URI: https://teydeastudio.com/?utm_source=Teydea+Password+Reset |
| 13 |
* Network: true |
| 14 |
* License: GPLv3 |
| 15 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html |
| 16 |
* |
| 17 |
* @package Teydea_Studio\Password_Reset |
| 18 |
*/ |
| 19 |
|
| 20 |
namespace Teydea_Studio\Password_Reset; |
| 21 |
|
| 22 |
if ( ! defined( 'ABSPATH' ) ) { |
| 23 |
exit; // @codeCoverageIgnore |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Require loader |
| 28 |
*/ |
| 29 |
require_once __DIR__ . '/loader.php'; |
| 30 |
|
| 31 |
/** |
| 32 |
* Initialize the plugin |
| 33 |
*/ |
| 34 |
add_action( |
| 35 |
'plugins_loaded', |
| 36 |
function (): void { |
| 37 |
get_container()->init(); |
| 38 |
}, |
| 39 |
); |
| 40 |
|
| 41 |
// Note whether the plugin is activated network-wide. |
| 42 |
add_action( |
| 43 |
sprintf( 'activate_%s', get_container()->get_basename() ), |
| 44 |
|
| 45 |
/** |
| 46 |
* Note whether the plugin is being activated network-wide |
| 47 |
* |
| 48 |
* @param bool $network_wide Whether the plugin is being activated for all sites in the network or just the current site. |
| 49 |
*/ |
| 50 |
function ( bool $network_wide ) { |
| 51 |
// Note the network-wide activation status. |
| 52 |
get_container()->note_network_wide_activation_status( $network_wide ); |
| 53 |
}, |
| 54 |
1, |
| 55 |
); |
| 56 |
|
| 57 |
/** |
| 58 |
* Handle the plugin's activation hook |
| 59 |
*/ |
| 60 |
register_activation_hook( |
| 61 |
__FILE__, |
| 62 |
function (): void { |
| 63 |
get_container()->on_activation(); |
| 64 |
}, |
| 65 |
); |
| 66 |
|
| 67 |
/** |
| 68 |
* Handle the plugin's deactivation hook |
| 69 |
*/ |
| 70 |
register_deactivation_hook( |
| 71 |
__FILE__, |
| 72 |
function (): void { |
| 73 |
get_container()->on_deactivation(); |
| 74 |
}, |
| 75 |
); |
| 76 |
|