| @@ -1,8 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Texty\Admin; |
| 4 | 4 | |
| 5 | +use WP_User; | |
| 6 | + | |
| 5 | 7 | /** |
| 6 | 8 | * Profile Class |
| 7 | 9 | */ |
| 8 | 10 | class Profile { |
| @@ -10,19 +12,20 @@ | ||
| 10 | 12 | /** |
| 11 | 13 | * Initialize |
| 12 | 14 | */ |
| 13 | 15 | public function __construct() { |
| 14 | - add_filter( 'user_contactmethods', [ $this, 'add_contact_methods' ], 8 ); | |
| 16 | + add_filter( 'user_contactmethods', [ $this, 'add_contact_methods' ], 8, 2 ); | |
| 15 | 17 | } |
| 16 | 18 | |
| 17 | 19 | /** |
| 18 | 20 | * Add phone number as contact method |
| 19 | 21 | * |
| 20 | - * @param array $methods | |
| 22 | + * @param array $methods | |
| 23 | + * @param WP_User $user | |
| 21 | 24 | * |
| 22 | 25 | * @return array |
| 23 | 26 | */ |
| 24 | - public function add_contact_methods( $methods ) { | |
| 27 | + public function add_contact_methods( $methods, $user ) { | |
| 25 | 28 | $methods['texty_phone'] = __( 'Phone Number (Texty)', 'texty' ); |
| 26 | 29 | |
| 27 | 30 | return $methods; |
| 28 | 31 | } |