Exemplo n.º 1
0
// Current element class
$THEMEREX_VC_class = array("param_name" => "class", "heading" => __("Element CSS class", "themerex"), "description" => __("CSS class for current element", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield");
// Current element style
$THEMEREX_VC_style = array("param_name" => "style", "heading" => __("CSS styles", "themerex"), "description" => __("Any additional CSS rules (if need)", "themerex"), "group" => __('Size & Margins', 'themerex'), "class" => "", "value" => "", "type" => "textfield");
// Width and height params
function THEMEREX_VC_width($w = "")
{
    return array("param_name" => "width", "heading" => __("Width", "themerex"), "description" => __("Width (in pixels or percent) of the current element", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => $w, "type" => "textfield");
}
function THEMEREX_VC_height($h = '')
{
    return array("param_name" => "height", "heading" => __("Height", "themerex"), "description" => __("Height (only in pixels) of the current element", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => $h, "type" => "textfield");
}
// Margins params
$THEMEREX_VC_margin_top = array("param_name" => "top", "heading" => __("Top margin", "themerex"), "description" => __("Top margin (in pixels) or set class.", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => array_flip(getMarginSet()), "type" => "dropdown");
$THEMEREX_VC_margin_bottom = array("param_name" => "bottom", "heading" => __("Bottom margin", "themerex"), "description" => __("Bottom margin (in pixels) or set class.", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => array_flip(getMarginSet()), "type" => "dropdown");
$THEMEREX_VC_margin_top_init = array("param_name" => "top", "heading" => __("Top margin", "themerex"), "description" => __("Top margin (in pixels).", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield");
$THEMEREX_VC_margin_bottom_init = array("param_name" => "bottom", "heading" => __("Bottom margin", "themerex"), "description" => __("Bottom margin (in pixels).", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield");
$THEMEREX_VC_margin_left = array("param_name" => "left", "heading" => __("Left margin", "themerex"), "description" => __("Left margin (in pixels) or set class.", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield");
$THEMEREX_VC_margin_right = array("param_name" => "right", "heading" => __("Right margin", "themerex"), "description" => __("Right margin (in pixels) or set class.", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield");
// Accordion
//-------------------------------------------------------------------------------------
vc_map(array("base" => "trx_accordion", "name" => __("Accordion", "themerex"), "description" => __("Accordion items", "themerex"), "category" => __('Content', 'js_composer'), 'icon' => 'icon_trx_accordion', "class" => "trx_sc_collection trx_sc_accordion", "content_element" => true, "is_container" => true, "show_settings_on_create" => true, "as_parent" => array('only' => 'trx_accordion_item'), "params" => array(array("param_name" => "style", "heading" => __("Accordion style", "themerex"), "description" => __("Select style for display accordion", "themerex"), "class" => "", "admin_label" => true, "value" => array(__('Style 1', 'themerex') => 1, __('Style 2', 'themerex') => 2), "type" => "dropdown"), array("param_name" => "counter", "heading" => __("Counter", "themerex"), "description" => __("Display counter before each accordion title", "themerex"), "class" => "", "value" => array("Add item numbers before each element" => "on"), "type" => "checkbox"), array("param_name" => "large", "heading" => __("Large titles", "themerex"), "description" => __("Show large titles", "themerex"), "class" => "", "value" => array("Show large titles" => "on"), "type" => "checkbox"), array("param_name" => "initial", "heading" => __("Initially opened item", "themerex"), "description" => __("Number of initially opened item", "themerex"), "class" => "", "value" => 1, "type" => "textfield"), $THEMEREX_VC_margin_top, $THEMEREX_VC_margin_bottom, $THEMEREX_VC_margin_left, $THEMEREX_VC_margin_right, $THEMEREX_VC_id, $THEMEREX_VC_class), 'default_content' => '
		[trx_accordion_item title="' . __('Item 1 title', 'themerex') . '"][/trx_accordion_item]
		[trx_accordion_item title="' . __('Item 2 title', 'themerex') . '"][/trx_accordion_item]
	', "custom_markup" => '
		<div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">
			%content%
		</div>
		<div class="tab_controls">
			<button class="add_tab" title="' . __("Add item", "themerex") . '">' . __("Add item", "themerex") . '</button>
// Current element class
$THEMEREX_shortcodes_class = array("id" => "class", "title" => __("Element CSS class", "themerex"), "desc" => __("CSS class for current element (optional)", "themerex"), "value" => "", "type" => "text");
// Current element style
$THEMEREX_shortcodes_style = array("id" => "style", "title" => __("CSS styles", "themerex"), "desc" => __("Any additional CSS rules (if need)", "themerex"), "value" => "", "type" => "text");
// Width and height params
function THEMEREX_shortcodes_width($w = "")
{
    return array("id" => "width", "title" => __("Width", "themerex"), "divider" => true, "value" => $w, "type" => "text");
}
function THEMEREX_shortcodes_height($h = '')
{
    return array("id" => "height", "title" => __("Height", "themerex"), "desc" => __("Width (in pixels or percent) and height (only in pixels) of element", "themerex"), "value" => $h, "type" => "text");
}
// Margins params
$THEMEREX_shortcodes_margin_top = array("id" => "top", "title" => __("Top margin", "themerex"), "divider" => true, "value" => "", "type" => "select", "options" => getMarginSet());
$THEMEREX_shortcodes_margin_bottom = array("id" => "bottom", "title" => __("Bottom margin", "themerex"), "value" => "", "type" => "select", "options" => getMarginSet());
$THEMEREX_shortcodes_margin_top_int = array("id" => "top", "title" => __("Top margin", "themerex"), "divider" => true, "value" => "", "type" => "text");
$THEMEREX_shortcodes_margin_bottom_int = array("id" => "bottom", "title" => __("Bottom margin", "themerex"), "value" => "", "type" => "text");
$THEMEREX_shortcodes_margin_left = array("id" => "left", "title" => __("Left margin", "themerex"), "value" => "", "type" => "text");
$THEMEREX_shortcodes_margin_right = array("id" => "right", "title" => __("Right margin", "themerex"), "desc" => __("Margins around list (in pixels).", "themerex"), "value" => "", "type" => "text");
// List's styles
$THEMEREX_shortcodes_list_styles = array('ul' => __("Unordered", 'themerex'), 'ol' => __("Ordered", 'themerex'), 'iconed' => __('Iconed', 'themerex'), 'arrows' => __('Arrows', 'themerex'), 'disk' => __('Disk', 'themerex'));
// Switcher choises
$THEMEREX_shortcodes_yes_no = getYesNoList();
$THEMEREX_shortcodes_on_off = getOnOffList();
$THEMEREX_shortcodes_dir = getDirectionList();
$THEMEREX_shortcodes_align = getAlignmentList();
$THEMEREX_shortcodes_float = getFloatList();
$THEMEREX_shortcodes_show_hide = getShowHideList();
$THEMEREX_shortcodes_sorting = getSortingList();
$THEMEREX_shortcodes_ordering = getOrderingList();