本文整理汇总了PHP中vc_add_shortcode_param函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_add_shortcode_param函数的具体用法?PHP vc_add_shortcode_param怎么用?PHP vc_add_shortcode_param使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_add_shortcode_param函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mm_vc_countdown
/**
* 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: __construct
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: createShortcode
/**
* 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")))));
}
示例4: __construct
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'));
}
}
}
示例5: __construct
/**
* 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'));
}
示例6: __construct
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__));
}
}
}
示例7: ep_vc_add_custom_fields
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');
}
示例8: edo_add_vc_global_params
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');
}
示例9: __construct
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'));
}
}
}
示例10: __construct
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'));
}
}
}
示例11: __construct
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__));
}
}
}
示例12: __construct
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);
}