function adap_remove_vc_shortcodes() { //NOTE: removal calls associated with OVERRIDING are done inline // with the shortcode class definitions (See accordion.php and tab.php etc.). if (function_exists('wpb_remove')) { //Remove the vc shortcodes that we don't support wpb_remove('vc_tour'); wpb_remove('vc_posts_slider'); wpb_remove('vc_single_image'); wpb_remove('vc_button'); wpb_remove('vc_cta_button'); wpb_remove('vc_teaser_grid'); wpb_remove('vc_progress_bar'); wpb_remove('vc_separator'); wpb_remove('vc_text_separator'); } }
vc_set_as_theme(); } add_action('init', 'your_prefix_vcSetAsTheme');*/ //add new mimes for upload dummy content files (code can be removed after dummy content import) function custom_upload_files($mimes) { $mimes = array_merge($mimes, array('xml' => 'application/xml'), array('json' => 'application/json')); return $mimes; } add_filter('upload_mimes', 'custom_upload_files'); //plugins activator require_once "plugins_activator.php"; //wpb_remove("vc_row_inner"); if (function_exists("wpb_remove")) { wpb_remove("vc_gmaps"); wpb_remove("vc_tour"); } //theme options require_once locate_template("theme-options.php"); //custom meta box require_once locate_template("meta-box.php"); //dropdown menu require_once locate_template("nav-menu-dropdown-walker.php"); //gallery functions require_once locate_template("gallery-functions.php"); //weekdays require_once locate_template("post-type-weekdays.php"); //departments require_once locate_template("post-type-departments.php"); if (function_exists("wpb_map")) { //doctors
<?php $themename = "medicenter"; //visual composer $dir = dirname(__FILE__) . '/wpbakery/'; $composer_settings = array('APP_ROOT' => $dir . '/js_composer', 'WP_ROOT' => dirname(dirname(dirname(dirname($dir)))) . '/', 'APP_DIR' => basename($dir) . '/js_composer/', 'CONFIG' => $dir . '/js_composer/config/', 'ASSETS_DIR' => 'assets/', 'COMPOSER' => $dir . '/js_composer/composer/', 'COMPOSER_LIB' => $dir . '/js_composer/composer/lib/', 'SHORTCODES_LIB' => $dir . '/js_composer/composer/lib/shortcodes/', 'default_post_types' => array('page', 'doctors', 'medicenter_gallery', 'features')); require_once locate_template('/wpbakery/js_composer/js_composer.php'); $wpVC_setup->init($composer_settings); //wpb_remove("vc_row_inner"); wpb_remove("vc_gmaps"); //theme options require_once "theme-options.php"; //custom meta box require_once "meta-box.php"; //dropdown menu require_once "nav-menu-dropdown-walker.php"; //gallery functions require_once "gallery-functions.php"; //weekdays require_once "post-type-weekdays.php"; //departments require_once "post-type-departments.php"; //doctors require_once "post-type-doctors.php"; //gallery require_once "post-type-gallery.php"; //features require_once "post-type-features.php"; //contact_form require_once "contact_form.php"; //comments
function register_vc() { $vc_is_wp_version_3_6_more = version_compare(preg_replace('/^([\\d\\.]+)(\\-.*$)/', '$1', get_bloginfo('version')), '3.6') >= 0; //deregister and reregister how we'd like the accordion options to appear wpb_remove('vc_tabs'); wpb_remove('vc_tab'); $tab_id_1 = time() . '-1-' . rand(0, 100); $tab_id_2 = time() . '-2-' . rand(0, 100); wpb_map(array("name" => __("Tabs", 'adap_sc'), "base" => "vc_tabs", "show_settings_on_create" => false, "is_container" => true, "icon" => "icon-wpb-ui-tab-content", "category" => __('Content', 'adap_sc'), "params" => array(array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Tab Heading Color', 'adap_sc'), 'param_name' => 'tab_heading_color', 'value' => null, 'description' => __('The color of the text in tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Tab Heading Background Color', 'adap_sc'), 'param_name' => 'tab_heading_background_color', 'value' => null, 'description' => __('The background color of the tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Active Tab Heading Color', 'adap_sc'), 'param_name' => 'active_tab_heading_color', 'value' => null, 'description' => __('The color of the text in the active tab heading.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Active Tab Heading background Color', 'adap_sc'), 'param_name' => 'active_tab_heading_background_color', 'value' => null, 'description' => __('The background color of the active tab heading.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Hover Tab Heading Color', 'adap_sc'), 'param_name' => 'hover_tab_heading_color', 'value' => null, 'description' => __('The hover color of the text in tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Hover Tab Heading Background Color', 'adap_sc'), 'param_name' => 'hover_tab_heading_background_color', 'value' => null, 'description' => __('The hover background color of the tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Content Color', 'adap_sc'), 'param_name' => 'content_color', 'value' => null, 'description' => __('The color of the content in tabs.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Content Background Color', 'adap_sc'), 'param_name' => 'content_background_color', 'value' => null, 'description' => __('The background color of the tab content.', 'adap_sc'))), "custom_markup" => ' <div class="wpb_tabs_holder wpb_holder vc_container_for_children"> <ul class="tabs_controls"> </ul> %content% </div>', 'default_content' => ' [vc_tab title="' . __('Tab 1', 'adap_sc') . '" tab_id="' . $tab_id_1 . '"][/vc_tab] [vc_tab title="' . __('Tab 2', 'adap_sc') . '" tab_id="' . $tab_id_2 . '"][/vc_tab] ', "js_view" => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35')); /* Tour section ---------------------------------------------------------- */ $tab_id_1 = time() . '-1-' . rand(0, 100); $tab_id_2 = time() . '-2-' . rand(0, 100); // WPBMap::map('vc_tour', array( // "name" => __("Tour Section", 'adap_sc'), // "base" => "vc_tour", // "show_settings_on_create" => false, // "is_container" => true, // "container_not_allowed" => true, // "icon" => "icon-wpb-ui-tab-content-vertical", // "category" => __('Content', 'js_composer'), // "wrapper_class" => "clearfix", // "params" => array(), // "custom_markup" => ' // <div class="wpb_tabs_holder wpb_holder clearfix vc_container_for_children"> // <ul class="tabs_controls"> // </ul> // %content% // </div>' // , // 'default_content' => ' // [vc_tab title="' . __('Slide 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab] // [vc_tab title="' . __('Slide 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab] // ', // "js_view" => ($vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35') // )); wpb_map(array("name" => __("Tab", 'adap_sc'), "base" => "vc_tab", "allowed_container_element" => 'vc_row', "is_container" => true, "content_element" => false, "params" => array(array("type" => "textfield", "heading" => __("Title", 'adap_sc'), "param_name" => "title", "description" => __("Tab title.", 'adap_sc')), array("type" => "tab_id", "heading" => __("Tab ID", 'adap_sc'), "param_name" => "tab_id"), AdapAutoVCShortcode::bool_param('active', 'Display on load', null, null, false)), 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35')); }
function register_vc() { //deregister and reregister how we'd like the accordion options to appear wpb_remove('vc_accordion'); wpb_remove('vc_accordion_tab'); //copy the js_editor declarations and modify the "params" so that //we can have the options we want to appear. We'll use there options when we route to //our own accordion shortcode handler. wpb_map(array("name" => __("Accordion", 'adap_sc'), "base" => "vc_accordion", "show_settings_on_create" => false, "is_container" => true, "icon" => "icon-wpb-ui-accordion", "category" => __('Content', 'adap_sc'), "params" => array(array("type" => "textfield", "heading" => __("Extra class name", 'adap_sc'), "param_name" => "el_class", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'adap_sc')), array("type" => 'checkbox', "heading" => __("Sync Accordion Items", 'adap_sc'), "param_name" => "sync", "description" => __("", 'adap_sc'), "value" => array(__("Sync", 'adap_sc') => 'true')), array('type' => 'dropdown', 'holder' => 'div', 'class' => '', 'heading' => __("Style", 'adap_sc'), 'param_name' => 'style', 'sch_default' => 'normal', 'value' => array('Style #1 (standard with minimal styling)' => 'style1', 'Style #2 (colored block headings)' => 'style2'), 'description' => 'The color of the progress bar.'), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Item Heading Text Color', 'adap_sc'), 'param_name' => 'item_heading_color', 'value' => null, 'description' => __('The text color of accordion item headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Item Heading Background Color', 'adap_sc'), 'param_name' => 'item_heading_background_color', 'value' => null, 'description' => __('The background color of accordion item headings.', 'adap_sc'), "dependency" => array('element' => "style", 'value' => array('style2'))), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Open Item Heading Text Color', 'adap_sc'), 'param_name' => 'open_item_heading_color', 'value' => null, 'description' => __('The text color of open accordion item headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Divider Color', 'adap_sc'), 'param_name' => 'divider_color', 'value' => null, 'description' => __('The color of the divider between each toggle in the accordion.', 'adap_sc'), "dependency" => array('element' => "style", 'value' => array('style1'))), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Open Item Heading Background Color', 'adap_sc'), 'param_name' => 'open_item_heading_background_color', 'value' => null, 'description' => __('The background color of open accordion item headings.', 'adap_sc'), "dependency" => array('element' => "style", 'value' => array('style2'))), array("type" => 'checkbox', "heading" => __("Bold Titles?", 'adap_sc'), "param_name" => "bold_titles", "description" => __("", 'adap_sc'), "value" => array(__("Yes", 'adap_sc') => 'true'))), "custom_markup" => ' <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children"> %content% </div> <div class="tab_controls"> <button class="add_tab" title="' . __("Add accordion section", 'adap_sc') . '">' . __("Add accordion section", 'adap_sc') . '</button> </div> ', 'default_content' => ' [vc_accordion_tab title="' . __('Section 1', 'adap_sc') . '"][/vc_accordion_tab] [vc_accordion_tab title="' . __('Section 2', 'adap_sc') . '"][/vc_accordion_tab] ', 'js_view' => 'VcAccordionView')); wpb_map(array("name" => __("Accordion Section", 'adap_sc'), "base" => "vc_accordion_tab", "allowed_container_element" => 'vc_row', "is_container" => true, "content_element" => false, "params" => array(array("type" => "textfield", "heading" => __("Title", 'adap_sc'), "param_name" => "title", "description" => __("Accordion section title.", 'adap_sc')), array("type" => 'checkbox', "heading" => __("Open on load", 'adap_sc'), "param_name" => "open", "description" => __("", 'adap_sc'), "value" => array(__("Open", 'adap_sc') => 'true'))), 'js_view' => 'VcAccordionTabView')); }