本文整理汇总了PHP中wpex_image_crop_locations函数的典型用法代码示例。如果您正苦于以下问题:PHP wpex_image_crop_locations函数的具体用法?PHP wpex_image_crop_locations怎么用?PHP wpex_image_crop_locations使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpex_image_crop_locations函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vcex_terms_grid_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 2.1.0
*/
function vcex_terms_grid_vc_map()
{
vc_map(array('name' => __('Categories Grid', 'wpex'), 'description' => __('Displays a grid of terms', 'wpex'), 'base' => 'vcex_terms_grid', 'category' => WPEX_THEME_BRANDING, 'icon' => 'vcex-terms-grid vcex-icon fa fa-th-large', 'params' => array(array('type' => 'autocomplete', 'heading' => __('Taxonomy', 'wpex'), 'param_name' => 'taxonomy', 'std' => 'category', 'settings' => array('multiple' => false, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true)), array('type' => 'dropdown', 'heading' => __('Parent Terms Only', 'wpex'), 'param_name' => 'parent_terms', 'value' => array(__('No', 'wpex') => false, __('Yes', 'wpex') => true)), array('type' => 'textfield', 'heading' => __('Unique Id', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => __('Custom Classes', 'wpex'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => __('CSS Animation', 'wpex'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => __('Visibility', 'wpex'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => __('Columns', 'wpex'), 'param_name' => 'columns', 'value' => array_flip(wpex_grid_columns()), 'std' => '3', 'edit_field_class' => 'vc_col-sm-4 vc_column clear'), array('type' => 'dropdown', 'heading' => __('Gap', 'wpex'), 'param_name' => 'columns_gap', 'value' => array_flip(wpex_column_gaps()), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Responsive', 'wpex'), 'param_name' => 'columns_responsive', 'value' => array(__('Yes', 'wpex') => '', __('No', 'wpex') => 'false'), 'std' => '', 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Image Size', 'wpex'), 'param_name' => 'img_size', 'std' => 'full', 'value' => vcex_image_sizes(), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Crop Location', 'wpex'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Width', 'wpex'), 'param_name' => 'img_width', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => __('Enter a width in pixels.', 'wpex'), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Height', 'wpex'), 'param_name' => 'img_height', 'description' => __('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'dropdown', 'heading' => __('CSS3 Image Link Hover', 'wpex'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Filter', 'wpex'), 'param_name' => 'img_filter', 'value' => array_flip(wpex_image_filters()), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'title', 'std' => 'true', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Title', 'wpex')), array('type' => 'font_container', 'param_name' => 'title_typo', 'group' => __('Title', 'wpex'), 'settings' => array('fields' => array('tag' => 'span', 'font_size', 'line_height', 'color', 'font_style_italic', 'font_style_bold', 'font_family')), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'description', 'std' => 'true', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Description', 'wpex')), array('type' => 'font_container', 'param_name' => 'description_typo', 'group' => __('Description', 'wpex'), 'settings' => array('fields' => array('font_size', 'line_height', 'color', 'font_style_italic', 'font_style_bold', 'font_family')), 'dependency' => array('element' => 'description', 'value' => 'true')), array('type' => 'css_editor', 'heading' => __('CSS', 'wpex'), 'param_name' => 'entry_css', 'group' => __('Entry CSS', 'wpex')))));
}
示例2: vcex_recent_news_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_recent_news_vc_map()
{
vc_map(array('name' => __('Recent News', 'wpex'), 'description' => __('Recent blog posts', 'wpex'), 'base' => 'vcex_recent_news', 'category' => WPEX_THEME_BRANDING, 'icon' => 'vcex-recent-news vcex-icon fa fa-newspaper-o', 'params' => array(array('type' => 'textfield', 'heading' => __('Unique Id', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => __('Custom Classes', 'wpex'), 'param_name' => 'classes'), array('type' => 'textfield', 'heading' => __('Heading', 'wpex'), 'param_name' => 'header'), array('type' => 'dropdown', 'heading' => __('Columns', 'wpex'), 'param_name' => 'grid_columns', 'std' => '1', 'value' => array_flip(wpex_grid_columns())), array('type' => 'dropdown', 'heading' => __('Visibility', 'wpex'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => __('Appear Animation', 'wpex'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'textfield', 'heading' => __('Post Count', 'wpex'), 'param_name' => 'count', 'value' => '3', 'description' => __('How many posts do you wish to show.', 'wpex'), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Pagination', 'wpex'), 'param_name' => 'pagination', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'description' => __('Important: Pagination will not work on your homepage due to how WordPress Queries function.', 'wpex'), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __('Offset', 'wpex'), 'param_name' => 'offset', 'group' => __('Query', 'wpex'), 'description' => __('Number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The offset parameter is ignored when posts per page is set to -1.', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Limit By Author', 'wpex'), 'param_name' => 'author_in', 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Get Posts From', 'wpex'), 'param_name' => 'get_posts', 'group' => __('Query', 'wpex'), 'std' => 'standard_post_types', 'value' => array(__('Standard Posts', 'wpex') => 'standard_post_types', __('Custom Post types', 'wpex') => 'custom_post_types')), array('type' => 'posttypes', 'heading' => __('Post types', 'wpex'), 'param_name' => 'post_types', 'std' => 'post', 'group' => __('Query', 'wpex'), 'dependency' => array('element' => 'get_posts', 'value' => 'custom_post_types')), array('type' => 'autocomplete', 'heading' => __('Include Categories', 'wpex'), 'param_name' => 'include_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'dependency' => array('element' => 'get_posts', 'value' => 'standard_post_types'), 'group' => __('Query', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Exclude Categories', 'wpex'), 'param_name' => 'exclude_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'dependency' => array('element' => 'get_posts', 'value' => 'standard_post_types'), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Order', 'wpex'), 'param_name' => 'order', 'group' => __('Query', 'wpex'), 'value' => array(__('Default', 'wpex') => '', __('DESC', 'wpex') => 'DESC', __('ASC', 'wpex') => 'ASC')), array('type' => 'dropdown', 'heading' => __('Order By', 'wpex'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Ignore Sticky Posts', 'wpex'), 'param_name' => 'ignore_sticky_posts', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __('Orderby: Meta Key', 'wpex'), 'param_name' => 'orderby_meta_key', 'group' => __('Query', 'wpex'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => __('Display Featured Media?', 'wpex'), 'param_name' => 'featured_image', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'group' => __('Media', 'wpex')), array('type' => 'dropdown', 'heading' => __('Display Featured Videos?', 'wpex'), 'param_name' => 'featured_video', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'featured_image', 'value' => array('true'))), array('type' => 'dropdown', 'heading' => __('Image Size', 'wpex'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'featured_image', 'value' => array('true'))), array('type' => 'dropdown', 'heading' => __('Image Crop Location', 'wpex'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => __('Media', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Width', 'wpex'), 'param_name' => 'img_width', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => __('Media', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Height', 'wpex'), 'param_name' => 'img_height', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => __('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Media', 'wpex')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'title', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Title', 'wpex')), array('type' => 'dropdown', 'heading' => __('HTML Tag', 'wpex'), 'param_name' => 'title_tag', 'value' => array('h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6', 'div' => 'div'), 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Font Weight', 'wpex'), 'param_name' => 'title_weight', 'group' => __('Title', 'wpex'), 'std' => '', 'value' => array_flip(wpex_font_weights()), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Text Transform', 'wpex'), 'param_name' => 'title_transform', 'group' => __('Title', 'wpex'), 'std' => '', 'value' => array_flip(wpex_text_transforms()), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'title_size', 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Line Height', 'wpex'), 'param_name' => 'title_line_height', 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Margin', 'wpex'), 'param_name' => 'title_margin', 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'date', 'value' => array(__('True', 'wpex') => 'true', __('False', 'wpex') => 'false'), 'group' => __('Date', 'wpex')), array('type' => 'colorpicker', 'heading' => __('Month Background', 'wpex'), 'param_name' => 'month_background', 'group' => __('Date', 'wpex'), 'dependency' => array('element' => 'date', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Month Color', 'wpex'), 'param_name' => 'month_color', 'group' => __('Date', 'wpex'), 'dependency' => array('element' => 'date', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Excerpt', 'wpex'), 'param_name' => 'excerpt', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Excerpt', 'wpex')), array('type' => 'textfield', 'heading' => __('Length', 'wpex'), 'param_name' => 'excerpt_length', 'value' => '30', 'description' => __('Enter how many words to display for the excerpt. To display the full post content enter "-1". To display the full post content up to the "more" tag enter "9999".', 'wpex'), 'group' => __('Excerpt', 'wpex'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'excerpt_font_size', 'group' => __('Excerpt', 'wpex'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Color', 'wpex'), 'param_name' => 'excerpt_color', 'group' => __('Excerpt', 'wpex'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'read_more', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Button', 'wpex')), array('type' => 'textfield', 'heading' => __('Text', 'wpex'), 'param_name' => 'read_more_text', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Style', 'wpex'), 'param_name' => 'readmore_style', 'value' => array_flip(wpex_button_styles()), 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Color', 'wpex'), 'param_name' => 'readmore_style_color', 'std' => '', 'value' => array_flip(wpex_button_colors()), 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Arrow', 'wpex'), 'param_name' => 'readmore_rarr', 'value' => array(__('No', 'wpex') => '', __('Yes', 'wpex') => 'true'), 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'readmore_size', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Border Radius', 'wpex'), 'param_name' => 'readmore_border_radius', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Padding', 'wpex'), 'param_name' => 'readmore_padding', 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Margin', 'wpex'), 'param_name' => 'readmore_margin', 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Background', 'wpex'), 'param_name' => 'readmore_background', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Color', 'wpex'), 'param_name' => 'readmore_color', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Background: Hover', 'wpex'), 'param_name' => 'readmore_hover_background', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Color: Hover', 'wpex'), 'param_name' => 'readmore_hover_color', 'group' => __('Button', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true')), array('type' => 'css_editor', 'heading' => __('CSS', 'wpex'), 'param_name' => 'css', 'group' => __('CSS', 'wpex')), array('type' => 'colorpicker', 'heading' => __('Article Bottom Border Color', 'wpex'), 'param_name' => 'entry_bottom_border_color', 'group' => __('CSS', 'wpex')))));
}
示例3: create_admin_page
/**
* Settings page output
*
* @since 2.0.0
*/
public function create_admin_page()
{
?>
<div class="wrap">
<h2><?php
esc_html_e('Image Sizes', 'total');
?>
</h2>
<p><?php
esc_html_e('Define the exact cropping for all the featured images on your site. Leave the width and height empty to display the full image. Set any height to "9999" or empty to disable cropping and simply resize the image to the corresponding width. All image sizes defined below will be added to the list of WordPress image sizes.', 'total');
?>
</p>
<form method="post" action="options.php">
<?php
settings_fields('wpex_image_sizes');
?>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php
esc_html_e('Image Resizing', 'total');
?>
</th>
<td>
<fieldset>
<label>
<input id="wpex_image_resizing" type="checkbox" name="wpex_image_sizes[image_resizing]" <?php
checked(wpex_get_mod('image_resizing', true));
?>
>
<?php
esc_html_e('Enable on the fly image cropping.', 'total');
?>
<p class="description"><?php
esc_html_e('This theme includes an advanced "on the fly" cropping function that uses the safe and native WordPress function "wp_get_image_editor". If enabled whenever you upload a new image it will NOT be cropped into all the different sizes defined below, but rather cropped when loaded on the front-end (cropped once then saved to your uploads directory), thus saving precious server space. However it may conflict with with certain CDN\'s, so you can disable if needed. If disabled you will need to "regenerate your thumbnails".', 'total');
?>
</p>
</label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php
esc_html_e('Retina', 'total');
?>
</th>
<td>
<fieldset>
<label>
<input id="wpex_retina" type="checkbox" name="wpex_image_sizes[retina]" <?php
checked(wpex_get_mod('retina'), true);
?>
> <?php
esc_html_e('Enable retina support for your site (via retina.js).', 'total');
?>
</label>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><?php
esc_html_e('Retina Mode', 'total');
?>
</th>
<?php
$retina_mode = wpex_get_mod('retina_mode', 1);
?>
<td>
<fieldset>
<label>
<select id="wpex_retina_mode" name="wpex_image_sizes[retina_mode]">
<option value="1" <?php
selected($retina_mode, 1, true);
?>
><?php
esc_html_e('Auto search for retina images', 'total');
?>
</option>
<option value="2" <?php
selected($retina_mode, 2, true);
?>
><?php
esc_html_e('Require data-at2x for retina replacement', 'total');
?>
</option>
</select>
</label>
</fieldset>
</td>
</tr>
<?php
// Get sizes & crop locations
$sizes = $this->sizes;
$crop_locations = wpex_image_crop_locations();
?>
//.........这里部分代码省略.........
示例4: wpex_get_post_thumbnail
/**
* Returns correct HTMl for post thumbnails
*
* @since 2.0.0
*/
function wpex_get_post_thumbnail($args = array())
{
// Check if retina is enabled
$retina_img = '';
$attr = array();
// Default args
$defaults = array('attachment' => get_post_thumbnail_id(), 'size' => 'full', 'width' => '', 'height' => '', 'crop' => 'center-center', 'alt' => '', 'class' => '', 'return' => 'html', 'style' => '', 'retina' => wpex_global_obj('retina'), 'schema_markup' => false, 'placeholder' => false);
// Parse args
$args = wp_parse_args($args, $defaults);
// Extract args
extract($args);
// Return dummy image
if ('dummy' == $attachment || $placeholder) {
return '<img src="' . wpex_placeholder_img_src() . '" />';
}
// Return if there isn't any attachment
if (!$attachment) {
return;
}
// Sanitize variables
$size = 'wpex-custom' == $size ? 'wpex_custom' : $size;
$size = 'wpex_custom' == $size ? false : $size;
$crop = !$crop ? 'center-center' : $crop;
$crop = 'true' == $crop ? 'center-center' : $crop;
// Image must have an alt
if (empty($alt)) {
$alt = get_post_meta($attachment, '_wp_attachment_image_alt', true);
}
if (empty($alt)) {
$alt = trim(strip_tags(get_post_field('post_excerpt', $attachment)));
}
if (empty($alt)) {
$alt = trim(strip_tags(get_the_title($attachment)));
$alt = str_replace('_', ' ', $alt);
$alt = str_replace('-', ' ', $alt);
}
// Prettify alt attribute
if ($alt) {
$alt = ucwords($alt);
}
// If image width and height equal '9999' return full image
if ('9999' == $width && '9999' == $height) {
$size = $size ? $size : 'full';
$width = $height = '';
}
// Define crop locations
$crop_locations = array_flip(wpex_image_crop_locations());
// Set crop location if defined in format 'left-top' and turn into array
if ($crop && in_array($crop, $crop_locations)) {
$crop = 'center-center' == $crop ? true : explode('-', $crop);
}
// Get attachment URl
$attachment_url = wp_get_attachment_url($attachment);
// Return if there isn't any attachment URL
if (!$attachment_url) {
return;
}
// Add classes
if ($class) {
$attr['class'] = $class;
}
// Add alt
if ($alt) {
$attr['alt'] = esc_attr($alt);
}
// Add style
if ($style) {
$attr['style'] = $style;
}
// Add schema markup
if ($schema_markup) {
$attr['itemprop'] = 'image';
}
// If on the fly image resizing is enabled or a custom width/height is defined
if (wpex_get_mod('image_resizing', true) || ($width || $height)) {
// Add Classes
if ($class) {
$class = ' class="' . $class . '"';
}
// If size is defined and not equal to wpex_custom
if ($size && 'wpex_custom' != $size) {
$dims = wpex_get_thumbnail_sizes($size);
$width = $dims['width'];
$height = $dims['height'];
$crop = !empty($dims['crop']) ? $dims['crop'] : $crop;
}
// Crop standard image
$image = wpex_image_resize(array('image' => $attachment_url, 'width' => $width, 'height' => $height, 'crop' => $crop));
// Generate retina version
if ($retina) {
$retina_img = wpex_generate_retina_image($attachment_url, $width, $height, $crop);
if ($retina_img) {
$attr['data-at2x'] = $retina_img;
} else {
$attr['data-no-retina'] = '';
//.........这里部分代码省略.........
示例5: vcex_post_type_carousel_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_post_type_carousel_map()
{
return array('name' => esc_html__('Post Types Carousel', 'total'), 'description' => esc_html__('Posts carousel', 'total'), 'base' => 'vcex_post_type_carousel', 'category' => wpex_get_theme_branding(), 'icon' => 'vcex-post-type-carousel vcex-icon fa fa-files-o', 'params' => array(array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => esc_html__('Visibility', 'total'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => esc_html__('Appear Animation', 'total'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => esc_html__('Style', 'total'), 'param_name' => 'style', 'value' => array(__('Default', 'total') => 'default', __('No Margins', 'total') => 'no-margins')), array('type' => 'dropdown', 'heading' => esc_html__('Arrows?', 'total'), 'param_name' => 'arrows', 'value' => array(esc_html__('True', 'total') => 'true', esc_html__('False', 'total') => 'false')), array('type' => 'dropdown', 'heading' => esc_html__('Dots?', 'total'), 'param_name' => 'dots', 'value' => array(esc_html__('False', 'total') => 'false', esc_html__('True', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Items To Display', 'total'), 'param_name' => 'items', 'value' => '4'), array('type' => 'textfield', 'heading' => esc_html__('Items To Scrollby', 'total'), 'param_name' => 'items_scroll', 'value' => '1'), array('type' => 'textfield', 'heading' => esc_html__('Margin Between Items', 'total'), 'param_name' => 'items_margin', 'value' => '15'), array('type' => 'dropdown', 'heading' => esc_html__('Auto Play', 'total'), 'param_name' => 'auto_play', 'value' => array(esc_html__('False', 'total') => 'false', esc_html__('True', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Timeout Duration in milliseconds', 'total'), 'param_name' => 'timeout_duration', 'value' => '5000', 'dependency' => array('element' => 'auto_play', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Infinite Loop', 'total'), 'param_name' => 'infinite_loop', 'value' => array(esc_html__('True', 'total') => 'true', esc_html__('False', 'total') => 'false')), array('type' => 'dropdown', 'heading' => esc_html__('Center Item', 'total'), 'param_name' => 'center', 'value' => array(esc_html__('False', 'total') => 'false', esc_html__('True', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Animation Speed', 'total'), 'param_name' => 'animation_speed', 'value' => '150', 'description' => esc_html__('Default is 150 milliseconds. Enter 0.0 to disable.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Post Count', 'total'), 'param_name' => 'count', 'value' => '8', 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Offset', 'total'), 'param_name' => 'offset', 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('Number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The offset parameter is ignored when posts per page is set to -1.', 'total')), array('type' => 'posttypes', 'heading' => esc_html__('Post types', 'total'), 'param_name' => 'post_types', 'std' => 'post', 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Limit By Post ID\'s', 'total'), 'param_name' => 'posts_in', 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('Seperate by a comma.', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Limit By Author', 'total'), 'param_name' => 'author_in', 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Query by Taxonomy', 'total'), 'param_name' => 'tax_query', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'group' => esc_html__('Query', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Taxonomy Name', 'total'), 'param_name' => 'tax_query_taxonomy', 'dependency' => array('element' => 'tax_query', 'value' => 'true'), 'settings' => array('multiple' => false, 'min_length' => 1, 'groups' => false, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('If you do not see your taxonomy in the dropdown you can still enter the taxonomy name manually.', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Terms', 'total'), 'param_name' => 'tax_query_terms', 'dependency' => array('element' => 'tax_query', 'value' => 'true'), 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('If you do not see your terms in the dropdown you can still enter the term slugs manually seperated by a space.', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Ignore Sticky Posts', 'total'), 'param_name' => 'ignore_sticky_posts', 'value' => array(esc_html__('No', 'total') => '', esc_html__('Yes', 'total') => 'true'), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Order', 'total'), 'param_name' => 'order', 'group' => esc_html__('Query', 'total'), 'value' => array(__('Default', 'total') => 'default', __('DESC', 'total') => 'DESC', __('ASC', 'total') => 'ASC')), array('type' => 'dropdown', 'heading' => esc_html__('Order By', 'total'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Orderby: Meta Key', 'total'), 'param_name' => 'orderby_meta_key', 'group' => esc_html__('Query', 'total'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => esc_html__('Post With Thumbnails Only', 'total'), 'param_name' => 'thumbnail_query', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'media', 'value' => array(esc_html__('Yes', 'total') => 'true', esc_html__('No', 'total') => 'false'), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Links To', 'total'), 'param_name' => 'thumbnail_link', 'value' => array(esc_html__('Default', 'total') => '', esc_html__('Post', 'total') => 'post', esc_html__('Lightbox', 'total') => 'lightbox', esc_html__('None', 'total') => 'none'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'img_size', 'std' => 'full', 'value' => vcex_image_sizes(), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'img_width', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'img_height', 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'dropdown', 'heading' => esc_html__('Overlay Style', 'total'), 'param_name' => 'overlay_style', 'value' => array_flip(wpex_overlay_styles_array()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Overlay Button Text', 'total'), 'param_name' => 'overlay_button_text', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'overlay_style', 'value' => 'hover-button')), array('type' => 'textfield', 'heading' => esc_html__('Overlay Excerpt Length', 'total'), 'param_name' => 'overlay_excerpt_length', 'value' => '15', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'overlay_style', 'value' => 'title-excerpt-hover')), array('type' => 'dropdown', 'heading' => esc_html__('CSS3 Image Link Hover', 'total'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Image Filter', 'total'), 'param_name' => 'img_filter', 'value' => array_flip(wpex_image_filters()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'title', 'value' => array(esc_html__('Yes', 'total') => 'true', esc_html__('No', 'total') => 'false'), 'group' => esc_html__('Title', 'total')), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'content_heading_color', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_heading_size', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Margin', 'total'), 'param_name' => 'content_heading_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Line Height', 'total'), 'param_name' => 'content_heading_line_height', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Font Weight', 'total'), 'param_name' => 'content_heading_weight', 'group' => esc_html__('Title', 'total'), 'std' => '', 'value' => array_flip(wpex_font_weights()), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Text Transform', 'total'), 'param_name' => 'content_heading_transform', 'value' => array_flip(wpex_text_transforms()), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'date', 'value' => array(esc_html__('Yes', 'total') => 'true', esc_html__('No', 'total') => 'false'), 'group' => esc_html__('Date', 'total')), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'date_color', 'group' => esc_html__('Date', 'total'), 'dependency' => array('element' => 'date', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'date_font_size', 'group' => esc_html__('Date', 'total'), 'dependency' => array('element' => 'date', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Margin', 'total'), 'param_name' => 'date_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Date', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'excerpt', 'value' => array(esc_html__('Yes', 'total') => 'true', esc_html__('No', 'total') => 'false'), 'group' => esc_html__('Excerpt', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Length', 'total'), 'param_name' => 'excerpt_length', 'value' => '15', 'description' => esc_html__('Enter how many words to display for the excerpt. To display the full post content enter "-1". To display the full post content up to the "more" tag enter "9999".', 'total'), 'group' => esc_html__('Excerpt', 'total'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_font_size', 'group' => esc_html__('Excerpt', 'total'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => esc_html__('Text Color', 'total'), 'param_name' => 'content_color', 'group' => esc_html__('Excerpt', 'total'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Tablet: Items To Display', 'total'), 'param_name' => 'tablet_items', 'value' => '3', 'group' => esc_html__('Mobile', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Mobile Landscape: Items To Display', 'total'), 'param_name' => 'mobile_landscape_items', 'value' => '2', 'group' => esc_html__('Mobile', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Mobile Portrait: Items To Display', 'total'), 'param_name' => 'mobile_portrait_items', 'value' => '1', 'group' => esc_html__('Mobile', 'total')), array('type' => 'css_editor', 'heading' => esc_html__('Content CSS', 'total'), 'param_name' => 'content_css', 'group' => esc_html__('Content CSS', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Content Alignment', 'total'), 'param_name' => 'content_alignment', 'value' => array(__('Default', 'total') => '', __('Left', 'total') => 'left', __('Right', 'total') => 'right', __('Center', 'total') => 'center'), 'group' => esc_html__('Content CSS', 'total')), array('type' => 'css_editor', 'heading' => esc_html__('Entry CSS', 'total'), 'param_name' => 'entry_css', 'group' => esc_html__('Entry CSS', 'total'))));
}
示例6: vcex_portfolio_carousel_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_portfolio_carousel_vc_map()
{
return array('name' => esc_html__('Portfolio Carousel', 'total'), 'description' => esc_html__('Recent portfolio posts carousel', 'total'), 'base' => 'vcex_portfolio_carousel', 'category' => wpex_get_theme_branding(), 'icon' => 'vcex-portfolio-carousel vcex-icon fa fa-folder-open', 'params' => array(array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => esc_html__('Visibility', 'total'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => esc_html__('Appear Animation', 'total'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => esc_html__('Arrows?', 'total'), 'param_name' => 'arrows', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false')), array('type' => 'dropdown', 'heading' => esc_html__('Dots?', 'total'), 'param_name' => 'dots', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Items To Display', 'total'), 'param_name' => 'items', 'value' => '4'), array('type' => 'textfield', 'heading' => esc_html__('Items To Scrollby', 'total'), 'param_name' => 'items_scroll', 'value' => '1'), array('type' => 'textfield', 'heading' => esc_html__('Margin Between Items', 'total'), 'param_name' => 'items_margin', 'value' => '15'), array('type' => 'dropdown', 'heading' => esc_html__('Auto Play', 'total'), 'param_name' => 'auto_play', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false')), array('type' => 'textfield', 'heading' => esc_html__('Timeout Duration in milliseconds', 'total'), 'param_name' => 'timeout_duration', 'value' => '5000', 'dependency' => array('element' => 'auto_play', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Infinite Loop', 'total'), 'param_name' => 'infinite_loop', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false')), array('type' => 'dropdown', 'heading' => esc_html__('Center Item', 'total'), 'param_name' => 'center', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Animation Speed', 'total'), 'param_name' => 'animation_speed', 'value' => '150', 'description' => esc_html__('Default is 150 milliseconds. Enter 0.0 to disable.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Post Count', 'total'), 'param_name' => 'count', 'value' => '8', 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Offset', 'total'), 'param_name' => 'offset', 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('Number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The offset parameter is ignored when posts per page is set to -1.', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Include Categories', 'total'), 'param_name' => 'include_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => true, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Exclude Categories', 'total'), 'param_name' => 'exclude_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => true, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Order', 'total'), 'param_name' => 'order', 'group' => esc_html__('Query', 'total'), 'value' => array(__('Default', 'total') => '', __('DESC', 'total') => 'DESC', __('ASC', 'total') => 'ASC')), array('type' => 'dropdown', 'heading' => esc_html__('Order By', 'total'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Orderby: Meta Key', 'total'), 'param_name' => 'orderby_meta_key', 'group' => esc_html__('Query', 'total'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'media', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Links To', 'total'), 'param_name' => 'thumbnail_link', 'value' => array(__('Default', 'total') => '', __('Post', 'total') => 'post', __('Lightbox', 'total') => 'lightbox', __('None', 'total') => 'none'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'img_width', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'img_height', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Overlay Style', 'total'), 'param_name' => 'overlay_style', 'value' => array_flip(wpex_overlay_styles_array()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Overlay Button Text', 'total'), 'param_name' => 'overlay_button_text', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'overlay_style', 'value' => 'hover-button')), array('type' => 'textfield', 'heading' => esc_html__('Overlay Excerpt Length', 'total'), 'param_name' => 'overlay_excerpt_length', 'value' => '15', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'overlay_style', 'value' => 'title-excerpt-hover')), array('type' => 'dropdown', 'heading' => esc_html__('CSS3 Image Link Hover', 'total'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'title', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('Title', 'total')), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'content_heading_color', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_heading_size', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Margin', 'total'), 'param_name' => 'content_heading_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Line Height', 'total'), 'param_name' => 'content_heading_line_height', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Font Weight', 'total'), 'param_name' => 'content_heading_weight', 'std' => '', 'value' => array_flip(wpex_font_weights()), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Text Transform', 'total'), 'param_name' => 'content_heading_transform', 'value' => array_flip(wpex_text_transforms()), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'excerpt', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('Excerpt', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Length', 'total'), 'param_name' => 'excerpt_length', 'value' => '30', 'description' => esc_html__('Enter how many words to display for the excerpt. To display the full post content enter "9999".', 'total'), 'group' => esc_html__('Excerpt', 'total'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_font_size', 'group' => esc_html__('Excerpt', 'total'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'content_color', 'group' => esc_html__('Excerpt', 'total'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Style', 'total'), 'param_name' => 'style', 'value' => array(__('Default', 'total') => 'default', __('No Margins', 'total') => 'no-margins'), 'group' => esc_html__('Design', 'total')), array('type' => 'colorpicker', 'heading' => esc_html__('Content Background', 'total'), 'param_name' => 'content_background', 'group' => esc_html__('Design', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Content Alignment', 'total'), 'param_name' => 'content_alignment', 'value' => array_flip(wpex_alignments()), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Margin', 'total'), 'param_name' => 'content_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Padding', 'total'), 'param_name' => 'content_padding', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Opacity', 'total'), 'param_name' => 'content_opacity', 'description' => esc_html__('Enter a value between "0" and "1".', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Border', 'total'), 'param_name' => 'content_border', 'description' => esc_html__('Please use the shorthand format: width style color. Enter 0px or "none" to disable border.', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Tablet: Items To Display', 'total'), 'param_name' => 'tablet_items', 'value' => '3', 'group' => esc_html__('Mobile', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Mobile Landscape: Items To Display', 'total'), 'param_name' => 'mobile_landscape_items', 'value' => '2', 'group' => esc_html__('Mobile', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Mobile Portrait: Items To Display', 'total'), 'param_name' => 'mobile_portrait_items', 'value' => '1', 'group' => esc_html__('Mobile', 'total'))));
}
示例7: vcex_post_type_list_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_post_type_list_vc_map()
{
return array('name' => esc_html__('Post Types List', 'total'), 'description' => esc_html__('Posts list with large featured image', 'total'), 'base' => 'vcex_post_type_list', 'category' => wpex_get_theme_branding(), 'icon' => 'vcex-post-type-grid vcex-icon fa fa-files-o', 'params' => array(array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'description' => esc_html__('Give your main element a unique ID.', 'total'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'description' => esc_html__('Add additonal classes to the main element.', 'total'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => esc_html__('Visibility', 'total'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility()), 'description' => esc_html__('Choose when this module should display.', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Appear Animation', 'total'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations()), 'description' => esc_html__('If the "filter" is enabled animations will be disabled to prevent bugs.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Posts Per Page', 'total'), 'param_name' => 'posts_per_page', 'value' => '12', 'description' => esc_html__('You can enter "-1" to display all posts.', 'total'), 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Offset', 'total'), 'param_name' => 'offset', 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('Number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The offset parameter is ignored when posts per page is set to -1.', 'total')), array('type' => 'posttypes', 'heading' => esc_html__('Post types', 'total'), 'param_name' => 'post_types', 'std' => 'post', 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Limit By Post ID\'s', 'total'), 'param_name' => 'posts_in', 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('Seperate by a comma.', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Limit By Author', 'total'), 'param_name' => 'author_in', 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Query by Taxonomy', 'total'), 'param_name' => 'tax_query', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'group' => esc_html__('Query', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Taxonomy Name', 'total'), 'param_name' => 'tax_query_taxonomy', 'dependency' => array('element' => 'tax_query', 'value' => 'true'), 'settings' => array('multiple' => false, 'min_length' => 1, 'groups' => false, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('If you do not see your taxonomy in the dropdown you can still enter the taxonomy name manually.', 'total')), array('type' => 'autocomplete', 'heading' => esc_html__('Terms', 'total'), 'param_name' => 'tax_query_terms', 'dependency' => array('element' => 'tax_query', 'value' => 'true'), 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => esc_html__('Query', 'total'), 'description' => esc_html__('If you do not see your terms in the dropdown you can still enter the term slugs manually seperated by a space.', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Order', 'total'), 'param_name' => 'order', 'group' => esc_html__('Query', 'total'), 'value' => array(__('Default', 'total') => 'default', __('DESC', 'total') => 'DESC', __('ASC', 'total') => 'ASC')), array('type' => 'dropdown', 'heading' => esc_html__('Order By', 'total'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => esc_html__('Query', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Orderby: Meta Key', 'total'), 'param_name' => 'orderby_meta_key', 'group' => esc_html__('Query', 'total'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => esc_html__('Post With Thumbnails Only', 'total'), 'param_name' => 'thumbnail_query', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Featured Post?', 'total'), 'param_name' => 'featured_post', 'std' => 'true', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('Query', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'featured_post_img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => esc_html__('First Post', 'total'), 'dependency' => array('element' => 'featured_post', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'featured_post_img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('First Post', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'featured_post_img_width', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => esc_html__('Enter a width in pixels.', 'total'), 'group' => esc_html__('First Post', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'featured_post_img_height', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'group' => esc_html__('First Post', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('CSS3 Image Link Hover', 'total'), 'param_name' => 'featured_post_img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => esc_html__('Media', 'total'), 'dependency' => array('First Post' => 'entry_media', 'value' => 'true'))));
}
示例8: vcex_testimonials_grid_vc_map
/**
* Adds the testimonials grid shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_testimonials_grid_vc_map()
{
vc_map(array('name' => __('Testimonials Grid', 'wpex'), 'description' => __('Recent testimonials post grid', 'wpex'), 'base' => 'vcex_testimonials_grid', 'category' => WPEX_THEME_BRANDING, 'icon' => 'vcex-testimonials-grid vcex-icon fa fa-comments-o', 'params' => array(array('type' => 'textfield', 'heading' => __('Unique Id', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => __('Custom Classes', 'wpex'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => __('Visibility', 'wpex'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => __('Appear Animation', 'wpex'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations()), 'dependency' => array('element' => 'filter', 'value' => 'false')), array('type' => 'dropdown', 'heading' => __('Grid Style', 'wpex'), 'param_name' => 'grid_style', 'value' => array(__('Fit Columns', 'wpex') => 'fit_columns', __('Masonry', 'wpex') => 'masonry'), 'edit_field_class' => 'vc_col-sm-3 vc_column clear'), array('type' => 'dropdown', 'heading' => __('Columns', 'wpex'), 'param_name' => 'columns', 'value' => array_flip(wpex_grid_columns()), 'std' => '3', 'edit_field_class' => 'vc_col-sm-3 vc_column'), array('type' => 'dropdown', 'heading' => __('Gap', 'wpex'), 'param_name' => 'columns_gap', 'value' => array_flip(wpex_column_gaps()), 'edit_field_class' => 'vc_col-sm-3 vc_column'), array('type' => 'dropdown', 'heading' => __('Responsive', 'wpex'), 'param_name' => 'columns_responsive', 'value' => array(__('Yes', 'wpex') => 'yes', __('No', 'wpex') => 'false'), 'edit_field_class' => 'vc_col-sm-3 vc_column'), array('type' => 'textfield', 'heading' => __('Posts Per Page', 'wpex'), 'param_name' => 'posts_per_page', 'value' => '-1', 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Pagination', 'wpex'), 'param_name' => 'pagination', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'description' => __('Important: Pagination will not work on your homepage due to how WordPress Queries function.', 'wpex'), 'group' => __('Query', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Include Categories', 'wpex'), 'param_name' => 'include_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Exclude Categories', 'wpex'), 'param_name' => 'exclude_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Order', 'wpex'), 'param_name' => 'order', 'group' => __('Query', 'wpex'), 'value' => array(__('Default', 'wpex') => '', __('DESC', 'wpex') => 'DESC', __('ASC', 'wpex') => 'ASC')), array('type' => 'dropdown', 'heading' => __('Order By', 'wpex'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __('Orderby: Meta Key', 'wpex'), 'param_name' => 'orderby_meta_key', 'group' => __('Query', 'wpex'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'filter', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'group' => __('Filter', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Default Active Category', 'wpex'), 'param_name' => 'filter_active_category', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => false, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Display All Link?', 'wpex'), 'param_name' => 'filter_all_link', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Custom Filter "All" Text', 'wpex'), 'param_name' => 'all_text', 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter_all_link', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Button Style', 'wpex'), 'param_name' => 'filter_button_style', 'value' => array_flip(wpex_button_styles()), 'group' => __('Filter', 'wpex'), 'std' => 'minimal-border', 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Button Color', 'wpex'), 'param_name' => 'filter_button_color', 'std' => '', 'value' => array_flip(wpex_button_colors()), 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Layout Mode', 'wpex'), 'param_name' => 'masonry_layout_mode', 'value' => array(__('Masonry', 'wpex') => 'masonry', __('Fit Rows', 'wpex') => 'fitRows'), 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Custom Filter Speed', 'wpex'), 'param_name' => 'filter_speed', 'description' => __('Default is 0.4 seconds. Enter 0.0 to disable.', 'wpex'), 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Center Filter Links', 'wpex'), 'param_name' => 'center_filter', 'value' => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'yes'), 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'filter_font_size', 'group' => __('Filter', 'wpex'), 'dependency' => array('element' => 'filter', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'entry_media', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Border Radius', 'wpex'), 'param_name' => 'img_border_radius', 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'entry_media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Image Size', 'wpex'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'entry_media', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Image Crop Location', 'wpex'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Width', 'wpex'), 'param_name' => 'img_width', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Height', 'wpex'), 'param_name' => 'img_height', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => __('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Details', 'wpex'), 'param_name' => 'title', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'group' => __('Title', 'wpex')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'title_font_size', 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('HTML Tag', 'wpex'), 'param_name' => 'title_tag', 'group' => __('Title', 'wpex'), 'std' => 'h2', 'value' => array('h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6', 'div' => 'div'), 'dependency' => array('element' => 'title', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Author', 'wpex'), 'param_name' => 'author', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Details', 'wpex')), array('type' => 'dropdown', 'heading' => __('Company', 'wpex'), 'param_name' => 'company', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Details', 'wpex')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'content_font_size', 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __('Excerpt', 'wpex'), 'param_name' => 'excerpt', 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true'), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __('Excerpt Length', 'wpex'), 'param_name' => 'excerpt_length', 'value' => '20', 'dependency' => array('element' => 'excerpt', 'value' => 'true'), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __('Read More', 'wpex'), 'param_name' => 'read_more', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'dependency' => array('element' => 'excerpt', 'value' => 'true'), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __('Read More Text', 'wpex'), 'param_name' => 'read_more_text', 'value' => __('read more', 'wpex'), 'dependency' => array('element' => 'read_more', 'value' => 'true'), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __('Read More Arrow', 'wpex'), 'param_name' => 'read_more_rarr', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'dependency' => array('element' => 'read_more', 'value' => 'true'), 'group' => __('Content', 'wpex')))));
}
示例9: vcex_image_carousel_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_image_carousel_vc_map()
{
return array('name' => esc_html__('Image Carousel', 'total'), 'description' => esc_html__('Image based jQuery carousel', 'total'), 'base' => 'vcex_image_carousel', 'category' => wpex_get_theme_branding(), 'icon' => 'vcex-image-carousel vcex-icon fa fa-picture-o', 'params' => array(array('type' => 'attach_images', 'admin_label' => true, 'heading' => esc_html__('Attach Images', 'total'), 'param_name' => 'image_ids', 'group' => esc_html__('Gallery', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Post Gallery', 'total'), 'param_name' => 'post_gallery', 'group' => esc_html__('Gallery', 'total'), 'description' => esc_html__('Enable to display images from the current post "Image Gallery".', 'total'), 'value' => array(__('No', 'total') => '', __('Yes', 'total') => 'true')), array('type' => 'dropdown', 'admin_label' => true, 'heading' => esc_html__('Randomize Images', 'total'), 'param_name' => 'randomize_images', 'group' => esc_html__('Gallery', 'total'), 'value' => array(__('No', 'total') => '', __('Yes', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => esc_html__('Style', 'total'), 'param_name' => 'style', 'value' => array(__('Default', 'total') => 'default', __('No Margins', 'total') => 'no-margins')), array('type' => 'dropdown', 'heading' => esc_html__('Arrows?', 'total'), 'param_name' => 'arrows', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false')), array('type' => 'dropdown', 'heading' => esc_html__('Dots?', 'total'), 'param_name' => 'dots', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Items To Display', 'total'), 'param_name' => 'items', 'value' => '4'), array('type' => 'textfield', 'heading' => esc_html__('Items To Scrollby', 'total'), 'param_name' => 'items_scroll', 'value' => '1'), array('type' => 'textfield', 'heading' => esc_html__('Margin Between Items', 'total'), 'param_name' => 'items_margin', 'value' => '15'), array('type' => 'dropdown', 'heading' => esc_html__('Auto Play', 'total'), 'param_name' => 'auto_play', 'std' => 'true', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false')), array('type' => 'textfield', 'heading' => esc_html__('Timeout Duration in milliseconds', 'total'), 'param_name' => 'timeout_duration', 'value' => '5000', 'dependency' => array('element' => 'auto_play', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Infinite Loop', 'total'), 'param_name' => 'infinite_loop', 'std' => 'true', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false')), array('type' => 'dropdown', 'heading' => esc_html__('Center Item', 'total'), 'param_name' => 'center', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true')), array('type' => 'textfield', 'heading' => esc_html__('Animation Speed', 'total'), 'param_name' => 'animation_speed', 'value' => '150', 'description' => esc_html__('Default is 150 milliseconds. Enter 0.0 to disable.', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'img_width', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'img_height', 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'dropdown', 'heading' => esc_html__('Rounded Image?', 'total'), 'param_name' => 'rounded_image', 'group' => esc_html__('Image', 'total'), 'value' => array(__('No', 'total') => 'no', __('Yes', 'total') => 'yes')), array('type' => 'dropdown', 'heading' => esc_html__('Overlay Style', 'total'), 'param_name' => 'overlay_style', 'value' => array_flip(wpex_overlay_styles_array()), 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Overlay Button Text', 'total'), 'param_name' => 'overlay_button_text', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'overlay_style', 'value' => 'hover-button')), array('type' => 'dropdown', 'heading' => esc_html__('CSS3 Image Hover', 'total'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Filter', 'total'), 'param_name' => 'img_filter', 'value' => array_flip(wpex_image_filters()), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Link', 'total'), 'param_name' => 'thumbnail_link', 'std' => 'none', 'value' => array(__('None', 'total') => 'none', __('Lightbox', 'total') => 'lightbox', __('Custom Links', 'total') => 'custom_link'), 'group' => esc_html__('Links', 'total')), array('type' => 'exploded_textarea', 'heading' => esc_html__('Custom links', 'total'), 'param_name' => 'custom_links', 'description' => esc_html__('Enter links for each slide here. Divide links with linebreaks (Enter). For images without a link enter a # symbol. And don\'t forget to include the http:// at the front.', 'total'), 'group' => esc_html__('Links', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'custom_link')), array('type' => 'dropdown', 'heading' => esc_html__('Custom link target', 'total'), 'param_name' => 'custom_links_target', 'description' => esc_html__('Select where to open custom links.', 'total'), 'group' => esc_html__('Links', 'total'), 'value' => array(__('Same window', 'total') => 'self', __('New window', 'total') => '_blank'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'custom_link')), array('type' => 'dropdown', 'heading' => esc_html__('Lightbox Skin', 'total'), 'param_name' => 'lightbox_skin', 'std' => '', 'value' => vcex_ilightbox_skins(), 'group' => esc_html__('Links', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'lightbox')), array('type' => 'dropdown', 'heading' => esc_html__('Title', 'total'), 'param_name' => 'title', 'std' => 'no', 'group' => esc_html__('Title', 'total'), 'value' => array(__('No', 'total') => 'no', __('Yes', 'total') => 'yes')), array('type' => 'dropdown', 'heading' => esc_html__('Title Based On Image', 'total'), 'param_name' => 'title_type', 'value' => array(__('Default', 'total') => 'default', __('Title', 'total') => 'title', __('Alt', 'total') => 'alt'), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'content_heading_color', 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => esc_html__('Font Weight', 'total'), 'param_name' => 'content_heading_weight', 'std' => '', 'value' => array_flip(wpex_font_weights()), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => esc_html__('Text Transform', 'total'), 'param_name' => 'content_heading_transform', 'value' => array_flip(wpex_text_transforms()), 'group' => esc_html__('Title', 'total'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_heading_size', 'dependency' => array('element' => 'title', 'value' => 'yes'), 'group' => esc_html__('Title', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Margin', 'total'), 'param_name' => 'content_heading_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => esc_html__('Display Caption', 'total'), 'param_name' => 'caption', 'group' => esc_html__('Caption', 'total'), 'value' => array(__('No', 'total') => 'no', __('Yes', 'total') => 'yes')), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'content_color', 'group' => esc_html__('Caption', 'total'), 'dependency' => array('element' => 'caption', 'value' => 'yes')), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_font_size', 'group' => esc_html__('Caption', 'total'), 'dependency' => array('element' => 'caption', 'value' => 'yes')), array('type' => 'colorpicker', 'heading' => esc_html__('Content Background', 'total'), 'param_name' => 'content_background', 'group' => esc_html__('Design', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Content Alignment', 'total'), 'param_name' => 'content_alignment', 'group' => esc_html__('Design', 'total'), 'value' => array(__('Default', 'total') => '', __('Left', 'total') => 'left', __('Right', 'total') => 'right', __('Center', 'total') => 'center')), array('type' => 'textfield', 'heading' => esc_html__('Content Margin', 'total'), 'param_name' => 'content_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Padding', 'total'), 'param_name' => 'content_padding', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Border', 'total'), 'param_name' => 'content_border', 'description' => esc_html__('Please use the shorthand format: width style color. Enter 0px or "none" to disable border.', 'total'), 'group' => esc_html__('Design', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Tablet: Items To Display', 'total'), 'param_name' => 'tablet_items', 'value' => '3', 'group' => esc_html__('Mobile', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Mobile Landscape: Items To Display', 'total'), 'param_name' => 'mobile_landscape_items', 'value' => '2', 'group' => esc_html__('Mobile', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Mobile Portrait: Items To Display', 'total'), 'param_name' => 'mobile_portrait_items', 'value' => '1', 'group' => esc_html__('Mobile', 'total'))));
}
示例10: vcex_image_grid_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_image_grid_vc_map()
{
vc_map(array('name' => __('Image Grid', 'wpex'), 'description' => __('Responsive image gallery', 'wpex'), 'base' => 'vcex_image_grid', 'icon' => 'vcex-image-grid vcex-icon fa fa-picture-o', 'category' => WPEX_THEME_BRANDING, 'params' => array(array('type' => 'attach_images', 'admin_label' => true, 'heading' => __('Attach Images', 'wpex'), 'param_name' => 'image_ids', 'group' => __('Images', 'wpex'), 'description' => __('Click the plus icon to add images to your gallery. Once images are added they can be drag and dropped for sorting.', 'wpex')), array('type' => 'dropdown', 'heading' => __('Post Gallery', 'wpex'), 'param_name' => 'post_gallery', 'group' => __('Images', 'wpex'), 'description' => __('Enable to display images from the current post "Image Gallery".', 'wpex'), 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true')), array('type' => 'textfield', 'heading' => __('Unique Id', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => __('Custom Classes', 'wpex'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => __('Visibility', 'wpex'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => __('Appear Animation', 'wpex'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => __('Hover Animation', 'wpex'), 'param_name' => 'hover_animation', 'value' => array_flip(wpex_hover_css_animations())), array('type' => 'dropdown', 'heading' => __('Grid Style', 'wpex'), 'param_name' => 'grid_style', 'value' => array(__('Fit Rows', 'wpex') => 'default', __('Masonry', 'wpex') => 'masonry', __('No Margins', 'wpex') => 'no-margins'), 'edit_field_class' => 'vc_col-sm-3 vc_column clear'), array('type' => 'dropdown', 'heading' => __('Columns', 'wpex'), 'param_name' => 'columns', 'std' => '4', 'value' => array_flip(wpex_grid_columns()), 'edit_field_class' => 'vc_col-sm-3 vc_column'), array('type' => 'dropdown', 'heading' => __('Gap', 'wpex'), 'param_name' => 'columns_gap', 'value' => array_flip(wpex_column_gaps()), 'std' => '', 'edit_field_class' => 'vc_col-sm-3 vc_column'), array('type' => 'dropdown', 'heading' => __('Responsive', 'wpex'), 'param_name' => 'responsive_columns', 'std' => '', 'value' => array(__('True', 'wpex') => '', __('False', 'wpex') => 'false'), 'edit_field_class' => 'vc_col-sm-3 vc_column'), array('type' => 'dropdown', 'admin_label' => true, 'heading' => __('Randomize Images', 'wpex'), 'param_name' => 'randomize_images', 'value' => array(__('False', 'wpex') => '', __('True', 'wpex') => 'true')), array('type' => 'textfield', 'admin_label' => true, 'heading' => __('Images Per Page', 'wpex'), 'param_name' => 'posts_per_page', 'value' => '-1', 'description' => __('This will enable pagination for your gallery. Enter -1 or leave blank to display all images without pagination.', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Link', 'wpex'), 'param_name' => 'thumbnail_link', 'std' => 'lightbox', 'value' => array(__('None', 'wpex') => 'none', __('Lightbox', 'wpex') => 'lightbox', __('Attachment Page', 'wpex') => 'attachment_page', __('Custom Links', 'wpex') => 'custom_link'), 'group' => __('Links', 'wpex')), array('type' => 'dropdown', 'heading' => __('Lightbox Skin', 'wpex'), 'param_name' => 'lightbox_skin', 'std' => '', 'value' => vcex_ilightbox_skins(), 'group' => __('Links', 'wpex'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'lightbox')), array('type' => 'dropdown', 'heading' => __('Lightbox Gallery', 'wpex'), 'param_name' => 'lightbox_gallery', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Links', 'wpex'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'lightbox')), array('type' => 'dropdown', 'heading' => __('Lightbox Thumbnails Placement', 'wpex'), 'param_name' => 'lightbox_path', 'value' => array(__('Horizontal', 'wpex') => '', __('Vertical', 'wpex') => 'vertical'), 'group' => __('Links', 'wpex'), 'dependency' => array('element' => 'lightbox_gallery', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Lightbox Title', 'wpex'), 'param_name' => 'lightbox_title', 'value' => array(__('Alt', 'wpex') => '', __('Title', 'wpex') => 'title', __('None', 'wpex') => 'false'), 'group' => __('Links', 'wpex'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'lightbox')), array('type' => 'dropdown', 'heading' => __('Lightbox Caption', 'wpex'), 'param_name' => 'lightbox_caption', 'value' => array(__('Enable', 'wpex') => 'true', __('Disable', 'wpex') => 'false'), 'group' => __('Links', 'wpex'), 'dependency' => array('element' => 'thumbnail_link', 'value' => 'lightbox')), array('type' => 'exploded_textarea', 'heading' => __('Custom links', 'wpex'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter). For images without a link enter a # symbol. And don\'t forget to include the http:// at the front.', 'wpex'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('custom_link')), 'group' => __('Links', 'wpex')), array('type' => 'dropdown', 'heading' => __('Link Target', 'wpex'), 'param_name' => 'custom_links_target', 'group' => __('Links', 'wpex'), 'value' => array(__('Same window', 'wpex') => '_self', __('New window', 'wpex') => '_blank'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('custom_link'))), array('type' => 'dropdown', 'heading' => __('Image Size', 'wpex'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Crop Location', 'wpex'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Image Crop Width', 'wpex'), 'param_name' => 'img_width', 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => __('Image Crop Height', 'wpex'), 'param_name' => 'img_height', 'description' => __('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'dropdown', 'heading' => __('Rounded Image?', 'wpex'), 'param_name' => 'rounded_image', 'value' => array(__('No', 'wpex') => '', __('Yes', 'wpex') => 'yes'), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Overlay Style', 'wpex'), 'param_name' => 'overlay_style', 'value' => array_flip(wpex_overlay_styles_array()), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __('Overlay Button Text', 'wpex'), 'param_name' => 'overlay_button_text', 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'overlay_style', 'value' => 'hover-button')), array('type' => 'dropdown', 'heading' => __('CSS3 Image Hover', 'wpex'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Filter', 'wpex'), 'param_name' => 'img_filter', 'value' => array_flip(wpex_image_filters()), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'title', 'std' => '', 'value' => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'yes'), 'group' => __('Title', 'wpex')), array('type' => 'dropdown', 'heading' => __('Tag', 'wpex'), 'param_name' => 'title_tag', 'value' => array(__('Default', 'wpex') => '', 'h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'div' => 'div'), 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => __('Based On', 'wpex'), 'param_name' => 'title_type', 'value' => array(__('Default', 'wpex') => '', __('Title', 'wpex') => 'title', __('Alt', 'wpex') => 'alt', __('Caption', 'wpex') => 'caption', __('Description', 'wpex') => 'description'), 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'colorpicker', 'heading' => __('Color', 'wpex'), 'param_name' => 'title_color', 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'title_size', 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'textfield', 'heading' => __('Line Height', 'wpex'), 'param_name' => 'title_line_height', 'group' => __('Title', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'textfield', 'heading' => __('Margin', 'wpex'), 'param_name' => 'title_margin', 'group' => __('Title', 'wpex'), 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => __('Font Weight', 'wpex'), 'param_name' => 'title_weight', 'group' => __('Title', 'wpex'), 'std' => '', 'value' => array_flip(wpex_font_weights()), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => __('Text Transform', 'wpex'), 'param_name' => 'title_transform', 'group' => __('Title', 'wpex'), 'std' => '', 'value' => array_flip(wpex_text_transforms()), 'dependency' => array('element' => 'title', 'value' => 'yes')), array('type' => 'css_editor', 'heading' => __('Entry CSS', 'wpex'), 'param_name' => 'entry_css', 'group' => __('Entry CSS', 'wpex')), array('type' => 'css_editor', 'heading' => __('Wrap CSS', 'wpex'), 'param_name' => 'css', 'group' => __('Container CSS', 'wpex')))));
}
示例11: vcex_woocommerce_carousel_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_woocommerce_carousel_vc_map()
{
vc_map(array('name' => __('WooCommerce Carousel', 'wpex'), 'description' => __('Recent woocommerce posts carousel', 'wpex'), 'base' => 'vcex_woocommerce_carousel', 'category' => WPEX_THEME_BRANDING, 'icon' => 'vcex-woocommerce-carousel vcex-icon fa fa-shopping-cart', 'params' => array(array('type' => 'textfield', 'heading' => __('Unique Id', 'wpex'), 'description' => __('Give your main element a unique ID.', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => __('Custom Classes', 'wpex'), 'description' => __('Add additonal classes to the main element.', 'wpex'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => __('Visibility', 'wpex'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => __('Appear Animation', 'wpex'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => __('Arrows?', 'wpex'), 'param_name' => 'arrows', 'value' => array(__('True', 'wpex') => 'true', __('False', 'wpex') => 'false')), array('type' => 'dropdown', 'heading' => __('Dots?', 'wpex'), 'param_name' => 'dots', 'value' => array(__('False', 'wpex') => 'false', __('True', 'wpex') => 'true')), array('type' => 'textfield', 'heading' => __('Items To Display', 'wpex'), 'param_name' => 'items', 'value' => '4'), array('type' => 'textfield', 'heading' => __('Items To Scrollby', 'wpex'), 'param_name' => 'items_scroll', 'value' => '1'), array('type' => 'textfield', 'heading' => __('Margin Between Items', 'wpex'), 'param_name' => 'items_margin', 'value' => '15'), array('type' => 'dropdown', 'heading' => __('Auto Play', 'wpex'), 'param_name' => 'auto_play', 'value' => array(__('True', 'wpex') => 'true', __('False', 'wpex') => 'false')), array('type' => 'textfield', 'heading' => __('Timeout Duration in milliseconds', 'wpex'), 'param_name' => 'timeout_duration', 'value' => '5000', 'dependency' => array('element' => 'auto_play', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Infinite Loop', 'wpex'), 'param_name' => 'infinite_loop', 'value' => array(__('True', 'wpex') => 'true', __('False', 'wpex') => 'false')), array('type' => 'dropdown', 'heading' => __('Center Item', 'wpex'), 'param_name' => 'center', 'value' => array(__('False', 'wpex') => 'false', __('True', 'wpex') => 'true')), array('type' => 'textfield', 'heading' => __('Animation Speed', 'wpex'), 'param_name' => 'animation_speed', 'value' => '150', 'description' => __('Default is 150 milliseconds. Enter 0.0 to disable.', 'wpex')), array('type' => 'textfield', 'heading' => __('Post Count', 'wpex'), 'param_name' => 'count', 'value' => '8', 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Featured Products Only', 'wpex'), 'param_name' => 'featured_products_only', 'group' => __('Query', 'wpex'), 'value' => array(__('False', 'wpex') => '', __('True', 'wpex') => true)), array('type' => 'dropdown', 'heading' => __('Exclude Out of Stock Products', 'wpex'), 'param_name' => 'exclude_products_out_of_stock', 'group' => __('Query', 'wpex'), 'value' => array(__('False', 'wpex') => '', __('True', 'wpex') => true)), array('type' => 'autocomplete', 'heading' => __('Include Categories', 'wpex'), 'param_name' => 'include_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => true, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Exclude Categories', 'wpex'), 'param_name' => 'exclude_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => true, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Order', 'wpex'), 'param_name' => 'order', 'group' => __('Query', 'wpex'), 'value' => array(__('Default', 'wpex') => '', __('DESC', 'wpex') => 'DESC', __('ASC', 'wpex') => 'ASC')), array('type' => 'dropdown', 'heading' => __('Order By', 'wpex'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __('Orderby: Meta Key', 'wpex'), 'param_name' => 'orderby_meta_key', 'group' => __('Query', 'wpex'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => __('Image Links To', 'wpex'), 'param_name' => 'thumbnail_link', 'value' => array(__('Default', 'wpex') => '', __('Post', 'wpex') => 'post', __('Lightbox', 'wpex') => 'lightbox', __('None', 'wpex') => 'none'), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Size', 'wpex'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Crop Location', 'wpex'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => __('Image Crop Width', 'wpex'), 'param_name' => 'img_width', 'description' => __('Enter a width in pixels.', 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => __('Image Crop Height', 'wpex'), 'param_name' => 'img_height', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'description' => __('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Image Filter', 'wpex'), 'param_name' => 'img_filter', 'value' => array_flip(wpex_image_filters()), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('CSS3 Image Hover', 'wpex'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __('Display Title', 'wpex'), 'param_name' => 'title', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Title', 'wpex')), array('type' => 'colorpicker', 'heading' => __('Color', 'wpex'), 'param_name' => 'content_heading_color', 'group' => __('Title', 'wpex')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'content_heading_size', 'description' => __('You can use em or px values, but you must define them.', 'wpex'), 'group' => __('Title', 'wpex')), array('type' => 'textfield', 'heading' => __('Margin', 'wpex'), 'param_name' => 'content_heading_margin', 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'group' => __('Title', 'wpex')), array('type' => 'textfield', 'heading' => __('Line Height', 'wpex'), 'param_name' => 'content_heading_line_height', 'description' => __('Enter a numerical, pixel or percentage value.', 'wpex'), 'group' => __('Title', 'wpex')), array('type' => 'dropdown', 'heading' => __('Font Weight', 'wpex'), 'param_name' => 'content_heading_weight', 'description' => __('Note: Not all font families support every font weight.', 'wpex'), 'std' => '', 'value' => array_flip(wpex_font_weights()), 'group' => __('Title', 'wpex')), array('type' => 'dropdown', 'heading' => __('Text Transform', 'wpex'), 'param_name' => 'content_heading_transform', 'value' => array_flip(wpex_text_transforms()), 'group' => __('Title', 'wpex')), array('type' => 'dropdown', 'heading' => __('Display Price', 'wpex'), 'param_name' => 'price', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Price', 'wpex')), array('type' => 'colorpicker', 'heading' => __('Color', 'wpex'), 'param_name' => 'content_color', 'group' => __('Price', 'wpex')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'content_font_size', 'group' => __('Price', 'wpex'), 'description' => __('You can use em or px values, but you must define them.', 'wpex')), array('type' => 'dropdown', 'heading' => __('Style', 'wpex'), 'param_name' => 'style', 'value' => array(__('Default', 'wpex') => 'default', __('No Margins', 'wpex') => 'no-margins'), 'group' => __('Design', 'wpex')), array('type' => 'colorpicker', 'heading' => __('Content Background', 'wpex'), 'param_name' => 'content_background', 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Content Alignment', 'wpex'), 'param_name' => 'content_alignment', 'value' => array_flip(wpex_alignments()), 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __('Content Margin', 'wpex'), 'param_name' => 'content_margin', 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __('Content Padding', 'wpex'), 'param_name' => 'content_padding', 'description' => __('Please use the following format: top right bottom left.', 'wpex'), 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __('Content Border', 'wpex'), 'param_name' => 'content_border', 'description' => __('Please use the shorthand format: width style color. Enter 0px or "none" to disable border.', 'wpex'), 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __('Tablet: Items To Display', 'wpex'), 'param_name' => 'tablet_items', 'value' => '3', 'group' => __('Mobile', 'wpex')), array('type' => 'textfield', 'heading' => __('Mobile Landscape: Items To Display', 'wpex'), 'param_name' => 'mobile_landscape_items', 'value' => '2', 'group' => __('Mobile', 'wpex')), array('type' => 'textfield', 'heading' => __('Mobile Portrait: Items To Display', 'wpex'), 'param_name' => 'mobile_portrait_items', 'value' => '1', 'group' => __('Mobile', 'wpex')), array('type' => 'hidden', 'param_name' => 'entry_output'))));
}
示例12: vcex_feature_box_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_feature_box_vc_map()
{
return array('name' => esc_html__('Feature Box', 'total'), 'description' => esc_html__('A feature content box', 'total'), 'base' => 'vcex_feature_box', 'category' => wpex_get_theme_branding(), 'icon' => 'vcex-feature-box vcex-icon fa fa-trophy', 'params' => array(array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => esc_html__('Visibility', 'total'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => esc_html__('Appear Animation', 'total'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => esc_html__('Style', 'total'), 'param_name' => 'style', 'value' => array(__('Left Content - Right Image', 'total') => 'left-content-right-image', __('Left Image - Right Content', 'total') => 'left-image-right-content')), array('type' => 'dropdown', 'heading' => esc_html__('Alignment', 'total'), 'param_name' => 'text_align', 'value' => array(__('Default', 'total') => '', __('Center', 'total') => 'center', __('Left', 'total') => 'left', __('Right', 'total') => 'right')), array('type' => 'textfield', 'heading' => esc_html__('Padding', 'total'), 'param_name' => 'padding', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Border', 'total'), 'description' => esc_html__('Please use the shorthand format: width style color. Enter 0px or "none" to disable border.', 'total'), 'param_name' => 'border'), array('type' => 'colorpicker', 'heading' => esc_html__('Background', 'total'), 'param_name' => 'background'), array('type' => 'textfield', 'heading' => esc_html__('Heading', 'total'), 'param_name' => 'heading', 'value' => 'Sample Heading', 'group' => esc_html__('Heading', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('HTML Tag', 'total'), 'param_name' => 'heading_type', 'group' => esc_html__('Heading', 'total'), 'value' => array('h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', __('h5', 'total') => 'h5', 'div' => 'div'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'vc_link', 'heading' => esc_html__('Link', 'total'), 'param_name' => 'heading_url', 'group' => esc_html__('Heading', 'total'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => esc_html__('Font Family', 'total'), 'param_name' => 'heading_font_family', 'std' => '', 'value' => vcex_fonts_array(), 'group' => esc_html__('Heading', 'total')), array('type' => 'colorpicker', 'heading' => esc_html__('Heading Color', 'total'), 'param_name' => 'heading_color', 'group' => esc_html__('Heading', 'total'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => esc_html__('Font Weight', 'total'), 'param_name' => 'heading_weight', 'std' => '', 'value' => array_flip(wpex_font_weights()), 'group' => esc_html__('Heading', 'total'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => esc_html__('Heading Text Transform', 'total'), 'param_name' => 'heading_transform', 'group' => esc_html__('Heading', 'total'), 'value' => array_flip(wpex_text_transforms()), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'heading_size', 'group' => esc_html__('Heading', 'total'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'textfield', 'heading' => esc_html__('Letter Spacing', 'total'), 'param_name' => 'heading_letter_spacing', 'group' => esc_html__('Heading', 'total'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'textfield', 'heading' => esc_html__('Margin', 'total'), 'param_name' => 'heading_margin', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Heading', 'total'), 'dependency' => array('element' => 'heading', 'not_empty' => true)), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => esc_html__('Content', 'total'), 'param_name' => 'content', 'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'group' => esc_html__('Content', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Padding', 'total'), 'param_name' => 'content_padding', 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Content', 'total'), 'dependency' => array('element' => 'content', 'not_empty' => true)), array('type' => 'textfield', 'heading' => esc_html__('Font Size', 'total'), 'param_name' => 'content_font_size', 'group' => esc_html__('Content', 'total'), 'dependency' => array('element' => 'content', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => esc_html__('Font Weight', 'total'), 'param_name' => 'content_font_weight', 'std' => '', 'value' => array_flip(wpex_font_weights()), 'group' => esc_html__('Content', 'total'), 'dependency' => array('element' => 'content', 'not_empty' => true)), array('type' => 'colorpicker', 'heading' => esc_html__('Background', 'total'), 'param_name' => 'content_background', 'group' => esc_html__('Content', 'total'), 'dependency' => array('element' => 'content', 'not_empty' => true)), array('type' => 'colorpicker', 'heading' => esc_html__('Color', 'total'), 'param_name' => 'content_color', 'group' => esc_html__('Content', 'total'), 'dependency' => array('element' => 'content', 'not_empty' => true)), array('type' => 'attach_image', 'heading' => esc_html__('Image', 'total'), 'param_name' => 'image', 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Equal Heights?', 'total'), 'param_name' => 'equal_heights', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'description' => esc_html__('Keeps the image column the same height as your content.', 'total'), 'group' => esc_html__('Image', 'total')), array('type' => 'vc_link', 'heading' => esc_html__('Image URL', 'total'), 'param_name' => 'image_url', 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Lightbox Type', 'total'), 'param_name' => 'image_lightbox', 'group' => esc_html__('Image', 'total'), 'value' => array(__('None', 'total') => '', __('Self', 'total') => 'image', __('URL', 'total') => 'url', __('Auto Detect - slow', 'total') => 'auto-detect', __('Video', 'total') => 'video_embed', __('HTML5', 'total') => 'html5', __('Quicktime', 'total') => 'quicktime')), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Width', 'total'), 'param_name' => 'img_width', 'description' => esc_html__('Enter a width in pixels.', 'total'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Height', 'total'), 'param_name' => 'img_height', 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Border Radius', 'total'), 'param_name' => 'img_border_radius', 'description' => esc_html__('Please enter a px value.', 'total'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => esc_html__('CSS3 Image Hover', 'total'), 'param_name' => 'img_hover_style', 'value' => array_flip(wpex_image_hovers()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => esc_html__('Image Filter', 'total'), 'param_name' => 'img_filter', 'value' => array_flip(wpex_image_filters()), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array('type' => 'textfield', 'heading' => esc_html__('Video link', 'total'), 'param_name' => 'video', 'description' => esc_html__('Enter a URL that is compatible with WP\'s built-in oEmbed feature. ', 'total'), 'group' => esc_html__('Video', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Content Width', 'total'), 'param_name' => 'content_width', 'value' => '50%', 'group' => esc_html__('Widths', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Width', 'total'), 'param_name' => 'media_width', 'value' => '50%', 'group' => esc_html__('Widths', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Tablet Widths', 'total'), 'param_name' => 'tablet_widths', 'group' => esc_html__('Widths', 'total'), 'value' => array(__('Inherit', 'total') => '', __('Full-Width', 'total') => 'fullwidth')), array('type' => 'dropdown', 'heading' => esc_html__('Phone Widths', 'total'), 'param_name' => 'phone_widths', 'group' => esc_html__('Widths', 'total'), 'value' => array(__('Inherit', 'total') => '', __('Full-Width', 'total') => 'fullwidth'))));
}
示例13: vcex_image_galleryslider_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_image_galleryslider_vc_map()
{
return array('name' => esc_html__('Gallery Slider', 'total'), 'description' => esc_html__('Image slider with thumbnail navigation', 'total'), 'base' => 'vcex_image_galleryslider', 'category' => wpex_get_theme_branding(), 'icon' => 'vcex-image-gallery-slider vcex-icon fa fa-picture-o', 'params' => array(array('type' => 'attach_images', 'admin_label' => true, 'heading' => esc_html__('Attach Images', 'total'), 'param_name' => 'image_ids', 'description' => esc_html__('You can display captions by giving your images a caption and you can also display videos by adding an image that has a Video URL defined for it.', 'total'), 'group' => esc_html__('Images', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Post Gallery', 'total'), 'param_name' => 'post_gallery', 'group' => esc_html__('Images', 'total'), 'description' => esc_html__('Enable to display images from the current post "Image Gallery".', 'total'), 'value' => array(__('No', 'total') => '', __('Yes', 'total') => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Visibility', 'total'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility()), 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Randomize', 'total'), 'param_name' => 'randomize', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'group' => esc_html__('General', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'param_name' => 'unique_id', 'group' => esc_html__('General', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'param_name' => 'classes', 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Animation', 'total'), 'param_name' => 'animation', 'value' => array(__('Slide', 'total') => 'slide', __('Fade', 'total') => 'fade_slides'), 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Loop', 'total'), 'param_name' => 'loop', 'value' => array(__('No', 'total') => '', __('Yes', 'total') => 'true'), 'group' => esc_html__('General', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Auto Height Animation', 'total'), 'std' => '500', 'param_name' => 'height_animation', 'group' => esc_html__('General', 'total'), 'description' => esc_html__('You can enter "0.0" to disable the animation completely.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Animation Speed', 'total'), 'param_name' => 'animation_speed', 'std' => '600', 'description' => esc_html__('Enter a value in milliseconds.', 'total'), 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Auto Play', 'total'), 'param_name' => 'slideshow', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'description' => esc_html__('Enable automatic slideshow? Disabled in front-end composer to prevent page "jumping".', 'total'), 'group' => esc_html__('General', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Auto Play Delay', 'total'), 'param_name' => 'slideshow_speed', 'std' => '5000', 'description' => esc_html__('Enter a value in milliseconds.', 'total'), 'group' => esc_html__('General', 'total'), 'dependency' => array('element' => 'slideshow', 'value' => 'true')), array('type' => 'dropdown', 'heading' => esc_html__('Arrows', 'total'), 'param_name' => 'direction_nav', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Arrows on Hover', 'total'), 'param_name' => 'direction_nav_hover', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Dot Navigation', 'total'), 'param_name' => 'control_nav', 'value' => array(__('Yes', 'total') => 'true', __('No', 'total') => 'false'), 'group' => esc_html__('General', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'img_width', 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'img_height', 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Columns', 'total'), 'param_name' => 'thumbnails_columns', 'std' => '', 'description' => esc_html__('This specific slider displays the thumbnails in "rows" if you want your thumbnails displayed under the slider as a carousel, use the "Image Slider" module instead.', 'total'), 'group' => esc_html__('Thumbnails', 'total'), 'value' => array(__('Default', 'total') => '', '6' => '6', '5' => '5', '4' => '4', '3' => '3', '2' => '2')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'img_thumb_width', 'value' => '', 'description' => esc_html__('Enter a width in pixels for your thumbnail image width. This won\'t increase the grid, its only used so you can alter the cropping to your preferred proportions.', 'total'), 'group' => esc_html__('Thumbnails', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'img_thumb_height', 'value' => '', 'description' => esc_html__('Enter a width in pixels for your thumbnail image height.', 'total'), 'group' => esc_html__('Thumbnails', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Enable', 'total'), 'param_name' => 'caption', 'value' => array(__('No', 'total') => 'false', __('Yes', 'total') => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Based On', 'total'), 'param_name' => 'caption_type', 'std' => 'caption', 'value' => array(__('Title', 'total') => 'title', __('Caption', 'total') => 'caption', __('Description', 'total') => 'description', __('Alt', 'total') => 'alt'), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Visibility', 'total'), 'param_name' => 'caption_visibility', 'value' => array_flip(wpex_visibility()), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Style', 'total'), 'param_name' => 'caption_style', 'value' => array(__('Black', 'total') => 'black', __('White', 'total') => 'white'), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Rounded?', 'total'), 'param_name' => 'caption_rounded', 'value' => array(__('No', 'total') => '', __('Yes', 'total') => 'true'), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Position', 'total'), 'param_name' => 'caption_position', 'std' => 'bottomCenter', 'value' => array(__('Bottom Center', 'total') => 'bottomCenter', __('Bottom Left', 'total') => 'bottomLeft', __('Bottom Right', 'total') => 'bottomRight', __('Top Center', 'total') => 'topCenter', __('Top Left', 'total') => 'topLeft', __('Top Right', 'total') => 'topRight', __('Center Center', 'total') => 'centerCenter', __('Center Left', 'total') => 'centerLeft', __('Center Right', 'total') => 'centerRight'), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Show Transition', 'total'), 'param_name' => 'caption_show_transition', 'std' => 'up', 'value' => array(__('None', 'total') => 'false', __('Up', 'total') => 'up', __('Down', 'total') => 'down', __('Left', 'total') => 'left', __('Right', 'total') => 'right'), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Hide Transition', 'total'), 'param_name' => 'caption_hide_transition', 'std' => 'down', 'value' => array(__('None', 'total') => 'false', __('Up', 'total') => 'up', __('Down', 'total') => 'down', __('Left', 'total') => 'left', __('Right', 'total') => 'right'), 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Width', 'total'), 'param_name' => 'caption_width', 'dependency' => array('element' => 'caption', 'value' => 'true'), 'value' => '100%', 'description' => esc_html__('Enter a pixel or percentage value. You can also enter "auto" for content dependent width.', 'total'), 'group' => esc_html__('Caption', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Font-Size', 'total'), 'param_name' => 'caption_font_size', 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Padding', 'total'), 'param_name' => 'caption_padding', 'dependency' => array('element' => 'caption', 'value' => 'true'), 'description' => esc_html__('Please use the following format: top right bottom left.', 'total'), 'group' => esc_html__('Caption', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Horizontal Offset', 'total'), 'param_name' => 'caption_horizontal', 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total'), 'description' => esc_html__('Please enter a px value.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Vertical Offset', 'total'), 'param_name' => 'caption_vertical', 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total'), 'description' => esc_html__('Please enter a px value.', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Delay', 'total'), 'param_name' => 'caption_delay', 'std' => '500', 'dependency' => array('element' => 'caption', 'value' => 'true'), 'group' => esc_html__('Caption', 'total'), 'description' => esc_html__('Enter a value in milliseconds.', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Link', 'total'), 'param_name' => 'thumbnail_link', 'value' => array(__('None', 'total') => 'none', __('Lightbox', 'total') => 'lightbox', __('Custom Links', 'total') => 'custom_link'), 'group' => esc_html__('Links', 'total')), array('type' => 'exploded_textarea', 'heading' => esc_html__('Custom links', 'total'), 'param_name' => 'custom_links', 'description' => esc_html__('Enter links for each slide here. Divide links with linebreaks (Enter). For images without a link enter a # symbol.', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('custom_link')), 'group' => esc_html__('Links', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Custom link target', 'total'), 'param_name' => 'custom_links_target', 'dependency' => array('element' => 'thumbnail_link', 'value' => 'custom_link'), 'value' => array(__('Same window', 'total') => 'self', __('New window', 'total') => '_blank'), 'group' => esc_html__('Links', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Lightbox Skin', 'total'), 'param_name' => 'lightbox_skin', 'value' => vcex_ilightbox_skins(), 'group' => esc_html__('Links', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('lightbox'))), array('type' => 'dropdown', 'heading' => esc_html__('Lightbox Thumbnails Placement', 'total'), 'param_name' => 'lightbox_path', 'value' => array(__('Horizontal', 'total') => 'horizontal', __('Vertical', 'total') => 'vertical'), 'group' => esc_html__('Links', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('lightbox'))), array('type' => 'dropdown', 'heading' => esc_html__('Lightbox Title', 'total'), 'param_name' => 'lightbox_title', 'value' => array(__('None', 'total') => 'none', __('Alt', 'total') => 'alt', __('Title', 'total') => 'title'), 'group' => esc_html__('Links', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('lightbox'))), array('type' => 'dropdown', 'heading' => esc_html__('Lightbox Caption', 'total'), 'param_name' => 'lightbox_caption', 'value' => array(__('Enable', 'total') => 'enable', __('Disable', 'total') => 'false'), 'group' => esc_html__('Links', 'total'), 'dependency' => array('element' => 'thumbnail_link', 'value' => array('lightbox'))), array('type' => 'css_editor', 'heading' => esc_html__('CSS', 'total'), 'param_name' => 'css', 'group' => esc_html__('Design', 'total'))));
}
示例14: vcex_testimonials_slider_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_testimonials_slider_vc_map()
{
vc_map(array('name' => __('Testimonials Slider', 'wpex'), 'description' => __('Recent testimonials slider', 'wpex'), 'base' => 'vcex_testimonials_slider', 'category' => WPEX_THEME_BRANDING, 'icon' => 'vcex-testimonials-slider vcex-icon fa fa-comments-o', 'params' => array(array('type' => 'textfield', 'heading' => __('Unique Id', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => __('Custom Classes', 'wpex'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => __('Visibility', 'wpex'), 'param_name' => 'visibility', 'value' => array_flip(wpex_visibility())), array('type' => 'dropdown', 'heading' => __('Appear Animation', 'wpex'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => __('Display Author Name?', 'wpex'), 'param_name' => 'display_author_name', 'value' => array(__('Yes', 'wpex') => 'yes', __('No', 'wpex') => 'no')), array('type' => 'dropdown', 'heading' => __('Display Author Company?', 'wpex'), 'param_name' => 'display_author_company', 'value' => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'true')), array('type' => 'dropdown', 'heading' => __('Animation', 'wpex'), 'param_name' => 'animation', 'std' => 'fade_slides', 'value' => array(__('Fade', 'wpex') => 'fade_slides', __('Slide', 'wpex') => 'slide'), 'group' => __('Slider Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __('Loop', 'wpex'), 'param_name' => 'loop', 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Slider Settings', 'wpex')), array('type' => 'textfield', 'heading' => __('Auto Height Animation', 'wpex'), 'std' => 400, 'param_name' => 'height_animation', 'group' => __('Slider Settings', 'wpex'), 'description' => __('You can enter "0.0" to disable the animation completely.', 'wpex')), array('type' => 'textfield', 'heading' => __('Animation Speed', 'wpex'), 'param_name' => 'animation_speed', 'std' => 600, 'description' => __('Enter a value in milliseconds.', 'wpex'), 'group' => __('Slider Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __('Auto Play', 'wpex'), 'param_name' => 'slideshow', 'description' => __('Enable automatic slideshow? Disabled in front-end composer to prevent page "jumping".', 'wpex'), 'group' => __('Slider Settings', 'wpex'), 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false')), array('type' => 'textfield', 'heading' => __('Auto Play Delay', 'wpex'), 'param_name' => 'slideshow_speed', 'std' => 5000, 'description' => __('Enter a value in milliseconds.', 'wpex'), 'group' => __('Slider Settings', 'wpex'), 'dependency' => array('element' => 'slideshow', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Dot Navigation', 'wpex'), 'param_name' => 'control_nav', 'group' => __('Slider Settings', 'wpex'), 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false')), array('type' => 'dropdown', 'heading' => __('Arrows', 'wpex'), 'param_name' => 'direction_nav', 'group' => __('Slider Settings', 'wpex'), 'value' => array(__('No', 'wpex') => 'false', __('Yes', 'wpex') => 'true')), array('type' => 'textfield', 'heading' => __('Posts Count', 'wpex'), 'param_name' => 'count', 'value' => 3, 'group' => __('Query', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Include Categories', 'wpex'), 'param_name' => 'include_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'autocomplete', 'heading' => __('Exclude Categories', 'wpex'), 'param_name' => 'exclude_categories', 'param_holder_class' => 'vc_not-for-custom', 'admin_label' => true, 'settings' => array('multiple' => true, 'min_length' => 1, 'groups' => false, 'unique_values' => true, 'display_inline' => true, 'delay' => 0, 'auto_focus' => true), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Order', 'wpex'), 'param_name' => 'order', 'group' => __('Query', 'wpex'), 'value' => array(__('Default', 'wpex') => '', __('DESC', 'wpex') => 'DESC', __('ASC', 'wpex') => 'ASC')), array('type' => 'dropdown', 'heading' => __('Order By', 'wpex'), 'param_name' => 'orderby', 'value' => vcex_orderby_array(), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __('Orderby: Meta Key', 'wpex'), 'param_name' => 'orderby_meta_key', 'group' => __('Query', 'wpex'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => __('Enable', 'wpex'), 'param_name' => 'display_author_avatar', 'group' => __('Image', 'wpex'), 'value' => array(__('Yes', 'wpex') => 'yes', __('No', 'wpex') => 'no')), array('type' => 'textfield', 'heading' => __('Border Radius', 'wpex'), 'param_name' => 'img_border_radius', 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'display_author_avatar', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => __('Image Size', 'wpex'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'display_author_avatar', 'value' => 'yes')), array('type' => 'dropdown', 'heading' => __('Image Crop Location', 'wpex'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'display_author_avatar', 'value' => 'yes')), array('type' => 'textfield', 'heading' => __('Image Crop Width', 'wpex'), 'param_name' => 'img_width', 'description' => __('Enter a width in pixels.', 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => __('Image Crop Height', 'wpex'), 'param_name' => 'img_height', 'description' => __('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'dropdown', 'heading' => __('Thumbnails', 'wpex'), 'param_name' => 'control_thumbs', 'group' => __('Thumbnails', 'wpex'), 'value' => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'true')), array('type' => 'textfield', 'heading' => __('Navigation Thumbnails Height', 'wpex'), 'param_name' => 'control_thumbs_height', 'std' => 50, 'group' => __('Thumbnails', 'wpex'), 'dependency' => array('element' => 'control_thumbs', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Navigation Thumbnails Width', 'wpex'), 'param_name' => 'control_thumbs_width', 'std' => 50, 'group' => __('Thumbnails', 'wpex'), 'dependency' => array('element' => 'control_thumbs', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Excerpt', 'wpex'), 'param_name' => 'excerpt', 'group' => __('Excerpt', 'wpex'), 'value' => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'true')), array('type' => 'textfield', 'heading' => __('Excerpt Length', 'wpex'), 'param_name' => 'excerpt_length', 'value' => 20, 'description' => __('Enter a custom excerpt length. Will trim the excerpt by this number of words. Enter "-1" to display the_content instead of the auto excerpt.', 'wpex'), 'group' => __('Excerpt', 'wpex'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'dropdown', 'heading' => __('Read More', 'wpex'), 'param_name' => 'read_more', 'group' => __('Excerpt', 'wpex'), 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'textfield', 'heading' => __('Read More Text', 'wpex'), 'param_name' => 'read_more_text', 'group' => __('Excerpt', 'wpex'), 'value' => __('read more', 'wpex'), 'dependency' => array('element' => 'excerpt', 'value' => 'true')), array('type' => 'css_editor', 'heading' => __('CSS', 'wpex'), 'param_name' => 'css', 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Skin', 'wpex'), 'param_name' => 'skin', 'group' => __('Design', 'wpex'), 'value' => array(__('Dark Text', 'wpex') => 'dark', __('Light Text', 'wpex') => 'light')), array('type' => 'textfield', 'heading' => __('Font Size', 'wpex'), 'param_name' => 'font_size', 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Font Weight', 'wpex'), 'param_name' => 'font_weight', 'group' => __('Design', 'wpex'), 'description' => __('Note: Not all font families support every font weight.', 'wpex'), 'value' => array_flip(wpex_font_weights()), 'std' => ''))));
}
示例15: vcex_image_swap_vc_map
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_image_swap_vc_map()
{
return array('name' => esc_html__('Image Swap', 'total'), 'description' => esc_html__('Double Image Hover Effect', 'total'), 'base' => 'vcex_image_swap', 'icon' => 'vcex-image-swap vcex-icon fa fa-picture-o', 'category' => wpex_get_theme_branding(), 'params' => array(array('type' => 'attach_image', 'heading' => esc_html__('Primary Image', 'total'), 'param_name' => 'primary_image'), array('type' => 'attach_image', 'heading' => esc_html__('Secondary Image', 'total'), 'param_name' => 'secondary_image'), array('type' => 'textfield', 'heading' => esc_html__('Unique Id', 'total'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'heading' => esc_html__('Custom Classes', 'total'), 'param_name' => 'classes'), array('type' => 'dropdown', 'heading' => esc_html__('Appear Animation', 'total'), 'param_name' => 'css_animation', 'value' => array_flip(wpex_css_animations())), array('type' => 'dropdown', 'heading' => esc_html__('Image Size', 'total'), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'value' => vcex_image_sizes(), 'group' => esc_html__('Image', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Image Crop Location', 'total'), 'param_name' => 'img_crop', 'std' => 'center-center', 'value' => array_flip(wpex_image_crop_locations()), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom'), 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Width', 'total'), 'param_name' => 'img_width', 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'textfield', 'heading' => esc_html__('Image Crop Height', 'total'), 'param_name' => 'img_height', 'description' => esc_html__('Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total'), 'group' => esc_html__('Image', 'total'), 'dependency' => array('element' => 'img_size', 'value' => 'wpex_custom')), array('type' => 'vc_link', 'heading' => esc_html__('Link', 'total'), 'param_name' => 'link', 'group' => esc_html__('Link', 'total')), array('type' => 'dropdown', 'heading' => esc_html__('Enable Tooltip?', 'total'), 'param_name' => 'link_tooltip', 'value' => array(__('No', 'total') => '', __('Yes', 'total') => 'true'), 'group' => esc_html__('Link', 'total')), array('type' => 'css_editor', 'heading' => esc_html__('CSS', 'total'), 'param_name' => 'css', 'description' => esc_html__('These settings are applied to the main wrapper and they will override any other styling options.', 'total'), 'group' => esc_html__('Design options', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Container Width', 'total'), 'param_name' => 'container_width', 'group' => esc_html__('Image', 'total')), array('type' => 'textfield', 'heading' => esc_html__('Border Radius', 'total'), 'param_name' => 'border_radius', 'group' => esc_html__('Image', 'total')), array('type' => 'hidden', 'param_name' => 'link_title'), array('type' => 'hidden', 'param_name' => 'link_target')));
}