bootstrap.php
2 years ago
class-wpcom-user-profile-fields-revert.php
2 years ago
profile-edit.php
2 years ago
bootstrap.php
30 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Bootstrap the WP.com User profile edit restriction. |
| 4 | * |
| 5 | * @deprecated 13.7 |
| 6 | * |
| 7 | * @package automattic\jetpack |
| 8 | * |
| 9 | * @phan-file-suppress PhanDeprecatedFunction -- Ok for deprecated code to call other deprecated code. |
| 10 | */ |
| 11 | |
| 12 | namespace Automattic\Jetpack\Dashboard_Customizations; |
| 13 | |
| 14 | _deprecated_file( __FILE__, 'jetpack-13.7' ); |
| 15 | |
| 16 | use Automattic\Jetpack\Connection\Manager as Connection_Manager; |
| 17 | |
| 18 | /** |
| 19 | * Prevent WP.com user profile fields (first_name, last_name, display_name, description) to be updated. |
| 20 | * |
| 21 | * @deprecated 13.7 |
| 22 | */ |
| 23 | function load_the_user_profile_info_revert() { |
| 24 | _deprecated_function( __FUNCTION__, 'jetpack-13.7', 'Automattic\\Jetpack\\Masterbar\\load_the_user_profile_info_revert' ); |
| 25 | new WPCOM_User_Profile_Fields_Revert( new Connection_Manager( 'jetpack' ) ); |
| 26 | } |
| 27 | |
| 28 | \add_action( 'load-profile.php', __NAMESPACE__ . '\load_the_user_profile_info_revert' ); |
| 29 | \add_action( 'load-user-edit.php', __NAMESPACE__ . '\load_the_user_profile_info_revert' ); |
| 30 |