mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 05:33:36 +09:00
Enhance password reset logic and add Action Scheduler filter
Ensure proper handling of user data in password reset functions by adding checks and updating parameter handling. Introduce a new filter to extend site health information and include a setting for enabling email sending via Action Scheduler. Improve code clarity with updated comments and function annotations.
This commit is contained in:
@@ -43,6 +43,7 @@ if ( ! class_exists( 'um\action_scheduler\Init' ) ) {
|
||||
public function __construct() {
|
||||
if ( ! $this->can_be_active() ) {
|
||||
add_action( 'init', array( $this, 'add_notice' ) );
|
||||
add_filter( 'um_site_health_extend', array( $this, 'change_site_health' ) );
|
||||
} else {
|
||||
add_filter( 'um_settings_structure', array( $this, 'add_setting' ) );
|
||||
// Since 2.10.3 we load library as soon as there are required library files.
|
||||
@@ -67,6 +68,18 @@ if ( ! class_exists( 'um\action_scheduler\Init' ) ) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Action Scheduler setting to Ultimate Member feature settings
|
||||
*
|
||||
* @param array $settings
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function change_site_health( $site_health ) {
|
||||
$site_health['ultimate-member']['fields']['enable_as_email_sending']['value'] = __( 'No', 'ultimate-member' );
|
||||
return $site_health;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Action Scheduler setting to Ultimate Member feature settings
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user