Exemplo n.º 1
0
function userpro_delete_field()
{
    if (!current_user_can('manage_options')) {
        die;
    }
    // admin priv
    global $userpro;
    extract($_POST);
    $output = '';
    $fields = $userpro->fields;
    unset($fields[$field]);
    update_option('userpro_fields', $fields);
    $output['count'] = userpro_admin_count_fields();
    $output = json_encode($output);
    if (is_array($output)) {
        print_r($output);
    } else {
        echo $output;
    }
    die;
}
Exemplo n.º 2
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>