Exemple #1
0
 function vcex_image_grid_shortcode_vc_map()
 {
     $vc_img_rendering_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering';
     vc_map(array("name" => __("Image Grid", 'wpex'), "description" => __("Responsive image gallery", 'wpex'), "base" => "vcex_image_grid", "icon" => "vcex-image-grid", 'category' => WPEX_THEME_BRANDING, "params" => array(array('type' => 'textfield', 'heading' => __("Unique Id", 'wpex'), 'param_name' => "unique_id", 'value' => ''), array('type' => "attach_images", "admin_label" => true, 'heading' => __("Attach Images", 'wpex'), 'param_name' => "image_ids"), 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'), 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Columns", 'wpex'), 'param_name' => "columns", 'std' => '4', 'value' => array(__('Six', 'wpex') => '6', __('Five', 'wpex') => '5', __('Four', 'wpex') => '4', __('Three', 'wpex') => '3', __('Two', 'wpex') => '2', __('One', 'wpex') => '1'), 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Display Title", 'wpex'), 'param_name' => "title", 'value' => array(__('No', 'wpex') => '', __('Yes', 'wpex') => 'yes'), "description" => __("Note: The title will only display on some grid styles. For example the grid without margins will not display the title.", 'wpex'), 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Title Based On Image", 'wpex'), 'param_name' => "title_type", 'value' => array(__('Title', 'wpex') => 'title', __('Alt', 'wpex') => 'alt', __('Caption', 'wpex') => 'caption', __('Description', 'wpex') => 'description'), "description" => __("Note: The title will only display on some grid styles. For example the grid without margins will not display the title.", 'wpex'), 'group' => __('Design', 'wpex'), "dependency" => array('element' => 'title', 'value' => array('yes'))), array('type' => 'dropdown', 'heading' => __("Image Link", 'wpex'), 'param_name' => "thumbnail_link", 'value' => array(__("None", "wpex") => "none", __("Lightbox", "wpex") => "lightbox", __("Custom Links", "wpex") => "custom_link"), 'group' => __('Links', 'wpex')), 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' => __("Custom link target", 'wpex'), 'param_name' => "custom_links_target", "dependency" => array('element' => "thumbnail_link", 'value' => array('custom_link')), 'value' => array(__("Same window", 'wpex') => "_self", __("New window", 'wpex') => "_blank"), 'group' => __('Links', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Crop Width", 'wpex'), 'param_name' => "img_width", 'value' => "9999", 'group' => __('Image Settings', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Crop Height", 'wpex'), 'param_name' => "img_height", 'value' => "9999", "description" => __('Enter a height in pixels. Set to "9999" to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("Rounded Image?", 'wpex'), 'param_name' => "rounded_image", 'value' => array(__('No', 'wpex') => '', __('Yes', 'wpex') => 'yes'), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Filter", 'wpex'), 'param_name' => "img_filter", 'value' => vcex_image_filters(), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Rendering", 'wpex'), 'param_name' => "img_rendering", 'value' => vcex_image_rendering(), "description" => sprintf(__('Image-rendering CSS property provides a hint to the user agent about how to handle its image rendering. For example when scaling down images they tend to look a bit fuzzy in Firefox, setting image-rendering to crisp-edges can help make the images look better. <a href="%s">Learn more</a>.', 'wpex'), esc_url($vc_img_rendering_url)), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("CSS3 Image Hover", 'wpex'), 'param_name' => "img_hover_style", 'value' => vcex_image_hovers(), "description" => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", 'wpex'), 'group' => __('Image Settings', 'wpex')))));
 }
Exemple #2
0
 function vcex_portfolio_grid_shortcode_vc_map()
 {
     $vc_img_rendering_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering';
     vc_map(array("name" => __("Portfolio Grid", 'wpex'), 'description' => __("Recent portfolio posts grid.", 'wpex'), "base" => "vcex_portfolio_grid", 'category' => WPEX_THEME_BRANDING, "icon" => "vcex-portfolio-grid", "params" => array(array('type' => 'textfield', 'heading' => __("Unique Id", 'wpex'), 'param_name' => "unique_id"), array("type" => 'dropdown', 'heading' => __("Columns", 'wpex'), "param_name" => "columns", "value" => array(__('Six', 'wpex') => '6', __('Five', 'wpex') => '5', __('Four', 'wpex') => '4', __('Three', 'wpex') => '3', __('Two', 'wpex') => '2', __('One', 'wpex') => '1'), "std" => '4'), array("type" => 'dropdown', 'heading' => __("1 Column Style", 'wpex'), "param_name" => "single_column_style", "value" => array(__("Default", "wpex") => '', __("Left/Right", "wpex") => 'left_thumbs'), 'dependency' => array('element' => 'columns', 'value' => '1')), array('type' => 'dropdown', 'heading' => __("Grid Style", 'wpex'), 'param_name' => "grid_style", 'value' => array(__('Fit Columns', 'wpex') => 'fit_columns', __('Masonry', 'wpex') => 'masonry', __("No Margins", "wpex") => 'no_margins')), array('type' => 'dropdown', 'heading' => __("Equal Heights?", 'wpex'), 'param_name' => "equal_heights_grid", 'value' => array(__("No", "wpex") => '', __("Yes", "wpex") => "true"), 'dependency' => array('element' => 'grid_style', 'value' => 'fit_columns'), 'description' => __('Adds equal heights for the entry content so "boxes" on the same row are the same height. You must have equal sized images for this to work efficiently.', 'wpex')), array('type' => 'textfield', 'heading' => __("Include Categories", 'wpex'), 'param_name' => "include_categories", "admin_label" => true, 'description' => __('Enter the slugs of a categories (comma seperated) to pull posts from or enter "all" to pull recent posts from all categories. Example: category-1, category-2.', 'wpex'), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __("Exclude Categories", 'wpex'), 'param_name' => "exclude_categories", "admin_label" => true, 'description' => __('Enter the slugs of a categories (comma seperated) to exclude. Example: category-1, category-2.', 'wpex'), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __("Order", 'wpex'), 'param_name' => "order", 'value' => array(__("DESC", "wpex") => "DESC", __("ASC", "wpex") => "ASC"), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Order By', 'wpex'), 'param_name' => 'orderby', 'value' => array(__('Date', 'wpex') => 'date', __('Name', 'wpex') => 'name', __('Modified', 'wpex') => 'modified', __('Author', 'wpex') => 'author', __('Random', 'wpex') => 'rand', __('Comment Count', 'wpex') => 'comment_count', __('Meta Key Value', 'wpex') => 'meta_value', __('Meta Key Value Num', 'wpex') => 'meta_value_num'), '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' => 'textfield', 'heading' => __("Posts Per Page", 'wpex'), 'param_name' => "posts_per_page", 'value' => "8", 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __("Pagination", 'wpex'), 'param_name' => "pagination", 'value' => array(__("No", "wpex") => '', __("Yes", "wpex") => "true"), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __("Category Filter", 'wpex'), 'param_name' => 'filter', 'value' => array(__('No', 'wpex') => '', __('Yes', 'wpex') => 'true'), 'group' => __('Filter', 'wpex')), array('type' => 'dropdown', 'heading' => __('Layout Mode', 'wpex'), 'param_name' => 'masonry_layout_mode', 'value' => array(__('Masonry', 'wpex') => 'masonry', __('Fit Rows', 'wpex') => 'fitRows'), 'group' => __('Filter', 'wpex')), array('type' => 'textfield', 'heading' => __('Custom Filter Speed', 'wpex'), 'param_name' => "filter_speed", 'description' => __('Default is "0.4" seconds', 'wpex'), 'group' => __('Filter', 'wpex')), array('type' => 'dropdown', 'heading' => __("Center Filter Links", 'wpex'), 'param_name' => "center_filter", 'value' => array(__('No', 'wpex') => '', __('Yes', 'wpex') => 'yes'), 'group' => __('Filter', 'wpex')), array('type' => 'textfield', 'heading' => __('Custom Category Filter "All" Text', 'wpex'), 'param_name' => "all_text", 'group' => __('Filter', 'wpex')), array('type' => 'dropdown', 'heading' => __("Entry Media?", 'wpex'), 'param_name' => "entry_media", 'value' => array(__('Yes', 'wpex') => '', __('No', 'wpex') => "false"), 'group' => __('Image', 'wpex')), vcex_overlays_array(), array('type' => 'textfield', 'heading' => __("Image Crop Width", 'wpex'), 'param_name' => "img_width", 'value' => "9999", 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Crop Height", 'wpex'), 'param_name' => "img_height", 'value' => "9999", 'description' => __("Custom image cropping height. Enter 9999 for no cropping (just resizing).", 'wpex'), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Filter", 'wpex'), 'param_name' => "img_filter", 'value' => vcex_image_filters(), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Rendering", 'wpex'), 'param_name' => "img_rendering", 'value' => vcex_image_rendering(), 'description' => sprintf(__('Image-rendering CSS property provides a hint to the user agent about how to handle its image rendering. For example when scaling down images they tend to look a bit fuzzy in Firefox, setting image-rendering to crisp-edges can help make the images look better. <a href="%s">Learn more</a>.', 'wpex'), esc_url($vc_img_rendering_url)), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("CSS3 Image Hover", 'wpex'), 'param_name' => "img_hover_style", 'value' => vcex_image_hovers(), 'description' => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex"), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Links To", 'wpex'), 'param_name' => "thumb_link", 'value' => array(__("Post", "wpex") => '', __("Lightbox", "wpex") => "lightbox", __("Nowhere", "wpex") => "nowhere"), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Display Lightbox Gallery", 'wpex'), 'param_name' => "thumb_lightbox_gallery", 'value' => array(__("No", "wpex") => '', __("Yes", "wpex") => "true"), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'thumb_link', 'value' => 'lightbox')), array('type' => 'dropdown', 'heading' => __("Display Title In Lightbox", 'wpex'), 'param_name' => "thumb_lightbox_title", 'value' => array(__("No", "wpex") => '', __("Yes", "wpex") => "true"), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'thumb_link', 'value' => 'lightbox')), array('type' => 'dropdown', 'heading' => __("Title", 'wpex'), 'param_name' => "title", 'value' => array(__("Yes", "wpex") => '', __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __("Title Links To", 'wpex'), 'param_name' => "title_link", 'value' => array(__("Post", "wpex") => '', __("Lightbox", "wpex") => "lightbox", __("Nowhere", "wpex") => "nowhere"), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __("Excerpt", 'wpex'), 'param_name' => "excerpt", 'value' => array(__("Yes", "wpex") => '', __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __('Custom Excerpt Length', 'wpex'), 'param_name' => 'excerpt_length', 'group' => __('Content', 'wpex'), 'std' => '30'), array("type" => 'dropdown', 'heading' => __("Trim Custom Excerpts", 'wpex'), "param_name" => "custom_excerpt_trim", "value" => array(__('Yes', 'wpex') => '', __('No', 'wpex') => 'false'), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __("Read More", 'wpex'), 'param_name' => "read_more", 'std' => 'false', 'value' => array(__("No", "wpex") => "false", __("Yes", "wpex") => ''), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Read More Text", 'wpex'), 'param_name' => "read_more_text", 'group' => __('Content', 'wpex')), array('type' => "colorpicker", 'heading' => __("Title Text Color", 'wpex'), 'param_name' => "content_heading_color", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Title Font size", 'wpex'), 'param_name' => "content_heading_size", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Title Margin", 'wpex'), 'param_name' => "content_heading_margin", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", 'heading' => __("Content Background", 'wpex'), 'param_name' => "content_background", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", 'heading' => __("Content Text Color", 'wpex'), 'param_name' => "content_color", 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Content Alignment', 'wpex'), 'param_name' => "content_alignment", 'value' => array(__("Default", "wpex") => '', __("Left", "wpex") => "left", __("Right", "wpex") => "right", __("Center", "wpex") => "center"), 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Font Size", 'wpex'), 'param_name' => "content_font_size", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Margin", 'wpex'), 'param_name' => "content_margin", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Padding", 'wpex'), 'param_name' => "content_padding", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Opacity", 'wpex'), 'param_name' => "content_opacity", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Border", 'wpex'), 'param_name' => "content_border", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", 'heading' => __("Content Read More Background", 'wpex'), 'param_name' => "readmore_background", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", 'heading' => __("Content Read More Color", 'wpex'), 'param_name' => "readmore_color", 'group' => __('Design', 'wpex')))));
 }
Exemple #3
0
 function vcex_feature_box_shortcode_vc_map()
 {
     $vc_img_rendering_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering';
     vc_map(array("name" => __("Feature Box", 'wpex'), "description" => __("A feature content box (left/right).", 'wpex'), "base" => "vcex_feature_box", 'category' => WPEX_THEME_BRANDING, "icon" => "vcex-feature-box", "params" => array(array('type' => 'textfield', 'admin_label' => true, 'heading' => __('Unique ID', 'wpex'), 'param_name' => 'unique_id'), array('type' => 'textfield', 'admin_label' => true, 'heading' => __('Classes', 'wpex'), 'param_name' => 'classes'), array("type" => 'dropdown', "heading" => __("Style", "wpex"), "param_name" => "style", "value" => array(__("Left Image - Right Content", "wpex") => "left-image-right-content", __("Left Content - Right Image", "wpex") => "left-content-right-image")), array("type" => 'dropdown', "heading" => __("CSS Animation", "wpex"), "param_name" => "css_animation", "value" => array(__("No", "wpex") => '', __("Top to bottom", "wpex") => "top-to-bottom", __("Bottom to top", "wpex") => "bottom-to-top", __("Left to right", "wpex") => "left-to-right", __("Right to left", "wpex") => "right-to-left", __("Appear from center", "wpex") => "appear")), array("type" => 'dropdown', "heading" => __("Alignment", "wpex"), "param_name" => "text_align", "value" => array(__("Default", "wpex") => "", __("Center", "wpex") => "center", __("Left", "wpex") => "left", __("Right", "wpex") => "right")), array("type" => 'textfield', "heading" => __("Padding", "wpex"), "param_name" => "padding"), array("type" => 'colorpicker', "heading" => __("Background", "wpex"), "param_name" => "background"), array("type" => 'textfield', "heading" => __("Border", "wpex"), "param_name" => "border"), array("type" => "textfield", "heading" => __("Content Width", "wpex"), "param_name" => "content_width", "value" => '50%', 'group' => __('Widths', 'wpex')), array("type" => "textfield", "heading" => __("Image Width", "wpex"), "param_name" => "media_width", "value" => '50%', 'group' => __('Widths', 'wpex')), array("type" => 'dropdown', "heading" => __("Tablet Widths", "wpex"), "param_name" => "tablet_widths", "value" => array(__("Inherit", "wpex") => "", __("Full-Width", "wpex") => "fullwidth"), 'group' => __('Widths', 'wpex')), array("type" => 'dropdown', "heading" => __("Phone Widths", "wpex"), "param_name" => "phone_widths", "value" => array(__("Inherit", "wpex") => "", __("Full-Width", "wpex") => "fullwidth"), 'group' => __('Widths', 'wpex')), array("type" => "textfield", "heading" => __("Heading", 'wpex'), "param_name" => "heading", "value" => "Sample Heading", 'group' => __('Heading', 'wpex')), array("type" => 'dropdown', "heading" => __("Heading Type", 'wpex'), "param_name" => "heading_type", "value" => array(__("h2", "wpex") => "h2", __("h3", "wpex") => "h3", __("h4", "wpex") => "h4", __("h5", "wpex") => "h5", __("div", "wpex") => "div"), 'group' => __('Heading', 'wpex')), array("type" => "vc_link", "heading" => __("Heading URL", 'wpex'), "param_name" => "heading_url", "value" => "", 'group' => __('Heading', 'wpex')), array('type' => "colorpicker", "heading" => __("Heading Color", 'wpex'), 'param_name' => "heading_color", 'group' => __('Heading', 'wpex')), array('type' => "textfield", "heading" => __("Heading Font Size", 'wpex'), 'param_name' => "heading_size", 'group' => __('Heading', 'wpex')), array('type' => "textfield", "heading" => __("Heading Margin", 'wpex'), 'param_name' => "heading_margin", 'group' => __('Heading', 'wpex')), array('type' => 'textfield', 'heading' => __("Heading Font Weight", 'wpex'), 'param_name' => "heading_weight", 'group' => __('Heading', 'wpex')), array('type' => 'textfield', 'heading' => __("Heading Letter Spacing", 'wpex'), 'param_name' => "heading_letter_spacing", 'group' => __('Heading', 'wpex')), array('type' => 'dropdown', 'heading' => __("Heading Text Transform", 'wpex'), 'param_name' => "heading_transform", 'group' => __('Heading', 'wpex'), 'value' => array(__('Default', 'wpex') => '', __('None', 'wpex') => 'none', __('Capitalize', 'wpex') => 'capitalize', __('Uppercase', 'wpex') => 'uppercase', __('Lowercase', 'wpex') => 'lowercase')), array("type" => "textarea_html", "holder" => "div", "heading" => __("Content", 'wpex'), "param_name" => "content", 'value' => __('Don\'t forget to change this dummy text in your page editor for this lovely feature box.', 'wpex'), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Padding", 'wpex'), 'param_name' => "content_padding", 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Font Size", 'wpex'), 'param_name' => "content_font_size", 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Font Weight", 'wpex'), 'param_name' => "content_font_weight", 'group' => __('Content', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Font Color", 'wpex'), 'param_name' => "content_color", 'group' => __('Content', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Background", 'wpex'), 'param_name' => "content_background", 'group' => __('Content', 'wpex')), array("type" => "attach_image", "heading" => __("Image", "wpex"), "param_name" => "image", "value" => "", 'group' => __('Image', 'wpex')), array('type' => 'dropdown', "heading" => __("Equal Heights?", 'wpex'), 'param_name' => "equal_heights", 'value' => array(__("No", "wpex") => "", __("Yes", "wpex") => "true"), 'description' => __('Keeps the image column the same height as your content.', 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "vc_link", "heading" => __("Image URL", 'wpex'), "param_name" => "image_url", "value" => "", 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array('type' => 'dropdown', 'heading' => __('Lightbox Type', 'wpex'), 'param_name' => "image_lightbox", 'value' => array(__('None', 'wpex') => '', __('Self (Image)', 'wpex') => 'image', __('URL', 'wpex') => 'url', __('Auto Detect', 'wpex') => 'auto-detect', __('Video/Youtube Embed Code', 'wpex') => "video_embed", __('HTML5', 'wpex') => "html5", __('Quicktime', 'wpex') => "quicktime"), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "textfield", "heading" => __("Image Width", 'wpex'), "param_name" => "img_width", "value" => "9999", 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "textfield", "heading" => __("Image Height", 'wpex'), "param_name" => "img_height", "value" => "9999", "description" => __("Custom image cropping height. Enter 9999 for no cropping.", 'wpex'), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "textfield", "heading" => __("Border Radius", 'wpex'), "param_name" => "img_border_radius", "value" => "", 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => 'dropdown', "heading" => __("Image Filter", 'wpex'), "param_name" => "img_filter", "value" => vcex_image_filters(), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => 'dropdown', "heading" => __("CSS3 Image Hover", 'wpex'), "param_name" => "img_hover_style", "value" => vcex_image_hovers(), "description" => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex"), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true), 'dependency' => array('element' => 'equal_heights', 'value' => '')), array("type" => 'dropdown', "heading" => __("Image Rendering", 'wpex'), "param_name" => "img_rendering", "value" => vcex_image_rendering(), "description" => sprintf(__('Image-rendering CSS property provides a hint to the user agent about how to handle its image rendering. For example when scaling down images they tend to look a bit fuzzy in Firefox, setting image-rendering to crisp-edges can help make the images look better. <a href="%s">Learn more</a>.', 'wpex'), esc_url($vc_img_rendering_url)), 'group' => __('Image', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "textfield", "heading" => __("Video link", "wpex"), "param_name" => "video", "description" => sprintf(__('Enter a video link for a video based feature box. More about supported formats at %s.', "wpex"), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>'), 'group' => __('Video', 'wpex')))));
 }
                } else {
                    $output .= $image_output;
                }
                $output .= '</div>';
                if ($title == 'yes' && $attachment_title) {
                    $output .= '<div class="vcex-caroufredsel-entry-title">' . $attachment_title . '</div>';
                }
                // Close main wrap
                $output .= '</li>';
                // End foreach loop
            }
            // End UL
            $output .= '</ul>';
            // Next/Prev arrows
            if ($arrows == 'true') {
                $output .= '<div id="prev-' . $rand_num . '" class="vcex-caroufredsel-prev theme-button"><span class="fa fa-chevron-left"></span></div><div id="next-' . $rand_num . '" class="vcex-caroufredsel-next theme-button"><span class="fa fa-chevron-right"></span></div>';
            }
            // Close main wrap
            $output .= '</div></div><div class="vcex-clear-floats"></div>';
        }
        // End has images check
        // Reset query
        wp_reset_postdata();
        // Return data
        return $output;
    }
}
add_shortcode("vcex_image_carousel", "vcex_image_carousel_shortcode");
// Add to visual composer -------------------------------------------------------------------------- >
vc_map(array("name" => __("Image Carousel", 'vcex'), "base" => "vcex_image_carousel", "class" => "", "category" => __("Images", "wpex"), 'admin_enqueue_js' => "", 'admin_enqueue_css' => "", "icon" => "icon-wpb-vcex-image_carousel", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Unique Id", 'vcex'), "param_name" => "unique_id", "value" => "", "description" => __("You can enter a unique ID here for styling purposes.", 'vcex')), array("type" => "attach_images", "class" => "", "admin_label" => true, "heading" => __("Attach Images", 'vcex'), "param_name" => "image_ids", "description" => __("Attach images to your post.", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Style", 'vcex'), "param_name" => "style", "value" => array(__("Default", "wpex") => "default", __("No Margins", "wpex") => "no-margins")), array("type" => "textfield", "class" => "", "heading" => __("Slide Width", 'vcex'), "param_name" => "item_width", "value" => "230", "description" => __('The width of each slide in pixels.', 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Min Slides", 'vcex'), "param_name" => "min_slides", "value" => "1", "description" => __('The minimum number of slides to be shown.', 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Max Slides", 'vcex'), "param_name" => "max_slides", "value" => "4", "description" => __('The maximum number of slides to be shown.', 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Items To Scroll", 'vcex'), "param_name" => "items_scroll", "value" => "page", "description" => __('The number of items to scroll at a time. Enter "page" to scroll to the first item of the previous/next "page".', 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Auto Play", 'vcex'), "param_name" => "auto_play", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false"), "description" => __('Determines whether the carousel should scroll automatically or not.', 'vcex')), array("type" => "textfield", "class" => "", "heading" => __('Timeout Duration (in milliseconds)', 'vcex'), "param_name" => "timeout_duration", "value" => "5000", "dependency" => array('element' => "auto_play", 'value' => "true"), "description" => __('The amount of milliseconds the carousel will pause.', 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Display Arrows?", 'vcex'), "param_name" => "arrows", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "dropdown", "class" => "", "heading" => __("Image Link", 'vcex'), "param_name" => "thumbnail_link", "value" => array(__("None", "wpex") => "none", __("Lightbox", "wpex") => "lightbox", __("Custom Links", "wpex") => "custom_link")), 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.', 'vcex'), "dependency" => array('element' => "thumbnail_link", 'value' => array('custom_link'))), array("type" => "dropdown", "heading" => __("Custom link target", "wpex"), "param_name" => "custom_links_target", "description" => __('Select where to open  custom links.', 'vcex'), "dependency" => array('element' => "thumbnail_link", 'value' => array('custom_link')), "value" => array(__("Same window", "wpex") => "_self", __("New window", "wpex") => "_blank")), array("type" => "checkbox", "class" => "", "heading" => __("Crop Images?", 'vcex'), "param_name" => "img_crop", "value" => array(__("Yes please.", "wpex") => 'yes')), array("type" => "textfield", "class" => "", "heading" => __("Image Crop Width", 'vcex'), "param_name" => "img_width", "value" => "500", "description" => __("Enter a width in pixels.", 'vcex'), "dependency" => array('element' => "img_crop", 'value' => "yes")), array("type" => "textfield", "class" => "", "heading" => __("Image Crop Height", 'vcex'), "param_name" => "img_height", "value" => "500", "description" => __('Enter a height in pixels. Set to "9999" to disable vertical cropping and keep image proportions.', 'vcex'), "dependency" => array('element' => "img_crop", 'value' => "yes")), array("type" => "checkbox", "class" => "", "heading" => __("Rounded Image?", 'vcex'), "param_name" => "rounded_image", "value" => array(__("Yes please.", "wpex") => 'yes'), "description" => __("For truely rounded images make sure your images are cropped to the same width and height.", "wpex")), array("type" => "checkbox", "class" => "", "heading" => __("Display Title", 'vcex'), "param_name" => "title", "value" => array(__("Yes please.", "wpex") => 'yes'), "description" => __("Note: The title will only display on some grid styles. For example the grid without margins will not display the title.", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Image Filter", 'vcex'), "param_name" => "img_filter", "value" => vcex_image_filters()), array("type" => "dropdown", "class" => "", "heading" => __("CSS3 Image Hover", 'vcex'), "param_name" => "img_hover_style", "value" => vcex_image_hovers(), "description" => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex")))));
                        $output .= $image_output;
                        $output .= '</a>';
                    }
                } else {
                    $output .= $image_output;
                }
                if ($title == 'yes' && $attachment_title && $grid_style !== 'no-margins') {
                    $output .= '<div class="vcex-image-grid-entry-title">' . $attachment_title . '</div>';
                }
                $output .= '</div>';
                // Close main wrap
                $output .= '</article>';
                if ($count == $columns) {
                    $count = 0;
                }
                // End foreach loop
            }
            // Close main wrap
            $output .= '</div>';
        }
        // End has posts check
        // Reset query
        wp_reset_postdata();
        // Return data
        return $output;
    }
    add_shortcode("vcex_image_grid", "vcex_image_grid_shortcode");
}
// Add to visual composer -------------------------------------------------------------------------- >
vc_map(array("name" => __("Image Grid", 'vcex'), "base" => "vcex_image_grid", "class" => "", "category" => __("Images", "wpex"), 'admin_enqueue_js' => "", 'admin_enqueue_css' => "", "icon" => "icon-wpb-vcex-image_grid", "params" => array(array("type" => "attach_images", "admin_label" => true, "class" => "", "heading" => __("Attach Images", 'vcex'), "param_name" => "image_ids", "description" => __("Attach images to your post.", 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Unique Id", 'vcex'), "param_name" => "unique_id", "value" => "", "description" => __("You can enter a unique ID here for styling purposes.", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Columns", 'vcex'), "param_name" => "columns", "value" => array(6, 5, 4, 3, 2, 1)), array("type" => "dropdown", "class" => "", "heading" => __("Grid Style", 'vcex'), "param_name" => "grid_style", "value" => array(__("Default", "wpex") => "default", __("No Margins", "wpex") => "no-margins")), array("type" => "dropdown", "class" => "", "heading" => __("Image Link", 'vcex'), "param_name" => "thumbnail_link", "value" => array(__("None", "wpex") => "none", __("Lightbox", "wpex") => "lightbox", __("Custom Links", "wpex") => "custom_link")), 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.', 'vcex'), "dependency" => array('element' => "thumbnail_link", 'value' => array('custom_link'))), array("type" => "dropdown", "heading" => __("Custom link target", "wpex"), "param_name" => "custom_links_target", "description" => __('Select where to open  custom links.', 'vcex'), "dependency" => array('element' => "thumbnail_link", 'value' => array('custom_link')), "value" => array(__("Same window", "wpex") => "_self", __("New window", "wpex") => "_blank")), array("type" => "textfield", "class" => "", "heading" => __("Image Crop Width", 'vcex'), "param_name" => "img_width", "value" => "500", "description" => __("Enter a width in pixels.", 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Image Crop Height", 'vcex'), "param_name" => "img_height", "value" => "500", "description" => __('Enter a height in pixels. Set to "9999" to disable vertical cropping and keep image proportions.', 'vcex')), array("type" => "checkbox", "class" => "", "heading" => __("Rounded Image?", 'vcex'), "param_name" => "rounded_image", "value" => array(__("Yes please.", "wpex") => 'yes'), "description" => __("For truely rounded images make sure your images are cropped to the same width and height.", "wpex")), array("type" => "checkbox", "class" => "", "heading" => __("Display Title", 'vcex'), "param_name" => "title", "value" => array(__("Yes please.", "wpex") => 'yes'), "description" => __("Note: The title will only display on some grid styles. For example the grid without margins will not display the title.", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Image Filter", 'vcex'), "param_name" => "img_filter", "value" => vcex_image_filters()), array("type" => "dropdown", "class" => "", "heading" => __("CSS3 Image Hover", 'vcex'), "param_name" => "img_hover_style", "value" => vcex_image_hovers(), "description" => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex")))));
Exemple #6
0
 function vcex_teaser_shortcode_vc_map()
 {
     $vc_img_rendering_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering';
     vc_map(array("name" => __("Teaser Box", 'wpex'), "description" => __("A teaser content box", 'wpex'), "base" => "vcex_teaser", 'category' => WPEX_THEME_BRANDING, "icon" => "vcex-teaser", "params" => array(array('type' => 'textfield', 'admin_label' => true, 'heading' => __('Unique ID', 'wpex'), 'param_name' => 'unique_id', 'value' => ''), array('type' => 'textfield', 'admin_label' => true, 'heading' => __('Classes', 'wpex'), 'param_name' => 'classes', 'value' => ''), array("type" => "dropdown", "heading" => __("Style", "wpex"), "param_name" => "style", "value" => array(__("Plain", "wpex") => "one", __("Boxed 1", "wpex") => "two", __("Boxed 2", "wpex") => "three", __("Outline", "wpex") => "four")), array("type" => "dropdown", "heading" => __("CSS Animation", "wpex"), "param_name" => "css_animation", "value" => array(__("No", "wpex") => '', __("Top to bottom", "wpex") => "top-to-bottom", __("Bottom to top", "wpex") => "bottom-to-top", __("Left to right", "wpex") => "left-to-right", __("Right to left", "wpex") => "right-to-left", __("Appear from center", "wpex") => "appear")), array("type" => "dropdown", "heading" => __("Alignment", "wpex"), "param_name" => "text_align", "value" => array(__("Default", "wpex") => "", __("Center", "wpex") => "center", __("Left", "wpex") => "left", __("Right", "wpex") => "right")), array('type' => 'textfield', 'heading' => __("Padding", 'wpex'), 'param_name' => "padding", 'dependency' => array('element' => 'style', 'value' => array('two'))), array('type' => 'colorpicker', 'heading' => __("Background Color", 'wpex'), 'param_name' => "background", 'dependency' => array('element' => 'style', 'value' => array('two', 'three'))), array('type' => 'colorpicker', 'heading' => __("Border Color", 'wpex'), 'param_name' => "border_color", 'dependency' => array('element' => 'style', 'value' => array('two', 'three', 'four'))), array('type' => 'textfield', 'heading' => __("Border Radius", 'wpex'), 'param_name' => "border_radius", 'dependency' => array('element' => 'style', 'value' => array('two', 'three', 'four'))), array("type" => "textarea_html", "class" => "", "holder" => "div", "heading" => __("Content", 'wpex'), "param_name" => "content", 'value' => __('Don\'t forget to change this dummy text in your page editor for this lovely teaser box.', 'wpex'), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Margin", 'wpex'), 'param_name' => "content_margin", 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Padding", 'wpex'), 'param_name' => "content_padding", 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Font Size", 'wpex'), 'param_name' => "content_font_size", 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Font Weight", 'wpex'), 'param_name' => "content_font_weight", 'group' => __('Content', 'wpex'), "value" => ''), array('type' => 'colorpicker', 'heading' => __("Content Font Color", 'wpex'), 'param_name' => "content_color", 'group' => __('Content', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Background", 'wpex'), 'param_name' => "content_background", 'group' => __('Content', 'wpex')), array("type" => "textfield", "class" => "", "heading" => __("Heading", 'wpex'), "param_name" => "heading", "value" => "Sample Heading", 'group' => __('Heading', 'wpex')), array("type" => "dropdown", "class" => "", "heading" => __("Heading Type", 'wpex'), "param_name" => "heading_type", "value" => array(__("h2", "wpex") => "h2", __("h3", "wpex") => "h3", __("h4", "wpex") => "h4", __("h5", "wpex") => "h5"), 'group' => __('Heading', 'wpex')), array('type' => "colorpicker", "heading" => __("Heading Color", 'wpex'), 'param_name' => "heading_color", 'group' => __('Heading', 'wpex')), array('type' => "textfield", "heading" => __("Heading Font Size", 'wpex'), 'param_name' => "heading_size", 'group' => __('Heading', 'wpex')), array('type' => "textfield", "heading" => __("Heading Margin", 'wpex'), 'param_name' => "heading_margin", 'group' => __('Heading', 'wpex')), array('type' => 'textfield', 'heading' => __("Heading Font Weight", 'wpex'), 'param_name' => "heading_weight", 'group' => __('Heading', 'wpex'), "value" => ''), array('type' => 'textfield', 'heading' => __("Heading Letter Spacing", 'wpex'), 'param_name' => "heading_letter_spacing", 'group' => __('Heading', 'wpex')), array('type' => 'dropdown', 'heading' => __("Heading Text Transform", 'wpex'), 'param_name' => "heading_transform", 'group' => __('Heading', 'wpex'), 'value' => array(__('Default', 'wpex') => '', __('None', 'wpex') => 'none', __('Capitalize', 'wpex') => 'capitalize', __('Uppercase', 'wpex') => 'uppercase', __('Lowercase', 'wpex') => 'lowercase')), array("type" => "textfield", "class" => "", "heading" => __("URL", 'wpex'), "param_name" => "url", "value" => "", 'group' => __('URL', 'wpex')), array("type" => "dropdown", "class" => "", "heading" => __("URL Target", 'wpex'), "param_name" => "url_target", "value" => array(__("Self", "wpex") => "", __("Blank", "wpex") => "_blank", __("Local", 'wpex') => "local"), 'group' => __('URL', 'wpex')), array("type" => "dropdown", "class" => "", "heading" => __("URL Rel", 'wpex'), "param_name" => "url_rel", "value" => array(__("None", "wpex") => "", __("Nofollow", "wpex") => "nofollow"), 'group' => __('URL', 'wpex')), array("type" => "attach_image", "heading" => __("Image", "wpex"), "param_name" => "image", "value" => "", 'group' => __('Media', 'wpex')), array("type" => "textfield", "heading" => __("Video link", "wpex"), "param_name" => "video", "description" => sprintf(__('Enter a video link for a video based teaser box. More about supported formats at %s.', "wpex"), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>'), 'group' => __('Media', 'wpex')), array("type" => "dropdown", "heading" => __("Image Style", 'wpex'), "param_name" => "img_style", "value" => array(__("Default", "wpex") => "", __("Stretch", "wpex") => "stretch"), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "textfield", "heading" => __("Image Width", 'wpex'), "param_name" => "img_width", "value" => "9999", 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "textfield", "heading" => __("Image Height", 'wpex'), "param_name" => "img_height", "value" => "9999", "description" => __("Custom image cropping height. Enter 9999 for no cropping.", 'wpex'), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Image Filter", 'wpex'), "param_name" => "img_filter", "value" => vcex_image_filters(), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "dropdown", "heading" => __("CSS3 Image Hover", 'wpex'), "param_name" => "img_hover_style", "value" => vcex_image_hovers(), "description" => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex"), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Image Rendering", 'wpex'), "param_name" => "img_rendering", "value" => vcex_image_rendering(), "description" => sprintf(__('Image-rendering CSS property provides a hint to the user agent about how to handle its image rendering. For example when scaling down images they tend to look a bit fuzzy in Firefox, setting image-rendering to crisp-edges can help make the images look better. <a href="%s">Learn more</a>.', 'wpex'), esc_url($vc_img_rendering_url)), 'group' => __('Media', 'wpex'), 'dependency' => array('element' => 'image', 'not_empty' => true)))));
 }
Exemple #7
0
 function vcex_blog_grid_shortcode_vcmap()
 {
     vc_map(array("name" => __("Blog Grid", 'wpex'), "description" => __("Recent blog posts grid", 'wpex'), "base" => "vcex_blog_grid", "icon" => "vcex-blog-grid", "category" => WPEX_THEME_BRANDING, "params" => array(array("type" => "textfield", "heading" => __("Unique Id", 'wpex'), "param_name" => "unique_id"), array("type" => "dropdown", "heading" => __("Columns", 'wpex'), "param_name" => "columns", "value" => array(__('Six', 'wpex') => '6', __('Five', 'wpex') => '5', __('Four', 'wpex') => '4', __('Three', 'wpex') => '3', __('Two', 'wpex') => '2', __('One', 'wpex') => '1'), "std" => '4'), array("type" => "dropdown", "heading" => __("1 Column Style", 'wpex'), "param_name" => "single_column_style", "value" => array(__("Default", "wpex") => '', __("Left/Right", "wpex") => 'left_thumbs'), 'dependency' => array('element' => 'columns', 'value' => '1')), array("type" => "dropdown", "heading" => __("Grid Style", 'wpex'), "param_name" => "grid_style", "value" => array(__("Fit Columns", "wpex") => "fit_columns", __("Masonry", "wpex") => "masonry")), array('type' => "dropdown", "heading" => __("Equal Heights?", 'wpex'), 'param_name' => "equal_heights_grid", 'value' => array(__("No", "wpex") => "", __("Yes", "wpex") => "true"), 'dependency' => array('element' => 'grid_style', 'value' => 'fit_columns'), 'description' => __('Adds equal heights for the portfolio entry content so "boxes" on the same row are the same height. You must have equal sized images for this to work efficiently.', 'wpex')), array("type" => "dropdown", "class" => "", "heading" => __("Display Featured Videos?", 'wpex'), "param_name" => "featured_video", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false"), "description" => __("Display your featured videos on the video post format posts (this will only work if the featured media option is enabled above).", "wpex")), array("type" => "dropdown", "heading" => __("Post Link Target", 'wpex'), "param_name" => "url_target", "value" => array(__("Self", "wpex") => "_self", __("Blank", "wpex") => "_blank")), array("type" => "textfield", "heading" => __("Include Categories", 'wpex'), "param_name" => "include_categories", "admin_label" => true, "description" => __('Enter the slugs of a categories (comma seperated) to pull posts from or enter "all" to pull recent posts from all categories. Example: category-1, category-2.', 'wpex'), 'group' => __('Query', 'wpex')), array("type" => "textfield", "heading" => __("Exclude Categories", 'wpex'), "param_name" => "exclude_categories", "admin_label" => true, "description" => __('Enter the slugs of a categories (comma seperated) to exclude. Example: category-1, category-2.', 'wpex'), 'group' => __('Query', 'wpex')), array("type" => "dropdown", "heading" => __("Order", 'wpex'), "param_name" => "order", "value" => array(__("DESC", "wpex") => "DESC", __("ASC", "wpex") => "ASC"), 'group' => __('Query', 'wpex')), array("type" => "dropdown", "heading" => __("Order By", 'wpex'), "param_name" => "orderby", "value" => array(__("Date", "wpex") => "date", __("Name", "wpex") => "name", __("Modified", "wpex") => "modified", __("Author", "wpex") => "author", __("Random", "wpex") => "rand", __("Comment Count", "wpex") => "comment_count"), 'group' => __('Query', 'wpex')), array("type" => "dropdown", "heading" => __("Pagination", 'wpex'), "param_name" => "pagination", "value" => array(__("False", "wpex") => "false", __("True", "wpex") => "true"), 'group' => __('Query', 'wpex')), array("type" => "textfield", "heading" => __("Posts Per Page", 'wpex'), "param_name" => "posts_per_page", "value" => "4", 'group' => __('Query', 'wpex')), array("type" => "dropdown", "heading" => __("Category Filter", 'wpex'), "param_name" => "filter", "value" => array(__("No", "wpex") => "", __("Yes", "wpex") => "true"), 'group' => __('Filter', 'wpex')), array('type' => "dropdown", 'heading' => __("Layout Mode", 'wpex'), 'param_name' => "masonry_layout_mode", 'value' => array(__('Masonry', 'wpex') => 'masonry', __('Fit Rows', 'wpex') => 'fitRows'), 'group' => __('Filter', 'wpex')), array('type' => 'textfield', 'heading' => __('Custom Filter Speed', 'wpex'), 'param_name' => "filter_speed", 'description' => __('Default is "0.4" seconds', 'wpex'), 'group' => __('Filter', 'wpex')), array("type" => "dropdown", "heading" => __("Center Filter Links", 'wpex'), "param_name" => "center_filter", "value" => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'yes'), 'group' => __('Filter', 'wpex')), array("type" => "textfield", "heading" => __('Custom Category Filter "All" Text', 'wpex'), "param_name" => "all_text", "value" => __('All', 'wpex'), 'group' => __('Filter', 'wpex')), array("type" => "dropdown", "heading" => __("Entry Media", 'wpex'), "param_name" => "entry_media", "value" => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Image', 'wpex')), array("type" => "textfield", "heading" => __("Image Width", 'wpex'), "param_name" => "img_width", "value" => "9999", 'group' => __('Image', 'wpex')), array("type" => "textfield", "heading" => __("Image Height", 'wpex'), "param_name" => "img_height", "value" => "9999", "description" => __("Custom image cropping height. Enter 9999 for no cropping.", 'wpex'), 'group' => __('Image', 'wpex')), array("type" => "dropdown", "heading" => __("Image Filter", 'wpex'), "param_name" => "img_filter", "value" => vcex_image_filters(), 'group' => __('Image', 'wpex')), array("type" => "dropdown", "heading" => __("Image Links To", 'wpex'), "param_name" => "thumb_link", "value" => array(__("Post", "wpex") => "post", __("Lightbox", "wpex") => "lightbox", __("Nowhere", "wpex") => "nowhere"), 'group' => __('Image', 'wpex')), array("type" => "dropdown", "heading" => __("Title", 'wpex'), "param_name" => "title", "value" => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => "textfield", "heading" => __("Title Font size", 'wpex'), 'param_name' => "content_heading_size", 'group' => __('Content', 'wpex'), "dependency" => array('element' => "title", 'value' => array('true'))), array('type' => "textfield", "heading" => __("Title Margin", 'wpex'), 'param_name' => "content_heading_margin", 'group' => __('Content', 'wpex'), "dependency" => array('element' => "title", 'value' => array('true'))), array("type" => "dropdown", "heading" => __("Date", 'wpex'), "param_name" => "date", "value" => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => "colorpicker", "heading" => __("Date Color", 'wpex'), 'param_name' => "date_color", 'group' => __('Content', 'wpex'), "dependency" => array('element' => "date", 'value' => array('true'))), array("type" => "dropdown", "heading" => __("Excerpt", 'wpex'), "param_name" => "excerpt", "value" => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array("type" => "textfield", "heading" => __("Excerpt Length", 'wpex'), "param_name" => "excerpt_length", "value" => "15", 'group' => __('Content', 'wpex'), "dependency" => array('element' => "excerpt", 'value' => array('true'))), array("type" => "dropdown", "heading" => __("Trim Custom Excerpts", 'wpex'), "param_name" => "custom_excerpt_trim", "value" => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => ''), 'group' => __('Content', 'wpex'), "dependency" => array('element' => "excerpt", 'value' => array('true'))), array("type" => "dropdown", "heading" => __("Read More", 'wpex'), "param_name" => "read_more", "value" => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array("type" => "textfield", "heading" => __("Read More Text", 'wpex'), "param_name" => "read_more_text", "value" => __('read more', 'wpex'), 'group' => __('Content', 'wpex'), "dependency" => array('element' => "readmore", 'value' => array('true'))), array('type' => "colorpicker", "heading" => __("Content Background", 'wpex'), 'param_name' => "content_background", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Heading Text Color", 'wpex'), 'param_name' => "content_heading_color", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Content Text Color", 'wpex'), 'param_name' => "content_color", 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Content Alignment', 'wpex'), 'param_name' => "content_alignment", 'value' => array(__("Default", "wpex") => "", __("Left", "wpex") => "left", __("Right", "wpex") => "right", __("Center", "wpex") => "center"), 'group' => __('Design', 'wpex')), array('type' => "textfield", "heading" => __("Content Font Size", 'wpex'), 'param_name' => "content_font_size", 'group' => __('Design', 'wpex')), array('type' => "textfield", "heading" => __("Content Margin", 'wpex'), 'param_name' => "content_margin", 'group' => __('Design', 'wpex')), array('type' => "textfield", "heading" => __("Content Padding", 'wpex'), 'param_name' => "content_padding", 'group' => __('Design', 'wpex')), array('type' => "textfield", "heading" => __("Content Opacity", 'wpex'), 'param_name' => "content_opacity", 'group' => __('Design', 'wpex')), array('type' => "textfield", "heading" => __("Content Border", 'wpex'), 'param_name' => "content_border", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Content Read More Background", 'wpex'), 'param_name' => "readmore_background", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Content Read More Color", 'wpex'), 'param_name' => "readmore_color", 'group' => __('Design', 'wpex')))));
 }
				</div><!-- .vcex-staff-grid -->
				
				<?php 
            // Paginate Posts
            if ($pagination == 'true') {
                $total = $vcex_query->max_num_pages;
                $big = 999999999;
                // need an unlikely integer
                if ($total > 1) {
                    if (!($current_page = get_query_var('paged'))) {
                        $current_page = 1;
                    }
                    if (get_option('permalink_structure')) {
                        $format = 'page/%#%/';
                    } else {
                        $format = '&paged=%#%';
                    }
                    echo paginate_links(array('base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'format' => $format, 'current' => max(1, get_query_var('paged')), 'total' => $total, 'mid_size' => 2, 'type' => 'list', 'prev_text' => '<i class="fa fa-angle-left"></i>', 'next_text' => '<i class="fa fa-angle-right"></i>'));
                }
            }
        }
        // End has posts check
        // Set things back to normal
        wp_reset_postdata();
        return ob_get_clean();
    }
    add_shortcode("vcex_staff_grid", "vcex_staff_grid_shortcode");
}
// Add to Visual Composer -------------------------------------------------------------------------- >
vc_map(array("name" => __("Staff Grid", 'vcex'), "base" => "vcex_staff_grid", "class" => "vcex_staff_grid", "category" => __("Staff", "wpex"), "icon" => "icon-wpb-vcex-staff_grid", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Unique Id", 'vcex'), "param_name" => "unique_id", "value" => "", "description" => __("You can enter a unique ID here for styling purposes.", 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Category", 'vcex'), "param_name" => "term_slug", "admin_label" => true, "value" => "all", "description" => __("Enter a category slug to limit your posts.", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Category Filter", 'vcex'), "param_name" => "filter", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false"), "description" => __("Do you wish to display an animated category filter?", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Grid Style", 'vcex'), "param_name" => "grid_style", "value" => array(__("Fit Columns", "wpex") => "fit-columns", __("Masonry", "wpex") => "masonry"), "description" => __("Important: If the category filter is enabled above the grid will always be masonry style.", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Columns", 'vcex'), "param_name" => "columns", "value" => array('4' => '4', '3' => '3', '2' => '2', '1' => '1')), array("type" => "textfield", "class" => "", "heading" => __("Posts Per Page", 'vcex'), "param_name" => "posts_per_page", "value" => "-1", "description" => __("How many items do you wish to show?", 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Image Width", 'vcex'), "param_name" => "img_width", "value" => "9999"), array("type" => "textfield", "class" => "", "heading" => __("Image Height", 'vcex'), "param_name" => "img_height", "value" => "9999"), array("type" => "dropdown", "class" => "", "heading" => __("Image Hard Crop", 'vcex'), "param_name" => "img_crop", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "dropdown", "class" => "", "heading" => __("Image Filter", 'vcex'), "param_name" => "img_filter", "value" => vcex_image_filters()), array("type" => "dropdown", "class" => "", "heading" => __("CSS3 Image Hover", 'vcex'), "param_name" => "img_hover_style", "value" => vcex_image_hovers(), "description" => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Image Links To", 'vcex'), "param_name" => "thumb_link", "value" => array(__("Post", "wpex") => "post", __("Lightbox", "wpex") => "lightbox", __("Nowhere", "wpex") => "nowhere")), array("type" => "checkbox", "class" => "", "heading" => __("Disable Image Overlay?", 'vcex'), "param_name" => "img_overlay_disable", "value" => array(__("Yes please.", "wpex") => 'yes'), "description" => __("Check this box to hide the default overlay when a user hovers over the featured image.", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Order", 'vcex'), "param_name" => "order", "description" => sprintf(__('Designates the ascending or descending order. More at %s.', 'vcex'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex</a>'), "value" => array(__("DESC", "wpex") => "DESC", __("ASC", "wpex") => "ASC")), array("type" => "dropdown", "class" => "", "heading" => __("Order By", 'vcex'), "param_name" => "orderby", "description" => sprintf(__('Select how to sort retrieved posts. More at %s.', 'vcex'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex</a>'), "value" => array(__("Date", "wpex") => "date", __("Name", "wpex") => "name", __("Modified", "wpex") => "modified", __("Author", "wpex") => "author", __("Random", "wpex") => "rand", __("Comment Count", "wpex") => "comment_count")), array("type" => "dropdown", "class" => "", "heading" => __("Pagination", 'vcex'), "param_name" => "pagination", "value" => array(__("False", "wpex") => "false", __("True", "wpex") => "true"), "description" => __("Important: Pagination will not work on your homepage because of how WordPress works", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Title", 'vcex'), "param_name" => "title", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "dropdown", "class" => "", "heading" => __("Excerpt", 'vcex'), "param_name" => "excerpt", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "textfield", "class" => "", "heading" => __("Excerpt Length", 'vcex'), "param_name" => "excerpt_length", "value" => "30", "description" => __("Enter 9999 to display the full post content", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Read More", 'vcex'), "param_name" => "read_more", "value" => array(__("False", "wpex") => "false", __("True", "wpex") => "true")), array("type" => "textfield", "class" => "", "heading" => __("Read More Text", 'vcex'), "param_name" => "read_more_text", "value" => "", "description" => __("Enter your custom text for the readmore button.", "wpex"), "dependency" => array('element' => "read_more", 'value' => "true")), array("type" => "dropdown", "class" => "", "heading" => __("Social Links", 'vcex'), "param_name" => "social_links", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")))));
Exemple #9
0
 function vcex_image_carousel_shortcode_vc_map()
 {
     $vc_img_rendering_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering';
     vc_map(array("name" => __("Image Carousel", 'wpex'), 'description' => __("Image based jQuery carousel.", 'wpex'), "base" => "vcex_image_carousel", 'category' => WPEX_THEME_BRANDING, "icon" => "vcex-image-carousel", "params" => array(array('type' => "attach_images", "admin_label" => true, 'heading' => __("Attach Images", 'wpex'), 'param_name' => "image_ids", 'group' => __('Gallery', 'wpex')), array('type' => 'textfield', 'heading' => __("Unique Id", 'wpex'), 'param_name' => "unique_id", 'value' => ''), array('type' => 'textfield', 'heading' => __("Custom Classes", 'wpex'), 'param_name' => "classes", 'value' => ''), 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' => ''), 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' => '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' => __('Timeout Duration (in milliseconds)', 'wpex'), 'param_name' => "timeout_duration", 'value' => "5000", 'dependency' => array('element' => "auto_play", 'value' => 'true')), array('type' => 'dropdown', 'heading' => __("Style", 'wpex'), 'param_name' => "style", 'value' => array(__("Default", 'wpex') => "", __("No Margins", 'wpex') => "no-margins"), 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Display Arrows?", 'wpex'), 'param_name' => "arrows", 'value' => array(__('True', 'wpex') => 'true', __('False', 'wpex') => 'false'), 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Display Title?', 'wpex'), 'param_name' => "title", 'value' => array(__('True', 'wpex') => 'yes', __('False', 'wpex') => 'false'), 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Title Based On Image", 'wpex'), 'param_name' => "title_type", 'value' => array(__('Title', 'wpex') => 'title', __('Alt', 'wpex') => 'alt'), 'group' => __('Design', 'wpex'), "dependency" => array('element' => 'title', 'value' => array('yes'))), array('type' => 'dropdown', 'heading' => __('Display Caption', 'wpex'), 'param_name' => 'caption', 'value' => array(__('True', 'wpex') => 'yes', __('False', 'wpex') => 'false'), 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Title Font size", 'wpex'), 'param_name' => "content_heading_size", 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Title Margin", 'wpex'), 'param_name' => "content_heading_margin", 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Title Font Weight", 'wpex'), 'param_name' => "content_heading_weight", 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Title Text Transform", 'wpex'), 'param_name' => "content_heading_transform", 'value' => array(__('Default', 'wpex') => '', __('None', 'wpex') => 'none', __('Capitalize', 'wpex') => 'capitalize', __('Uppercase', 'wpex') => 'uppercase', __('Lowercase', 'wpex') => 'lowercase'), 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Title Text Color", 'wpex'), 'param_name' => "content_heading_color", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Content Background", 'wpex'), 'param_name' => "content_background", 'group' => __('Design', 'wpex')), array('type' => "colorpicker", "heading" => __("Content Text Color", 'wpex'), 'param_name' => "content_color", 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Content Alignment', 'wpex'), 'param_name' => "content_alignment", 'value' => array(__("Default", "wpex") => '', __("Left", "wpex") => "left", __("Right", "wpex") => "right", __("Center", "wpex") => "center"), 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Content Font Size", 'wpex'), 'param_name' => "content_font_size", 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Content Margin", 'wpex'), 'param_name' => "content_margin", 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Content Padding", 'wpex'), 'param_name' => "content_padding", 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Content Opacity", 'wpex'), 'param_name' => "content_opacity", 'group' => __('Design', 'wpex')), array('type' => 'textfield', "heading" => __("Content Border", 'wpex'), 'param_name' => "content_border", 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Link", 'wpex'), 'param_name' => "thumbnail_link", 'value' => array(__("None", 'wpex') => "none", __("Lightbox", 'wpex') => "lightbox", __("Custom Links", 'wpex') => "custom_link"), 'group' => __('Links', 'wpex')), 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' => __('Custom link target', 'wpex'), 'param_name' => "custom_links_target", 'description' => __('Select where to open custom links.', 'wpex'), 'dependency' => array('element' => "thumbnail_link", 'value' => 'custom_link'), 'value' => array(__("Same window", 'wpex') => "_self", __("New window", 'wpex') => "_blank"), 'group' => __('Links', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Crop Width", 'wpex'), 'param_name' => "img_width", 'value' => "500", 'group' => __('Image Settings', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Crop Height", 'wpex'), 'param_name' => "img_height", 'value' => "500", 'description' => __('Enter a height in pixels. Set to "9999" to disable vertical cropping and keep image proportions.', 'wpex'), 'group' => __('Image Settings', 'wpex')), array('type' => 'checkbox', 'heading' => __("Rounded Image?", 'wpex'), 'param_name' => 'rounded_image', 'value' => array(__("Yes please.", 'wpex') => 'yes'), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Rendering", 'wpex'), 'param_name' => "img_rendering", 'value' => vcex_image_rendering(), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Filter", 'wpex'), 'param_name' => "img_filter", 'value' => vcex_image_filters(), 'group' => __('Image Settings', 'wpex')), array('type' => 'dropdown', 'heading' => __("CSS3 Image Hover", 'wpex'), 'param_name' => "img_hover_style", 'value' => vcex_image_hovers(), 'group' => __('Image Settings', 'wpex')), array('type' => 'textfield', 'heading' => __("Tablet (768px-659px): Items To Display", 'wpex'), 'param_name' => "tablet_items", 'value' => "3", 'group' => __('Responsive', 'wpex')), array('type' => 'textfield', 'heading' => __("Mobile Landscape (480px-767px): Items To Display", 'wpex'), 'param_name' => "mobile_landscape_items", 'value' => "2", 'group' => __('Responsive', 'wpex')), array('type' => 'textfield', 'heading' => __("Mobile Portrait (0-479px): Items To Display", 'wpex'), 'param_name' => "mobile_portrait_items", 'value' => "1", 'group' => __('Responsive', 'wpex')))));
 }
Exemple #10
0
 function vcex_post_type_grid_shortcode_vcmap()
 {
     vc_map(array('name' => __('Post Types Grid', 'wpex'), 'description' => __('Multiple post types posts grid.', 'wpex'), 'base' => 'vcex_post_type_grid', 'category' => WPEX_THEME_BRANDING, 'icon' => 'vcex-post-type-grid', 'params' => array(array('type' => 'textfield', 'heading' => __("Unique Id", 'wpex'), 'param_name' => "unique_id", 'value' => ""), array('type' => 'dropdown', 'heading' => __("Grid Style", 'wpex'), 'param_name' => "grid_style", 'value' => array(__('Fit Columns', 'wpex') => 'fit_columns', __('Masonry', 'wpex') => 'masonry', __("No Margins", "wpex") => 'no_margins'), 'description' => __('Important: If the category filter is enabled above the grid will always be masonry style.', 'wpex')), array('type' => 'dropdown', 'heading' => __("Equal Heights?", 'wpex'), 'param_name' => "equal_heights_grid", 'value' => array(__("No", "wpex") => "", __("Yes", "wpex") => "true"), 'dependency' => array('element' => 'grid_style', 'value' => 'fit_columns'), 'description' => __('Adds equal heights for the entry content so "boxes" on the same row are the same height. You must have equal sized images for this to work efficiently.', 'wpex')), array('type' => 'dropdown', 'heading' => __("Columns", 'wpex'), 'param_name' => "columns", 'value' => array(__('Six', 'wpex') => '6', __('Five', 'wpex') => '5', __('Four', 'wpex') => '4', __('Three', 'wpex') => '3', __('Two', 'wpex') => '2', __('One', 'wpex') => '1'), "std" => '4'), array('type' => 'dropdown', 'heading' => __("Display Featured Videos?", 'wpex'), 'param_name' => "featured_video", 'value' => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array('type' => 'dropdown', 'heading' => __("Post Link Target", 'wpex'), 'param_name' => "url_target", 'value' => array(__("Self", "wpex") => "_self", __("Blank", "wpex") => "_blank")), array('type' => 'posttypes', 'heading' => __('Post types', 'wpex'), 'param_name' => 'post_types', 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __("Filter by Taxonomy", 'wpex'), 'param_name' => "tax_query", 'value' => array(__("No", "wpex") => '', __("Yes", "wpex") => "true"), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __('Taxonomy Name', 'wpex'), 'param_name' => "tax_query_taxonomy", 'dependency' => array('element' => 'tax_query', 'value' => 'true'), 'group' => __('Query', 'wpex')), array('type' => "exploded_textarea", 'heading' => __('Terms', 'wpex'), 'param_name' => "tax_query_terms", 'dependency' => array('element' => 'tax_query', 'value' => 'true'), 'group' => __('Query', 'wpex'), 'description' => __('Enter the slugs of the terms to include. Divide terms with linebreaks (Enter).', 'wpex')), array('type' => 'dropdown', 'heading' => __("Order", 'wpex'), 'param_name' => "order", 'value' => array(__("DESC", "wpex") => "DESC", __("ASC", "wpex") => "ASC"), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __('Order By', 'wpex'), 'param_name' => 'orderby', 'value' => array(__('Date', 'wpex') => 'date', __('Name', 'wpex') => 'name', __('Modified', 'wpex') => 'modified', __('Author', 'wpex') => 'author', __('Random', 'wpex') => 'rand', __('Comment Count', 'wpex') => 'comment_count', __('Meta Key Value', 'wpex') => 'meta_value', __('Meta Key Value Num', 'wpex') => 'meta_value_num'), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __("Orderby: Meta Key", 'wpex'), 'param_name' => "orderby_meta_key", 'value' => '', 'group' => __('Query', 'wpex'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value_num', 'meta_value'))), array('type' => 'dropdown', 'heading' => __("Pagination", 'wpex'), 'param_name' => "pagination", 'value' => array(__("False", "wpex") => "false", __("True", "wpex") => "true"), 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __("Post With Thumbnails Only", 'wpex'), 'param_name' => "thumbnail_query", 'value' => array(__("No", "wpex") => "false", __("Yes", "wpex") => "true"), 'group' => __('Query', 'wpex')), array('type' => 'textfield', 'heading' => __("Posts Per Page", 'wpex'), 'param_name' => "posts_per_page", 'value' => "12", 'group' => __('Query', 'wpex')), array('type' => 'dropdown', 'heading' => __("Post Type Filter", 'wpex'), 'param_name' => "filter", 'value' => array(__("No", "wpex") => "", __("Yes", "wpex") => "true"), 'group' => __('Filter', 'wpex')), array('type' => "dropdown", 'heading' => __("Layout Mode", 'wpex'), 'param_name' => "masonry_layout_mode", 'value' => array(__('Masonry', 'wpex') => 'masonry', __('Fit Rows', 'wpex') => 'fitRows'), 'group' => __('Filter', 'wpex')), array('type' => 'textfield', 'heading' => __('Custom Filter Speed', 'wpex'), 'param_name' => "filter_speed", 'description' => __('Default is "0.4" seconds', 'wpex'), 'group' => __('Filter', 'wpex')), array('type' => 'dropdown', 'heading' => __("Center Filter Links", 'wpex'), 'param_name' => "center_filter", 'value' => array(__('No', 'wpex') => 'no', __('Yes', 'wpex') => 'yes'), 'group' => __('Filter', 'wpex')), array('type' => 'textfield', 'heading' => __('Filter "All" Text', 'wpex'), 'param_name' => "all_text", 'value' => __('All', 'wpex'), 'group' => __('Filter', 'wpex')), array('type' => 'dropdown', 'heading' => __("Entry Media", 'wpex'), 'param_name' => "entry_media", 'value' => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Width", 'wpex'), 'param_name' => "img_width", 'value' => "9999", 'group' => __('Image', 'wpex')), array('type' => 'textfield', 'heading' => __("Image Height", 'wpex'), 'param_name' => "img_height", 'value' => "9999", 'description' => __("Custom image cropping height. Enter 9999 for no cropping.", 'wpex'), 'group' => __('Image', 'wpex')), vcex_overlays_array('post_types'), array('type' => 'dropdown', 'heading' => __("CSS3 Image Hover", 'wpex'), 'param_name' => "img_hover_style", 'value' => vcex_image_hovers(), 'description' => __("Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.", "wpex"), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Filter", 'wpex'), 'param_name' => "img_filter", 'value' => vcex_image_filters(), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Image Links To", 'wpex'), 'param_name' => "thumb_link", 'value' => array(__("Post", "wpex") => "post", __("Lightbox", "wpex") => "lightbox", __("Nowhere", "wpex") => "nowhere"), 'group' => __('Image', 'wpex')), array('type' => 'dropdown', 'heading' => __("Title", 'wpex'), 'param_name' => "title", 'value' => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __("Date", 'wpex'), 'param_name' => "date", 'value' => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => 'dropdown', 'heading' => __("Excerpt", 'wpex'), 'param_name' => "excerpt", 'value' => array(__("Yes", "wpex") => "true", __("No", "wpex") => "false"), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Excerpt Length", 'wpex'), 'param_name' => "excerpt_length", 'value' => "15", 'group' => __('Content', 'wpex'), 'dependency' => array('element' => "excerpt", 'value' => array('true'))), array('type' => 'dropdown', 'heading' => __("Trim Custom Excerpts", 'wpex'), 'param_name' => "custom_excerpt_trim", 'value' => array(__('Yes', 'wpex') => 'true', __('No', 'wpex') => 'false'), 'group' => __('Content', 'wpex'), 'dependency' => array('element' => "excerpt", 'value' => array('true'))), array('type' => 'dropdown', 'heading' => __("Read More", 'wpex'), 'param_name' => "read_more", 'value' => array(__("No", "wpex") => "false", __("Yes", "wpex") => "true"), 'group' => __('Content', 'wpex')), array('type' => 'textfield', 'heading' => __("Read More Text", 'wpex'), 'param_name' => "read_more_text", 'value' => __('view post', 'wpex'), 'group' => __('Content', 'wpex'), 'dependency' => array('element' => "read_more", 'value' => array('true'))), array('type' => 'colorpicker', 'heading' => __("Title Text Color", 'wpex'), 'param_name' => "content_heading_color", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Title Font size", 'wpex'), 'param_name' => "content_heading_size", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Title Margin", 'wpex'), 'param_name' => "content_heading_margin", 'group' => __('Design', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Date Color", 'wpex'), 'param_name' => "date_color", 'group' => __('Design', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Background", 'wpex'), 'param_name' => "content_background", 'group' => __('Design', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Text Color", 'wpex'), 'param_name' => "content_color", 'group' => __('Design', 'wpex')), array('type' => 'dropdown', 'heading' => __('Content Alignment', 'wpex'), 'param_name' => 'content_alignment', 'value' => array(__("Left", "wpex") => "left", __("Right", "wpex") => "right", __("Center", "wpex") => "center"), 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Font Size", 'wpex'), 'param_name' => "content_font_size", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Margin", 'wpex'), 'param_name' => "content_margin", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Padding", 'wpex'), 'param_name' => "content_padding", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Opacity", 'wpex'), 'param_name' => "content_opacity", 'group' => __('Design', 'wpex')), array('type' => 'textfield', 'heading' => __("Content Border", 'wpex'), 'param_name' => "content_border", 'group' => __('Design', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Read More Background", 'wpex'), 'param_name' => "readmore_background", 'group' => __('Design', 'wpex')), array('type' => 'colorpicker', 'heading' => __("Content Read More Color", 'wpex'), 'param_name' => "readmore_color", 'group' => __('Design', 'wpex')))));
 }
Exemple #11
0
 * @link		http://www.wpexplorer.com
 * @since		Total 1.0.0
 */
/*-----------------------------------------------------------------------------------*/
/*	- Toggle Module
/*-----------------------------------------------------------------------------------*/
vc_add_param('vc_toggle', array('type' => 'textfield', 'heading' => __('Custom ID', 'wpex'), 'param_name' => 'id', 'group' => __('ID', 'wpe')));
/*-----------------------------------------------------------------------------------*/
/*	- Single Image
/*-----------------------------------------------------------------------------------*/
vc_add_param('vc_single_image', array('type' => 'dropdown', 'heading' => __('Image alignment', 'wpex'), 'param_name' => 'alignment', 'value' => wpex_alignments_array(), 'description' => __('Select image alignment.', 'wpex')));
if (function_exists('vcex_image_hovers')) {
    vc_add_param('vc_single_image', array('type' => 'dropdown', 'heading' => __('CSS3 Image Link Hover', 'wpex'), 'param_name' => 'img_hover', 'value' => vcex_image_hovers(), 'description' => __('Select your preferred image hover effect. Please note this will only work if the image links to a URL or a large version of itself. Please note these effects may not work in all browsers.', 'wpex')));
}
if (function_exists('vcex_image_filters')) {
    vc_add_param('vc_single_image', array('type' => 'dropdown', 'heading' => __('Image Filter', 'wpex'), 'param_name' => 'img_filter', 'value' => vcex_image_filters(), 'description' => __('Select an image filter style.', 'wpex')));
}
vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Rounded Image?', 'wpex'), 'param_name' => 'rounded_image', 'value' => array(__('Yes please.', 'wpex') => 'yes'), 'description' => __('For truely rounded images make sure your images are cropped to the same width and height.', 'wpex')));
vc_add_param('vc_single_image', array('type' => 'textfield', 'heading' => __('Image Link Caption', 'wpex'), 'param_name' => 'img_caption', 'description' => __('Use this field to add a caption to any single image with a link.', 'wpex')));
vc_add_param('vc_single_image', array('type' => 'textfield', 'heading' => __('Video, SWF, Flash, URL Lightbox', 'wpex'), 'param_name' => 'lightbox_video', 'description' => __('Enter the URL to a video, SWF file, flash file or a website URL to open in lightbox.', 'wpex'), 'group' => __('Custom Lightbox', 'wpex')));
vc_add_param('vc_single_image', array('type' => 'dropdown', 'heading' => __('Lightbox Type', 'wpex'), 'param_name' => 'lightbox_iframe_type', 'value' => array(__('Auto Detect', 'wpex') => '', __('URL', 'wpex') => 'url', __('Video/Youtube Embed Code', 'wpex') => 'video_embed', __('HTML5', 'wpex') => 'html5', __('Quicktime', 'wpex') => 'quicktime'), 'description' => __('Auto detect depends on the iLightbox API, so by choosing your type it speeds things up and you also allows for HTTPS support.', 'wpex'), 'group' => __('Custom Lightbox', 'wpex'), 'dependency' => array('element' => 'lightbox_video', 'not_empty' => true)));
vc_add_param('vc_single_image', array('type' => 'textfield', 'heading' => __('HTML5 Webm URL', 'wpex'), 'param_name' => 'lightbox_video_html5_webm', 'description' => __('Enter the URL to a video, SWF file, flash file or a website URL to open in lightbox.', 'wpex'), 'group' => __('Custom Lightbox', 'wpex'), 'dependency' => array('element' => 'lightbox_iframe_type', 'value' => 'html5')));
vc_add_param('vc_single_image', array('type' => 'textfield', 'heading' => __('Video/Iframe Lightbox Dimensions', 'wpex'), 'param_name' => 'lightbox_dimensions', 'description' => __('Enter a custom width/height for your lightbox pop-up window. Use format Width x Height. Example: 900x600.', 'wpex'), 'group' => __('Custom Lightbox', 'wpex')));
vc_add_param('vc_single_image', array('type' => 'attach_image', 'admin_label' => false, 'holder' => __('Custom Image Lightbox', 'wpex'), 'heading' => __('Custom Image Lightbox', 'wpex'), 'param_name' => 'lightbox_custom_img', 'description' => __('Select a custom image to open in lightbox format', 'wpex'), 'group' => __('Custom Lightbox', 'wpex')));
vc_add_param('vc_single_image', array('type' => 'attach_images', 'admin_label' => false, 'heading' => __('Gallery Lightbox', 'wpex'), 'param_name' => 'lightbox_gallery', 'description' => __('Select images to create a lightbox Gallery.', 'wpex'), 'group' => __('Custom Lightbox', 'wpex')));
/*-----------------------------------------------------------------------------------*/
/*	- Seperator With Text
/*-----------------------------------------------------------------------------------*/
vc_add_param('vc_text_separator', array('type' => 'dropdown', 'heading' => __('Element Type', 'wpex'), 'param_name' => 'element_type', 'value' => array(__('Div', 'wpex') => 'div', __('H1', 'wpex') => 'h1', __('H2', 'wpex') => 'h2', __('H3', 'wpex') => 'h3', __('H4', 'wpex') => 'h4', __('H5', 'wpex') => 'h5', __('H6', 'wpex') => 'h6'), 'group' => __('Design', 'wpex')));
vc_add_param('vc_text_separator', array('type' => 'dropdown', 'heading' => __('Style', 'wpex'), 'param_name' => 'style', 'value' => array(__('Bottom Border', 'wpex') => 'one', __('Bottom Border With Color', 'wpex') => 'two', __('Line Through', 'wpex') => 'three', __('Double Line Through', 'wpex') => 'four', __('Dotted', 'wpex') => 'five', __('Dashed', 'wpex') => 'six', __('Top & Bottom Borders', 'wpex') => 'seven', __('Graphical', 'wpex') => 'eight', __('Outlined', 'wpex') => 'nine'), 'group' => __('Design', 'wpex')));
vc_add_param('vc_text_separator', array('type' => 'colorpicker', 'heading' => __('Border Color', 'wpex'), 'param_name' => 'border_color', 'description' => __('Select a custom color for your colored border under the title.', 'wpex'), 'dependency' => array('element' => 'style', 'value' => array('two')), 'group' => __('Design', 'wpex')));
Exemple #12
0
				</div><!-- .vcex-blog-grid -->
				
				<?php 
            // Paginate Posts
            if ($pagination == 'true') {
                $total = $vcex_query->max_num_pages;
                $big = 999999999;
                // need an unlikely integer
                if ($total > 1) {
                    if (!($current_page = get_query_var('paged'))) {
                        $current_page = 1;
                    }
                    if (get_option('permalink_structure')) {
                        $format = 'page/%#%/';
                    } else {
                        $format = '&paged=%#%';
                    }
                    echo paginate_links(array('base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'format' => $format, 'current' => max(1, get_query_var('paged')), 'total' => $total, 'mid_size' => 2, 'type' => 'list', 'prev_text' => '&laquo;', 'next_text' => '&raquo;'));
                }
            }
        }
        // End has posts check
        // Set things back to normal
        wp_reset_postdata();
        return ob_get_clean();
    }
    add_shortcode("vcex_blog_grid", "vcex_blog_grid_shortcode");
}
// Add to Visual Composer -------------------------------------------------------------------------- >
vc_map(array("name" => __("Blog Grid", 'vcex'), "base" => "vcex_blog_grid", "class" => "vcex_blog_grid", "category" => __("Blog", "wpex"), "icon" => "icon-wpb-vcex-blog_grid", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Unique Id", 'vcex'), "param_name" => "unique_id", "value" => "", "description" => __("You can enter a unique ID here for styling purposes.", 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Category", 'vcex'), "param_name" => "term_slug", "admin_label" => true, "value" => "all", "description" => __("Enter a category slug to limit your posts.", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Category Filter", 'vcex'), "param_name" => "filter", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false"), "description" => __("Do you wish to display an animated category filter?", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Grid Style", 'vcex'), "param_name" => "grid_style", "value" => array(__("Fit Columns", "wpex") => "fit-columns", __("Masonry", "wpex") => "masonry"), "description" => __("Important: If the category filter is enabled above the grid will always be masonry style.", 'vcex')), array("type" => "dropdown", "class" => "", "heading" => __("Columns", 'vcex'), "param_name" => "columns", "admin_label" => true, "value" => array('4' => '4', '3' => '3', '2' => '2', '1' => '1')), array("type" => "textfield", "class" => "", "heading" => __("Posts Per Page", 'vcex'), "param_name" => "posts_per_page", "value" => "4", "description" => __("How many items do you wish to show?", 'vcex')), array("type" => "textfield", "class" => "", "heading" => __("Image Width", 'vcex'), "param_name" => "img_width", "value" => "9999"), array("type" => "textfield", "class" => "", "heading" => __("Image Height", 'vcex'), "param_name" => "img_height", "value" => "9999"), array("type" => "dropdown", "class" => "", "heading" => __("Image Hard Crop", 'vcex'), "param_name" => "img_crop", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "dropdown", "class" => "", "heading" => __("Image Filter", 'vcex'), "param_name" => "img_filter", "value" => vcex_image_filters()), array("type" => "dropdown", "class" => "", "heading" => __("Image Links To", 'vcex'), "param_name" => "thumb_link", "value" => array(__("Post", "wpex") => "post", __("Lightbox", "wpex") => "lightbox", __("Nowhere", "wpex") => "nowhere")), array("type" => "dropdown", "class" => "", "heading" => __("Order", 'vcex'), "param_name" => "order", "description" => sprintf(__('Designates the ascending or descending order. More at %s.', 'vcex'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex</a>'), "value" => array(__("DESC", "wpex") => "DESC", __("ASC", "wpex") => "ASC")), array("type" => "dropdown", "class" => "", "heading" => __("Order By", 'vcex'), "param_name" => "orderby", "description" => sprintf(__('Select how to sort retrieved posts. More at %s.', 'vcex'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex</a>'), "value" => array(__("Date", "wpex") => "date", __("Name", "wpex") => "name", __("Modified", "wpex") => "modified", __("Author", "wpex") => "author", __("Random", "wpex") => "rand", __("Comment Count", "wpex") => "comment_count")), array("type" => "dropdown", "class" => "", "heading" => __("Pagination", 'vcex'), "param_name" => "pagination", "value" => array(__("False", "wpex") => "false", __("True", "wpex") => "true"), "description" => __("Important: Pagination will not work on your homepage because of how WordPress works", "wpex")), array("type" => "dropdown", "class" => "", "heading" => __("Title", 'vcex'), "param_name" => "title", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "dropdown", "class" => "", "heading" => __("Date", 'vcex'), "param_name" => "date", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "dropdown", "class" => "", "heading" => __("Excerpt", 'vcex'), "param_name" => "excerpt", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")), array("type" => "textfield", "class" => "", "heading" => __("Excerpt Length", 'vcex'), "param_name" => "excerpt_length", "value" => "30"), array("type" => "dropdown", "class" => "", "heading" => __("Read More", 'vcex'), "param_name" => "read_more", "value" => array(__("True", "wpex") => "true", __("False", "wpex") => "false")))));