PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 4.0.3
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v4.0.3
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / admin / advanced-settings / includes / fields / remove-all-fields-from-backend.php

remove-all-fields-from-backend.php in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 4.0.3, at admin/advanced-settings/includes/fields/remove-all-fields-from-backend.php

23 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly
4 if ( ! defined( 'ABSPATH' ) ) exit;
5
6 /* Hide all profile fields in backend */
7 add_action('admin_init', 'wppb_toolbox_remove_all_fields_from_backend');
8 function wppb_toolbox_remove_all_fields_from_backend(){
9 // old
10 remove_action( 'show_user_profile', 'display_profile_extra_fields_in_admin', 10 );
11 remove_action( 'edit_user_profile', 'display_profile_extra_fields_in_admin', 10 );
12 remove_action( 'personal_options_update', 'save_profile_extra_fields_in_admin', 10 );
13 remove_action( 'edit_user_profile_update', 'save_profile_extra_fields_in_admin', 10 );
14 remove_action( 'user_profile_update_errors', 'wppb_validate_backend_fields', 10, 3 );
15
16 // new
17 remove_action( 'show_user_profile', 'wppb_display_fields_in_admin', 10 );
18 remove_action( 'edit_user_profile', 'wppb_display_fields_in_admin', 10 );
19 remove_action( 'personal_options_update', 'wppb_save_fields_in_admin', 10 );
20 remove_action( 'edit_user_profile_update', 'wppb_save_fields_in_admin', 10 );
21 remove_action( 'user_profile_update_errors', 'wppb_validate_fields_in_admin', 10, 3 );
22 }
23