personal_options_update
https://developer.wordpress.org/reference/hooks/personal_options_update/
Fires before the page loads on the ‘Profile’ editing screen.
The action only fires if the current user is editing their own profile.
e.g. add_action('personal_options_update', 'the_function');
edit_user_profile_update
https://developer.wordpress.org/reference/hooks/edit_user_profile_update/
Fires before the page loads on the ‘Edit User’ screen.
The action only fires if the current user is editing their other profile.
e.g. add_action('edit_user_profile_update', 'the_function');
xprofile_data_before_save
http://hookr.io/actions/xprofile_data_before_save/
Fires before the current profile data instance gets saved.
e.g. add_action('xprofile_data_before_save', 'the_function');
xprofile_screen_edit_profile
https://www.buddyboss.com/resources/reference/functions/xprofile_screen_edit_profile/
Handles the display of the profile edit page by loading the correct template file.
e.g. add_action('xprofile_screen_edit_profile', 'the_function');
getTextBetween
function getTextBetween( $content, $start, $end ) {
$r = explode( $start, $content );
if( isset($r[1]) ) {
$r = explode( $end, $r[1] );
return $r[0];
}
return '';
}
e.g. getTextBetween( $url, $start, $end );
sanitizeTrim
function sanitizeTrim( $value ) {
return sanitize_text_field( trim( $value ) );
}
e.g. sanitizeTrim( $_POST['name'] );