Ejemplo n.º 1
0
?>
" name="upadmin_n_cancel" id="upadmin_n_cancel" class="button" />
					</td>
				</tr>
			</table>
			</form>
		</div>
		
	</div>
	
	<!-- loading spinner -->
	<div class="upadmin-loader"></div>

	<!-- sortable fields -->
	<h2><span class="upadmin-ajax-fieldcount"><?php 
echo userpro_admin_count_fields();
?>
</span><a href="#" class="button upadmin-reset-fields"><?php 
_e('Restore Default Fields', 'userpro');
?>
</a></h2>
	<ul id="upadmin-newsection"><?php 
echo userpro_admin_new_section();
?>
</ul>
	<ul id="upadmin-sortable-fields"><?php 
echo userpro_admin_list_fields();
?>
</ul>
	
</div>
Ejemplo n.º 2
0
function userpro_restore_builtin_fields()
{
    if (!current_user_can('manage_options')) {
        die;
    }
    // admin priv
    $_builtin = get_option('userpro_fields_builtin');
    update_option('userpro_fields', $_builtin);
    delete_option('userpro_pre_icons_setup');
    delete_option('userpro_update_1036');
    // Added by Yogesh to solve profile background custom field issue
    $output['html'] = userpro_admin_list_fields();
    $output['count'] = userpro_admin_count_fields();
    $output = json_encode($output);
    if (is_array($output)) {
        print_r($output);
    } else {
        echo $output;
    }
    die;
}
Ejemplo n.º 3
0
function userpro_restore_builtin_fields()
{
    if (!current_user_can('manage_options')) {
        die;
    }
    // admin priv
    $_builtin = get_option('userpro_fields_builtin');
    update_option('userpro_fields', $_builtin);
    delete_option('userpro_pre_icons_setup');
    $output['html'] = userpro_admin_list_fields();
    $output['count'] = userpro_admin_count_fields();
    $output = json_encode($output);
    if (is_array($output)) {
        print_r($output);
    } else {
        echo $output;
    }
    die;
}