PluginProbe
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more / 1.1
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more v1.1
2.0.2 trunk 0.2 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 2.0.0 2.0.1
← All changes | includes/Admin/Profile.php +6 -3 trunk1.1 View file →
@@ -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 }