コード例 #1
0
ファイル: countdown.php プロジェクト: roosalles/mm-components
/**
 * Visual Composer add-on.
 *
 * @since  1.0.0
 */
function mm_vc_countdown()
{
    // Add a custom param for selecting the date.
    vc_add_shortcode_param('date', 'mm_vc_date_param');
    $timezones = mm_get_timezones_for_vc('mm-countdown');
    vc_map(array('name' => __('Countdown', 'mm-components'), 'base' => 'mm_countdown', 'icon' => MM_COMPONENTS_ASSETS_URL . 'component-icon.png', 'category' => __('Content', 'mm-components'), 'params' => array(array('type' => 'date', 'heading' => __('Date', 'mm-components'), 'param_name' => 'date', 'admin_label' => true, 'value' => '', 'description' => __('Must be in the format MM/DD/YYYY. Example: 12/25/2015 would be Christmas of 2015.', 'mm-components')), array('type' => 'textfield', 'heading' => __('Time', 'mm-components'), 'param_name' => 'time', 'value' => '', 'description' => __('Must be in the format HH:MM:SS. Example: 18:30:00 would be 6:30 PM.', 'mm-components')), array('type' => 'dropdown', 'heading' => __('Time Zone', 'mm-components'), 'param_name' => 'timezone', 'value' => $timezones))));
}
コード例 #2
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('switch_button', array(&$this, 'switch_button_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('switch_button', array(&$this, 'switch_button_settings_field'));
         }
     }
 }
コード例 #3
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('icons_panel', array(&$this, 'iconspanel_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('icons_panel', array(&$this, 'iconspanel_settings_field'));
         }
     }
 }
コード例 #4
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('css3animations', array(&$this, 'css3animations_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('css3animations', array(&$this, 'css3animations_settings_field'));
         }
     }
 }
コード例 #5
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('devicetype_selectors', array(&$this, 'devicetype_selectors_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('devicetype_selectors', array(&$this, 'devicetype_selectors_settings_field'));
         }
     }
 }
コード例 #6
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('background', array(&$this, 'background_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('background', array(&$this, 'background_settings_field'));
         }
     }
 }
コード例 #7
0
 /**
  * Maps vc_table shortcode
  */
 function createShortcode()
 {
     $param_name = $this->getParamName();
     require_once $this->dir . '/lib/vc_table_param.php';
     $script_url = $this->assetURL('js/table_param.js');
     vc_add_shortcode_param($param_name, 'vc_' . $param_name . '_form_field', $script_url);
     vc_add_shortcode_param('table_theme', 'vc_table_theme_form_field');
     require_once $this->dir . '/lib/vc_table_shortcode.php';
     vc_map(array("name" => __("Table", "vc_table_manager"), "base" => "vc_table", "icon" => "icon-wpb-table", "category" => __('Content', "js_composer"), "description" => __('Simple table for your data', 'vc_table_manager'), "params" => array(array("type" => "table_theme", "heading" => __("Theme", "vc_table_manager"), "param_name" => "vc_table_theme", "value" => array(__("Default", "vc_table_manager") => "default", __("Classic", "vc_table_manager") => "classic", __("Classic Orange", "vc_table_manager") => "classic_orange", __("Classic Pink", "vc_table_manager") => "classic_pink", __("Classic Purple", "vc_table_manager") => "classic_purple", __("Classic Blue", "vc_table_manager") => "classic_blue", __("Classic Green", "vc_table_manager") => "classic_green", __("Simple", "vc_table_manager") => "simple", __("Simple Orange", "vc_table_manager") => "simple_orange", __("Simple Pink", "vc_table_manager") => "simple_pink", __("Simple Purple", "vc_table_manager") => "simple_purple", __("Simple Blue", "vc_table_manager") => "simple_blue", __("Simple Green", "vc_table_manager") => "simple_green")), array("type" => $param_name, "holder" => "div", "heading" => __("Table", "vc_table_manager"), "param_name" => "content", "value" => __("", "vc_table_manager"), "description" => __("Use right click to manage table.", "vc_table_manager")), array("type" => 'checkbox', "heading" => __("Allow HTML?", "vc_table_manager"), 'value' => array(__('Yes', 'vc_table_manager') => true), "param_name" => "allow_html", "description" => __("Check if you wish to use html in the table.", "vc_table_manager")), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "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.", "js_composer")))));
 }
コード例 #8
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('fontsmanager', array(&$this, 'fonts_setting_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('fontsmanager', array(&$this, 'fonts_setting_field'));
         }
     }
 }
コード例 #9
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('load_file', array(&$this, 'loadfile_setting_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('load_file', array(&$this, 'loadfile_setting_field'));
         }
     }
 }
コード例 #10
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('hidden_textarea', array(&$this, 'hiddentextarea_setting_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('hidden_textarea', array(&$this, 'hiddentextarea_setting_field'));
         }
     }
 }
コード例 #11
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('social_networks', array(&$this, 'socialnetworks_setting_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('social_networks', array(&$this, 'socialnetworks_setting_field'));
         }
     }
 }
コード例 #12
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('audioselect', array(&$this, 'audioselect_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('audioselect', array(&$this, 'audioselect_settings_field'));
         }
     }
 }
コード例 #13
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('advanced_styling', array($this, 'advanced_styling_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('advanced_styling', array($this, 'advanced_styling_settings_field'));
         }
     }
 }
コード例 #14
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('auto_generate', array(&$this, 'autogenerate_setting_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('auto_generate', array(&$this, 'autogenerate_setting_field'));
         }
     }
 }
コード例 #15
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('messenger', array(&$this, 'messenger_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('messenger', array(&$this, 'messenger_settings_field'));
         }
     }
 }
コード例 #16
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('standardpostcat', array(&$this, 'standardpostcat_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('standardpostcat', array(&$this, 'standardpostcat_settings_field'));
         }
     }
 }
コード例 #17
0
 /**
  * Construction
  */
 function __construct()
 {
     // Stop if VC is not installed
     if (!in_array('js_composer/js_composer.php', apply_filters('active_plugins', get_option('active_plugins')))) {
         return false;
     }
     $this->icons = $this->get_icons();
     vc_add_shortcode_param('icon', array($this, 'icon_param'), THEME_URL . '/js/vc/icon-field.js');
     add_action('vc_before_init', array($this, 'map_shortcodes'));
 }
コード例 #18
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('imagehotspot', array(&$this, 'imagehotspot_settings_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('imagehotspot', array(&$this, 'imagehotspot_settings_field'));
         }
     }
 }
コード例 #19
0
 function __construct()
 {
     if (function_exists('vc_add_shortcode_param')) {
         vc_add_shortcode_param('datetime_picker', array(&$this, 'datetimepicker_setting_field'));
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('datetime_picker', array(&$this, 'datetimepicker_setting_field'));
         }
     }
 }
コード例 #20
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('datetimepicker', array($this, 'datetimepicker'), plugins_url('../admin/js/bootstrap-datetimepicker.min.js', __FILE__));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('datetimepicker', array($this, 'datetimepicker'), plugins_url('../admin/js/bootstrap-datetimepicker.min.js', __FILE__));
         }
     }
 }
コード例 #21
0
ファイル: extend-vc.php プロジェクト: rmilano24/moto
function ep_vc_add_custom_fields()
{
    $dir = get_template_directory_uri();
    // add icon box option for vc
    vc_add_shortcode_param('vc_icons', 'ep_vc_icons_field', $dir . '/extendvc/js/vc_icon.js');
    // add icon box option for vc
    vc_add_shortcode_param('vc_imageselect', 'ep_vc_imageselect_field', $dir . '/extendvc/js/vc_imageselect.js');
    // add range field for vc
    vc_add_shortcode_param('vc_rangefield', 'ep_vc_range_field', $dir . '/extendvc/js/vc_rangefield.js');
    // add checkbox field for vc
    vc_add_shortcode_param('vc_multiselect', 'ep_vc_multi_select', $dir . '/extendvc/js/vc_multiselect.js');
}
コード例 #22
0
ファイル: custom-fields.php プロジェクト: ngocthangict/edo
function edo_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    kt_enqueue_custom_script();
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    vc_add_shortcode_param('edo_number', 'edo_number_settings_field');
    vc_add_shortcode_param('edo_taxonomy', 'edo_taxonomy_settings_field', KUTETHEME_PLUGIN_URL . '/js_composer/js/chosen/chosen.jquery.min.js');
    vc_add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
}
コード例 #23
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('gradient', array(&$this, 'gradient_picker'));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('gradient', array(&$this, 'gradient_picker'));
         }
     }
 }
コード例 #24
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('ult_param_heading', array($this, 'ult_param_heading_callback'));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('ult_param_heading', array($this, 'ult_param_heading_callback'));
         }
     }
 }
コード例 #25
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('ultimate_margins', array($this, 'ultimate_margins_param'), plugins_url('../admin/vc_extend/js/vc-headings-param.js', __FILE__));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('ultimate_margins', array($this, 'ultimate_margins_param'), plugins_url('../admin/vc_extend/js/vc-headings-param.js', __FILE__));
         }
     }
 }
コード例 #26
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('colorpicker_alpha', array($this, 'colorpicker_alpha_gen'));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('colorpicker_alpha', array($this, 'colorpicker_alpha_gen'));
         }
     }
 }
コード例 #27
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('ult_button', array($this, 'button_prev_param'));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('ult_button', array($this, 'button_prev_param'));
         }
     }
 }
コード例 #28
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('number', array(&$this, 'number_settings_field'));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('number', array(&$this, 'number_settings_field'));
         }
     }
 }
コード例 #29
0
 function __construct()
 {
     add_action('admin_enqueue_scripts', array($this, 'ultimate_border_param_scripts'));
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('ultimate_border', array($this, 'ultimate_border_callback'), plugins_url('../admin/vc_extend/js/ultimate-border.js', __FILE__));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('ultimate_border', array($this, 'ultimate_border_callback'), plugins_url('../admin/vc_extend/js/ultimate-border.js', __FILE__));
         }
     }
 }
コード例 #30
0
 function __construct()
 {
     if (defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, 4.8) >= 0) {
         if (function_exists('vc_add_shortcode_param')) {
             vc_add_shortcode_param('ultimate_boxshadow', array($this, 'ultimate_boxshadow_callback'), plugins_url('../admin/vc_extend/js/vc-box-shadow-param.js', __FILE__));
         }
     } else {
         if (function_exists('add_shortcode_param')) {
             add_shortcode_param('ultimate_boxshadow', array($this, 'ultimate_boxshadow_callback'), plugins_url('../admin/vc_extend/js/vc-box-shadow-param.js', __FILE__));
         }
     }
     add_action('admin_enqueue_scripts', array($this, 'ultimate_boxshadow_param_scripts'));
     add_filter('Ultimate_GetBoxShadow', array($this, 'ultimate_get_box_shadow'), 10, 3);
 }