private function action() { add_action('admin_init', array($this, '_actionSetup')); add_action('admin_print_scripts', array(&$this->editor, 'enqueueEditorScripts')); add_action('admin_print_scripts', array($this, 'print_scripts')); add_action('admin_print_scripts', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssets'), 1); $this->medium->setHtmlEditorBackend(array($this, 'htmlOutput')); }
/** * Do shortcode single render point * * @param $atts * @param null $content * @param null $tag * * @return string */ function vc_do_shortcode($atts, $content = null, $tag = null) { return Vc_Shortcodes_Manager::getInstance()->getElementClass($tag)->output($atts, $content); }
vc_lean_map('vc_tabs', null, $vc_config_path . '/deprecated/shortcode-vc-tabs.php'); vc_lean_map('vc_tour', null, $vc_config_path . '/deprecated/shortcode-vc-tour.php'); vc_lean_map('vc_tab', null, $vc_config_path . '/deprecated/shortcode-vc-tab.php'); vc_lean_map('vc_accordion', null, $vc_config_path . '/deprecated/shortcode-vc-accordion.php'); vc_lean_map('vc_accordion_tab', null, $vc_config_path . '/deprecated/shortcode-vc-accordion-tab.php'); vc_lean_map('vc_posts_grid', null, $vc_config_path . '/deprecated/shortcode-vc-posts-grid.php'); vc_lean_map('vc_carousel', null, $vc_config_path . '/deprecated/shortcode-vc-carousel.php'); vc_lean_map('vc_button', null, $vc_config_path . '/deprecated/shortcode-vc-button.php'); vc_lean_map('vc_button2', null, $vc_config_path . '/deprecated/shortcode-vc-button2.php'); vc_lean_map('vc_cta_button', null, $vc_config_path . '/deprecated/shortcode-vc-cta-button.php'); vc_lean_map('vc_cta_button2', null, $vc_config_path . '/deprecated/shortcode-vc-cta-button2.php'); if (is_admin()) { add_action('admin_print_scripts-post.php', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssets'), 1); add_action('admin_print_scripts-post-new.php', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssets'), 1); } elseif (vc_is_page_editable()) { add_action('wp_head', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssetsForEditable')); // @todo where these icons are used in iframe? } // @todo define custom function vc_add_css_animation() { return array('type' => 'dropdown', 'heading' => __('CSS Animation', 'js_composer'), 'param_name' => 'css_animation', 'admin_label' => true, 'value' => array(__('No', 'js_composer') => '', __('Top to bottom', 'js_composer') => 'top-to-bottom', __('Bottom to top', 'js_composer') => 'bottom-to-top', __('Left to right', 'js_composer') => 'left-to-right', __('Right to left', 'js_composer') => 'right-to-left', __('Appear from center', 'js_composer') => 'appear'), 'description' => __('Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).', 'js_composer')); } function vc_target_param_list() { return array(__('Same window', 'js_composer') => '_self', __('New window', 'js_composer') => '_blank'); } function vc_layout_sub_controls() { return array(array('link_post', __('Link to post', 'js_composer')), array('no_link', __('No link', 'js_composer')), array('link_image', __('Link to bigger image', 'js_composer'))); }
/** * Get the instance of Vc_Shortcodes_Manager * * @return self */ public static function getInstance() { if (!self::$_instance instanceof self) { self::$_instance = new self(); } return self::$_instance; }
/** * Set or modify new settings for shortcode. * * This function widely used by WPBMap class methods to modify shortcodes mapping * * @since 4.3 * * @param $tag * @param $name * @param $value */ public function updateShortcodeSetting($tag, $name, $value) { Vc_Shortcodes_Manager::getInstance()->getElementClass($tag)->setSettings($name, $value); }