Profile.php in Texty – SMS Notification for WordPress, WooCommerce, Dokan and more trunk, at includes/Admin/Profile.php
| 1 | <?php |
| 2 | |
| 3 | namespace Texty\Admin; |
| 4 | |
| 5 | /** |
| 6 | * Profile Class |
| 7 | */ |
| 8 | class Profile { |
| 9 | |
| 10 | /** |
| 11 | * Initialize |
| 12 | */ |
| 13 | public function __construct() { |
| 14 | add_filter( 'user_contactmethods', [ $this, 'add_contact_methods' ], 8 ); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Add phone number as contact method |
| 19 | * |
| 20 | * @param array $methods |
| 21 | * |
| 22 | * @return array |
| 23 | */ |
| 24 | public function add_contact_methods( $methods ) { |
| 25 | $methods['texty_phone'] = __( 'Phone Number (Texty)', 'texty' ); |
| 26 | |
| 27 | return $methods; |
| 28 | } |
| 29 | } |
| 30 |