Changeset 10163 for trunk/src/bp-xprofile/bp-xprofile-actions.php
- Timestamp:
- 10/01/2015 04:18:13 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-actions.php
r10140 r10163 20 20 * The function will delete the active avatar for a user. 21 21 * 22 * @package BuddyPress Xprofile23 22 * @uses bp_core_delete_avatar() Deletes the active avatar for the logged in user. 24 23 * @uses add_action() Runs a specific function for an action when it fires. … … 30 29 } 31 30 32 // Check the nonce 31 // Check the nonce. 33 32 check_admin_referer( 'bp_delete_avatar_link' ); 34 33 … … 48 47 49 48 /** 50 * Handles the saving of xprofile field visibilities 49 * Handles the saving of xprofile field visibilities. 51 50 * 52 51 * @since 1.9.0 … … 54 53 function bp_xprofile_action_settings() { 55 54 56 // Bail if not a POST action 55 // Bail if not a POST action. 57 56 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { 58 57 return; 59 58 } 60 59 61 // Bail if no submit action 60 // Bail if no submit action. 62 61 if ( ! isset( $_POST['xprofile-settings-submit'] ) ) { 63 62 return; 64 63 } 65 64 66 // Bail if not in settings 65 // Bail if not in settings. 67 66 if ( ! bp_is_user_settings_profile() ) { 68 67 return; … … 75 74 } 76 75 77 // Nonce check 76 // Nonce check. 78 77 check_admin_referer( 'bp_xprofile_settings' ); 79 78 … … 87 86 /** Save ******************************************************************/ 88 87 89 // Only save if there are field ID's being posted 88 // Only save if there are field ID's being posted. 90 89 if ( ! empty( $_POST['field_ids'] ) ) { 91 90 92 // Get the POST'ed field ID's 91 // Get the POST'ed field ID's. 93 92 $posted_field_ids = explode( ',', $_POST['field_ids'] ); 94 93 … … 104 103 } 105 104 106 // Save the visibility settings 105 // Save the visibility settings. 107 106 foreach ( $posted_field_ids as $field_id ) { 108 107 … … 126 125 do_action( 'bp_xprofile_settings_after_save' ); 127 126 128 // Redirect to the root domain 127 // Redirect to the root domain. 129 128 bp_core_redirect( bp_displayed_user_domain() . bp_get_settings_slug() . '/profile' ); 130 129 }
Note: See TracChangeset
for help on using the changeset viewer.