public function setupReminder() { $deactivation_key = $this->deactivation(); if (empty($deactivation_key) && empty($_COOKIE['vchideactivationmsg']) && !vc_is_network_plugin() && !vc_is_updater_disabled()) { add_action('admin_notices', array(&$this, 'adminNoticeLicenseActivation')); } }
public function setTabs() { $this->tabs = array(); if ( $this->showConfigurationTabs() ) { $this->tabs['general'] = __( 'General Settings', 'js_composer' ); } if ( ! vc_is_as_theme() && $this->showConfigurationTabs() ) { $this->tabs['color'] = __( 'Design Options', 'js_composer' ); // $this->tabs['element_css'] = __('Element Class Names', 'js_composer'); $this->tabs['custom_css'] = __( 'Custom CSS', 'js_composer' ); } if ( ! vc_is_network_plugin() || ( vc_is_network_plugin() && is_network_admin() ) ) { if ( ! vc_is_updater_disabled() ) $this->tabs['updater'] = __( 'Product License', 'js_composer' ); } // TODO: may allow to disable automapper if ( ! vc_automapper_is_disabled() ) { $this->tabs['automapper'] = vc_automapper()->title(); } }
/** * Callback function for WP init action hook. Sets Vc mode and loads required objects. * * @since 4.2 * @access public * * @return void */ public function init() { do_action('vc_before_init'); $this->setMode(); do_action('vc_after_set_mode'); /** * Set version of VC if required. */ $this->setVersion(); // Load required !vc_is_updater_disabled() && vc_updater()->init(); /** * Init default hooks and options to load. */ $this->vc()->init(); /** * if is admin and not front end editor. */ is_admin() && !vc_is_frontend_editor() && $this->asAdmin(); /** * if frontend editor is enabled init editor. */ vc_enabled_frontend() && vc_frontend_editor()->init(); do_action('vc_before_mapping'); // VC ACTION // Include default shortcodes. $this->mapper()->init(); //execute all required do_action('vc_after_mapping'); // VC ACTION // Load && Map shortcodes from Automapper. vc_automapper()->map(); if (vc_user_access()->wpAny('manage_options')->part('settings')->can('vc-updater-tab')->get()) { vc_license()->setupReminder(); } do_action('vc_after_init'); }
/** * */ public function setTabs() { $this->tabs = array(); if ($this->showConfigurationTabs()) { $this->tabs['vc-general'] = __('General Settings', 'js_composer'); if (!vc_is_as_theme() && apply_filters('vc_settings_page_show_design_tabs', true)) { $this->tabs['vc-color'] = __('Design Options', 'js_composer'); $this->tabs['vc-custom_css'] = __('Custom CSS', 'js_composer'); } } if (!vc_is_network_plugin() || vc_is_network_plugin() && is_network_admin()) { if (!vc_is_updater_disabled()) { $this->tabs['vc-updater'] = __('Product License', 'js_composer'); } } // TODO: may allow to disable automapper if (!is_network_admin() && !vc_automapper_is_disabled()) { $this->tabs['vc-automapper'] = vc_automapper()->title(); } }
<?php ################################################################################### ## KraftiveComments: Disbale VC front-end editor ## ##################################################################################### if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } vc_set_as_theme(true); //disable auto updates vc_is_updater_disabled(); ################################################################################### ## KraftiveComments: Remove Custom tesaser from page layout ## ##################################################################################### if (is_admin()) { if (!function_exists('folio_remove_vc_custom_teaser')) { function folio_remove_vc_custom_teaser() { $post_types = get_post_types('', 'names'); foreach ($post_types as $post_type) { remove_meta_box('vc_teaser', $post_type, 'side'); } } } add_action('do_meta_boxes', 'folio_remove_vc_custom_teaser'); } ################################################################################### ## KraftiveComments: Remove unnecessory elemnts ## ##################################################################################### if (function_exists("vc_remove_element")) { vc_remove_element("vc_posts_grid");
/** * Callback function for WP init action hook. Sets Vc mode and loads required objects. * * @since 4.2 * @access public * @return void */ public function init() { do_action('vc_before_init'); $this->setMode(); /** * Set version of VC if required. */ $this->setVersion(); // Load required !vc_is_updater_disabled() && vc_updater()->init(); /** * Init default hooks and options to load. */ $this->vc()->init(); /** * if is admin and not front end editor. */ is_admin() && !vc_is_frontend_editor() && $this->asAdmin(); /** * if frontend editor is enabled init editor. */ vc_enabled_frontend() && vc_frontend_editor()->init(); // Load Automapper vc_automapper()->addAjaxActions(); do_action('vc_before_mapping'); // VC ACTION // Include default shortcodes. $this->mapper()->init(); //execute all required do_action('vc_after_mapping'); // VC ACTION // Load && Map shortcodes from Automapper. vc_automapper()->map(); do_action('vc_after_init'); }