/**
  * AJAX Function for set portal page client
  */
 function ajax_customizer_get_sections()
 {
     global $wpdb;
     if (!isset($_POST['wpc_scheme']) || empty($_POST['wpc_scheme'])) {
         die('');
     }
     include $this->plugin_dir . '/includes/class.customize.php';
     $wpc_client_customize = new WPC_Client_Customize();
     //            ob_start();
     $content = $wpc_client_customize->_get_sections($_POST['wpc_scheme']);
     //                $content = ob_get_contents();
     //            ob_end_clean();
     $sections_header_content = $wpc_client_customize->get_sections_header($_POST['wpc_scheme']);
     //            $content = preg_replace( '~>\s+<~m', '><', $content );
     echo json_encode(array('status' => true, 'content' => $content, 'sections_header_content' => $sections_header_content));
     die;
 }
<?php

define('IFRAME_REQUEST', true);
//wp_enqueue_script( 'jquery-ui-accordion' );
wp_enqueue_script('jquery-ui-spinner');
wp_register_style('wpc-jqueryui', $this->plugin_url . 'css/jqueryui/jquery-ui-1.10.3.css');
wp_enqueue_style('wpc-jqueryui');
wp_enqueue_script('accordion');
wp_enqueue_style('customize-controls');
wp_enqueue_script('wp-color-picker');
wp_enqueue_style('wp-color-picker');
include $this->plugin_dir . '/includes/class.customize.php';
$wpc_client_customize = new WPC_Client_Customize();
//save settings
if (isset($_POST['wpc_scheme_settings']) && isset($_POST['wpc_style_settings']) && is_array($_POST['wpc_style_settings'])) {
    $wpc_client_customize->save_style_settings($_POST['wpc_scheme_settings'], $_POST['wpc_style_settings']);
    do_action('wp_client_redirect', admin_url() . 'admin.php?page=wpclients_customize&msg=u');
    exit;
}
//reset settings
if (isset($_GET['reset']) && 'true' == $_GET['reset']) {
    $wpc_client_customize->reset_style_settings();
    do_action('wp_client_redirect', admin_url() . 'admin.php?page=wpclients_customize&msg=r');
    exit;
}
$args = array('role' => 'wpc_client', 'meta_key' => 'wpc_cl_hubpage_id', 'fields' => 'ID', 'number' => 1);
$client = get_users($args);
if (isset($client[0])) {
    $hub_id = get_user_meta($client[0], 'wpc_cl_hubpage_id', true);
    //make link
    if ($this->permalinks) {