/** * 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; }
_e('Edit Section', WPC_CLIENT_TEXT_DOMAIN); ?> "></span> <span class="wpc_customize_button_delete" id="wpc_scheme_delete" title="<?php _e('Delete Section', WPC_CLIENT_TEXT_DOMAIN); ?> "></span> </span> <span id="ajax_result"></span> </div> <div id="theme_header"> <?php $first_scheme_key = array_keys($style_schemes); if (isset($first_scheme_key[0])) { echo $wpc_client_customize->get_sections_header($first_scheme_key[0]); } ?> </div> </div> <div id="customize-theme-controls"> <?php echo $wpc_client_customize->get_sections('_default_scheme'); ?> </div> <hr />