• Login

(00 GENERATE PHP CODE FOR NEW META FIELDS)

USE QUERY STRING SUCH AS: ?meta1=joe,harry,jimmo

 

// COPY SETTINGS FROM TEAM MEMBER - FUNCTIONS
$0 = '';

$0a = get_user_meta( $otheruser_id, $0, $single );

if (!empty($0a)) { update_user_meta($user_id, $0, $0a); }

// GRAVITY FORMS FIELD FILLERS - FUNCTIONS or MYACCOUNT 2020
add_filter( 'gform_field_value_1', 'add_1a_function' );
function add_1a_function( $value ) {
$current_user_id = get_current_user_id();
if(stripos($_SERVER['REQUEST_URI'], '/2020-qrmobi/') !== false) {
$qr1 = $_GET['qr'];
if (!empty($qr1)) { $current_user_id = $qr1; }
}
$1b = get_user_meta($current_user_id, '', true);
return $1b;
}

// COPY SETTINGS TO A TEAM PORTAL MEMBER - FUNCTIONS
$0 = '';

$0a = get_user_meta( $user_from, $0, $single );

if (!empty($0a)) { update_user_meta($user_to, $0, $0a); }

// SAVE MULTIPLE PROFILES - CUSTOMIZE PAGE
$0 = '';

$1 = '1p_';

$2 = '2p_';

$3 = '3p_';

$4 = '4p_';

$0a = get_user_meta( $user_id, $0, $single );

if (!empty($0a)) { update_user_meta($user_id, $1, $0a); }

if (!empty($0a)) { update_user_meta($user_id, $2, $0a); }

if (!empty($0a)) { update_user_meta($user_id, $3, $0a); }

if (!empty($0a)) { update_user_meta($user_id, $4, $0a); }

$1a = get_user_meta( $user_id, $1, $single );

$2a = get_user_meta( $user_id, $2, $single );

$3a = get_user_meta( $user_id, $3, $single );

$4a = get_user_meta( $user_id, $4, $single );

if (!empty($1a)) { update_user_meta($user_id, $0, $1a); }

if (!empty($2a)) { update_user_meta($user_id, $0, $2a); }

if (!empty($3a)) { update_user_meta($user_id, $0, $3a); }

if (!empty($4a)) { update_user_meta($user_id, $0, $4a); }

// GRAVITY FORMS FIELD FILLERS - PROFILES CUSTOMIZE PAGE1

add_filter( 'gform_field_value_1p_1', 'add_1p_1a_function' );
function add_1p_1a_function( $value ) {
$current_user_id = get_current_user_id();
$sp_1p_1b = get_user_meta($current_user_id, '1p_', true);
return $sp_1p_1b;
}

add_filter( 'gform_field_value_2p_1', 'add_2p_1a_function' );
function add_2p_1a_function( $value ) {
$current_user_id = get_current_user_id();
$sp_2p_1b = get_user_meta($current_user_id, '2p_', true);
return $sp_2p_1b;
}

add_filter( 'gform_field_value_3p_1', 'add_3p_1a_function' );
function add_3p_1a_function( $value ) {
$current_user_id = get_current_user_id();
$sp_3p_1b = get_user_meta($current_user_id, '3p_', true);
return $sp_3p_1b;
}

add_filter( 'gform_field_value_4p_1', 'add_4p_1a_function' );
function add_4p_1a_function( $value ) {
$current_user_id = get_current_user_id();
$sp_4p_1b = get_user_meta($current_user_id, '4p_', true);
return $sp_4p_1b;
}