Skip to content

Instantly share code, notes, and snippets.

@sareiodata
Created August 20, 2013 14:09
Show Gist options
  • Save sareiodata/6281963 to your computer and use it in GitHub Desktop.
Save sareiodata/6281963 to your computer and use it in GitHub Desktop.
update profile builder extra fields dynamically.
$pb_options = get_option('wppb_custom_fields');
if (is_array($pb_options)){
foreach ($pb_options as $key => $single_option){
if ( $single_option['item_metaName'] == 'custom_field_1' )
$pb_options[$key]['item_options'] = 'Unu,Doi,Trei';
}
}
update_option('wppb_custom_fields', $pb_options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment