Skip to content

Commit af5e6cc

Browse files
committed
Split init method for multiples add_action
1 parent fcd5406 commit af5e6cc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

classes/shortcodes/class-shortcode-registration.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ class MPT_Shortcode_Registration extends MPT_Shortcode {
1515
*/
1616
public function __construct() {
1717
add_shortcode( 'member-registration', array( __CLASS__, 'shortcode' ) );
18-
add_action( 'init', array( __CLASS__, 'init' ), 12 );
18+
19+
// Ask link reset
20+
add_action( 'init', array( __CLASS__, 'check_step_1' ), 12 );
21+
22+
// Check link reset and form new password
23+
add_action( 'init', array( __CLASS__, 'check_step_2_url' ), 13 );
24+
add_action( 'init', array( __CLASS__, 'check_step_2_form' ), 14 );
1925
}
2026

2127
/**
@@ -47,15 +53,6 @@ public static function shortcode() {
4753
}
4854
}
4955

50-
public static function init() {
51-
// Ask link reset
52-
self::check_step_1();
53-
54-
// Check link reset and form new password
55-
self::check_step_2_url();
56-
self::check_step_2_form();
57-
}
58-
5956
/**
6057
* Check POST data for creation member. Need for set_cookie function.
6158
*

0 commit comments

Comments
 (0)