function _adap_sc_add_column_full_width_option() { if (function_exists('wpb_add_param')) { wpb_add_param('vc_column', AdapAutoVCShortcode::bool_param('full_width', 'Full Width', 'Make Full Width', 'Don\'t Make Full Width', false)); wpb_add_param('vc_column', array('type' => 'dropdown', 'heading' => 'Align', 'param_name' => 'align', 'sch_default' => 'align-none', 'value' => array('None' => 'align-none', 'Align Left' => 'align-left', 'Align Center' => 'align-center', 'Align Right' => 'align-right'), 'description' => 'The content alignment of the column')); vc_add_param('rev_slider_vc', array('type' => 'dropdown', 'heading' => 'Arrow Style', 'param_name' => 'arrow_style', 'sch_default' => 'small', 'value' => array('Small' => 'small', 'Big' => 'big'), 'description' => 'The arrow styling')); } }
/** * Override Row behavior */ function init_alt_row() { if (function_exists('wpb_map')) { wpb_map(array("name" => __("Row", 'adap_sc'), "base" => "vc_row", "is_container" => true, "icon" => "icon-wpb-row", "show_settings_on_create" => false, "category" => __('Content', 'adap_sc'), "params" => array(array("type" => "textfield", "heading" => __("Extra class name", 'adap_sc'), "param_name" => "el_class", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'adap_sc')), AdapAutoVCShortcode::bool_param('full_width', 'Full Width', 'Make Full Width', 'Don\'t Make Full Width', false), AdapAutoVCShortcode::bool_param('content_full_width', 'Content Full Width', 'Make Content Full Width', 'Don\'t Make Content Full Width', false, array('element' => "full_width", 'value' => array('true'))), AdapAutoVCShortcode::bool_param('background_transparent', 'Background Transparency', 'Make Transparent', 'Don\'t Make Transparent', false, array('element' => "full_width", 'value' => array('true'))), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Background Color', 'adap_sc'), 'param_name' => 'background_color', 'value' => null, 'description' => __('The background color that is applied to the row if the row is full width.', 'adap_sc')), array("type" => "attach_image", 'holder' => 'div', 'class' => '', 'heading' => __('Background Image', 'adap_sc'), 'param_name' => 'background_image', 'value' => null, 'description' => __('The background image that is applied to the row if the row is full width.', 'adap_sc')), array('type' => 'dropdown', 'heading' => __('Background Image Repeat', 'adap_sc'), 'param_name' => 'background_repeat', 'sch_default' => 'repeat', 'value' => array('Repeat All' => 'repeat', 'Repeat X' => 'repeat-x', 'Repeat Y' => 'repeat-y', 'No Repeat' => 'no-repeat')), array('type' => 'dropdown', 'heading' => __('Background Position', 'adap_sc'), 'param_name' => 'background_position', 'sch_default' => 'top left', 'value' => array('Top Left' => 'top left', 'Top Center' => 'top center', 'Top Right' => 'top right', 'Center Left' => 'center left', 'Center Center' => 'center center', 'Center Right' => 'center right', 'Bottom Left' => 'bottom left', 'Bottom Center' => 'bottom center', 'Bottom Right' => 'bottom right')), array('type' => 'dropdown', 'heading' => __('Background Attachment', 'adap_sc'), 'param_name' => 'background_attachment', 'sch_default' => 'scroll', 'value' => array('Scroll' => 'scroll', 'Fixed' => 'fixed', 'Inherit' => 'inherit')), AdapAutoVCShortcode::bool_param('background_cover', 'Stretch Background Image')), "js_view" => 'VcRowView')); } }
function configureParams() { $cats = get_categories(); $cat_vals = array(); foreach ($cats as $c) { $cat_vals[$c->name] = $c->slug; } $this->params = array('name' => 'Blog', 'base' => $this->sc_handle, 'class' => '', 'category' => __('Content', 'adap_sc'), 'params' => array(array('type' => 'textfield', 'heading' => 'Items', 'param_name' => 'items', 'value' => '10', 'description' => 'The number of items to show on a given page. Set to -1 to show all.'), array('type' => 'dropdown', 'heading' => 'Layout', 'param_name' => 'layout', 'sch_default' => 'large-image', 'value' => array('Large Images' => 'large-image', 'Medium Image' => 'medium-image', 'Full Size' => 'full-image', 'Full Size (Alternate)' => 'full-image-alt', 'Grid' => 'grid'), 'description' => 'What to display for each post.'), array('type' => 'dropdown', 'heading' => 'Number of Columns', 'param_name' => 'columns', 'sch_default' => 4, 'value' => array('Four' => 4, 'Three' => 3, 'Two' => 2, 'One' => 1), "dependency" => array('element' => "layout", 'value' => array('grid'))), AdapAutoVCShortcode::bool_param('grid_show_title', 'Show Title', null, null, true, array('element' => "layout", 'value' => array('grid'))), AdapAutoVCShortcode::bool_param('grid_show_excerpt', 'Show Excerpt', null, null, true, array('element' => "layout", 'value' => array('grid'))), AdapAutoVCShortcode::bool_param('grid_show_meta', 'Show Meta', null, null, true, array('element' => "layout", 'value' => array('grid'))), AdapAutoVCShortcode::$order_param, AdapAutoVCShortcode::$orderby_param, array('type' => 'dropdown', 'heading' => 'Paginate', 'param_name' => 'paginate', 'value' => array('Paginate' => 'yes', 'Don\'t Paginate' => 'no')), array("type" => "checkbox", "heading" => __("Categories", 'adap_sc'), "param_name" => "categories", "value" => $cat_vals, "description" => __("If you want to narrow output, select category names here. Note: Only selected categories will be included.", 'adap_sc')), array('type' => 'dropdown', 'heading' => 'Display', 'param_name' => 'display', 'value' => array('Content' => 'content', 'Excerpt' => 'excerpt'), 'description' => 'What to display for each post.'))); }
function configureParams() { $this->params = array('name' => 'Spacer', 'base' => $this->sc_handle, 'class' => '', 'category' => __('Content', 'adap_sc'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'class' => '', 'heading' => __("Height", 'adap_sc'), 'param_name' => 'height', 'value' => '23', 'description' => __('The height (in pixels) of the spacer', 'adap_sc')), AdapAutoVCShortcode::bool_param('display_desktop', __('Display in Desktop Layout', 'adap_sc')), AdapAutoVCShortcode::bool_param('display_tablet', __('Display in Tablet Layout', 'adap_sc')), AdapAutoVCShortcode::bool_param('display_mobile', __('Display in Mobile Layout', 'adap_sc')))); }
function register_vc() { wpb_add_param('vc_gallery', AdapAutoVCShortcode::bool_param('show_title', 'Show Title')); wpb_add_param('vc_gallery', AdapAutoVCShortcode::bool_param('show_caption', 'Show Caption')); }
function register_vc() { $vc_is_wp_version_3_6_more = version_compare(preg_replace('/^([\\d\\.]+)(\\-.*$)/', '$1', get_bloginfo('version')), '3.6') >= 0; //deregister and reregister how we'd like the accordion options to appear wpb_remove('vc_tabs'); wpb_remove('vc_tab'); $tab_id_1 = time() . '-1-' . rand(0, 100); $tab_id_2 = time() . '-2-' . rand(0, 100); wpb_map(array("name" => __("Tabs", 'adap_sc'), "base" => "vc_tabs", "show_settings_on_create" => false, "is_container" => true, "icon" => "icon-wpb-ui-tab-content", "category" => __('Content', 'adap_sc'), "params" => array(array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Tab Heading Color', 'adap_sc'), 'param_name' => 'tab_heading_color', 'value' => null, 'description' => __('The color of the text in tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Tab Heading Background Color', 'adap_sc'), 'param_name' => 'tab_heading_background_color', 'value' => null, 'description' => __('The background color of the tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Active Tab Heading Color', 'adap_sc'), 'param_name' => 'active_tab_heading_color', 'value' => null, 'description' => __('The color of the text in the active tab heading.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Active Tab Heading background Color', 'adap_sc'), 'param_name' => 'active_tab_heading_background_color', 'value' => null, 'description' => __('The background color of the active tab heading.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Hover Tab Heading Color', 'adap_sc'), 'param_name' => 'hover_tab_heading_color', 'value' => null, 'description' => __('The hover color of the text in tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Hover Tab Heading Background Color', 'adap_sc'), 'param_name' => 'hover_tab_heading_background_color', 'value' => null, 'description' => __('The hover background color of the tab headings.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Content Color', 'adap_sc'), 'param_name' => 'content_color', 'value' => null, 'description' => __('The color of the content in tabs.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Content Background Color', 'adap_sc'), 'param_name' => 'content_background_color', 'value' => null, 'description' => __('The background color of the tab content.', 'adap_sc'))), "custom_markup" => ' <div class="wpb_tabs_holder wpb_holder vc_container_for_children"> <ul class="tabs_controls"> </ul> %content% </div>', 'default_content' => ' [vc_tab title="' . __('Tab 1', 'adap_sc') . '" tab_id="' . $tab_id_1 . '"][/vc_tab] [vc_tab title="' . __('Tab 2', 'adap_sc') . '" tab_id="' . $tab_id_2 . '"][/vc_tab] ', "js_view" => $vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35')); /* Tour section ---------------------------------------------------------- */ $tab_id_1 = time() . '-1-' . rand(0, 100); $tab_id_2 = time() . '-2-' . rand(0, 100); // WPBMap::map('vc_tour', array( // "name" => __("Tour Section", 'adap_sc'), // "base" => "vc_tour", // "show_settings_on_create" => false, // "is_container" => true, // "container_not_allowed" => true, // "icon" => "icon-wpb-ui-tab-content-vertical", // "category" => __('Content', 'js_composer'), // "wrapper_class" => "clearfix", // "params" => array(), // "custom_markup" => ' // <div class="wpb_tabs_holder wpb_holder clearfix vc_container_for_children"> // <ul class="tabs_controls"> // </ul> // %content% // </div>' // , // 'default_content' => ' // [vc_tab title="' . __('Slide 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab] // [vc_tab title="' . __('Slide 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab] // ', // "js_view" => ($vc_is_wp_version_3_6_more ? 'VcTabsView' : 'VcTabsView35') // )); wpb_map(array("name" => __("Tab", 'adap_sc'), "base" => "vc_tab", "allowed_container_element" => 'vc_row', "is_container" => true, "content_element" => false, "params" => array(array("type" => "textfield", "heading" => __("Title", 'adap_sc'), "param_name" => "title", "description" => __("Tab title.", 'adap_sc')), array("type" => "tab_id", "heading" => __("Tab ID", 'adap_sc'), "param_name" => "tab_id"), AdapAutoVCShortcode::bool_param('active', 'Display on load', null, null, false)), 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35')); }
function configureParams() { $cats = get_terms('portfolio_category', array('hide_empty' => false)); $cat_vals = array('None' => ''); foreach ($cats as $c) { $cat_vals[$c->name] = $c->slug; } $pitems = get_posts(array('posts_per_page' => -1, 'post_type' => 'portfolio')); $post_vals = array(); foreach ($pitems as $item) { $post_vals[$item->post_name] = $item->ID; } $this->params = array('name' => 'Portfolio', 'base' => $this->sc_handle, 'class' => '', 'category' => __('Content', 'adap_sc'), 'params' => array(array('type' => 'textfield', 'heading' => 'Items', 'param_name' => 'items', 'value' => '10', 'description' => 'The number of items to show on a given page. Set to -1 to show all.'), AdapAutoVCShortcode::$order_param, AdapAutoVCShortcode::$orderby_param, array('type' => 'dropdown', 'heading' => 'Number of Columns', 'param_name' => 'columns', 'sch_default' => 4, 'value' => array('Four' => 4, 'Three' => 3, 'Two' => 2, 'One' => 1)), AdapAutoVCShortcode::bool_param('generate_thumbnail', 'Generate thumbnail matching column size'), AdapAutoVCShortcode::bool_param('show_title', 'Display Title'), AdapAutoVCShortcode::bool_param('show_excerpt', 'Display Excerpt'), AdapAutoVCShortcode::bool_param('show_filters', 'Display Filters'), array('type' => 'dropdown', 'heading' => 'Filter Displays', 'param_name' => 'filter_display', 'sch_default' => 'text', 'value' => array('Text' => 'text', 'Icons' => 'icon'), 'dependency' => array('element' => "show_filters", 'value' => array('true'))), AdapAutoVCShortcode::bool_param('show_pagination', 'Display Pagination'), AdapAutoVCShortcode::bool_param('show_item_categories', 'Display portfolios\' associated categories.'), array('type' => 'dropdown', 'heading' => 'Link Behavior', 'param_name' => 'link_behavior', 'sch_default' => 'lightbox', 'value' => array('Link to Lightbox of the Featured Image' => 'lightbox', 'Link to Portfolio Item Page' => 'detail_page')), array('type' => 'textfield', 'heading' => 'Show All Text', 'param_name' => 'show_all_text', 'value' => 'Show All', 'description' => 'Defines the display text for the "Show All" filter'), array('type' => 'dropdown', 'heading' => 'Paginate', 'param_name' => 'paginate', 'value' => array('Paginate' => 'yes', 'Don\'t Paginate' => 'no')), array("type" => "checkbox", "heading" => __("Categories", 'adap_sc'), "param_name" => "categories", "value" => $cat_vals, "description" => __("If you want to narrow output, select category names here. Note: Only selected categories will be included.", 'adap_sc')), array("type" => "checkbox", "heading" => __("Exclude Portfolio Items", 'adap_sc'), "param_name" => "exclude", "sch_default" => '', "value" => $post_vals, "description" => __("Exclude the selected items from the portfolio", 'adap_sc')))); }
function configureParams() { $this->params = array('name' => 'Hero Unit', 'base' => $this->sc_handle, 'class' => '', 'category' => __('Content', 'adap_sc'), "is_container" => true, 'js_view' => 'VcColumnView', 'params' => array(array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Background Color', 'adap_sc'), 'param_name' => 'background_color', 'value' => null, 'description' => __('The background color of blockquote.', 'adap_sc'), "dependency" => array('element' => "style", 'value' => array('style1'))), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Text Color', 'adap_sc'), 'param_name' => 'text_color', 'value' => null, 'description' => __('The text color of blockquote.', 'adap_sc')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Heading Color', 'adap_sc'), 'param_name' => 'heading_color', 'value' => null, 'description' => __('The heading color of blockquote.', 'adap_sc')), array('type' => 'checkbox', 'holder' => 'div', 'class' => '', 'heading' => __('Center everything in mobile?', 'adap_sc'), 'param_name' => 'mobile_center', 'sch_default' => 'false', 'value' => array('Enable' => 'true'), 'description' => __('Check this to align content to the center in the mobile layout.', 'adap_sc')), AdapAutoVCShortcode::bool_param('rounded_corners', __('Round the corners?', 'adap_sc')), array('type' => 'dropdown', 'heading' => 'Padding', 'param_name' => 'padding', 'sch_default' => 'normal', 'value' => array('Normal' => 'normal', 'Small' => 'small', 'None' => 'none')))); }