Пример #1
0
function ewf_register_vc_portfolio_grid()
{
    vc_map(array("name" => __("Portfolio Grid", 'bitpub'), "base" => "ewf-portfolio-grid", "class" => "", "icon" => "icon-wpb-ewf-portfolio-grid", "description" => __("Show portfolio items, pagination optional", 'bitpub'), "category" => EWF_SETUP_VC_GROUP, "params" => array(array("type" => "textfield", "holder" => "div", "class" => "", "heading" => __("Number of portfolio items", 'bitpub'), "param_name" => "items", "value" => 8, "description" => __("Select the number of items the grid should display. If Pagination is enabled this is the number of portfolio items per page. if pagination is disabled this is the total number of items", 'bitpub')), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Prortfolio grid layout", 'bitpub'), "param_name" => "columns", "value" => array(__('3 Columns', 'bitpub') => 3)), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Source of the portfolio items from the grid", 'bitpub'), "param_name" => "list", "value" => array(__('Random', 'bitpub') => 'random', __('From a service', 'bitpub') => 'service', __('Latest projects', 'bitpub') => 'latest')), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Service", 'bitpub'), "param_name" => "service", "value" => ewf_vc_portfolio_grid_services(), "description" => __("Specify projects from a defined category", 'bitpub'), "dependency" => array("element" => "list", "value" => array("service"))), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Projects order", 'bitpub'), "param_name" => "order", "value" => array('DESC', 'ASC'), "dependency" => array("element" => "list", "value" => array("service")), "description" => __("Load projects in a Ascendent(1,2,3) or Descendent (3,2,1) order", 'bitpub')), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Enable pagination?", 'bitpub'), "param_name" => "nav", "value" => array(__('Yes', 'bitpub') => 1, __('No', 'bitpub') => 0)), array("type" => "textfield", "holder" => "div", "class" => "", "heading" => __("Extra CSS Class", 'bitpub'), "param_name" => "css", "value" => '', "description" => __("Add and extra CSS class to the component", 'bitpub')))));
}
function ewf_register_vc_portfolio_grid()
{
    vc_map(array("name" => __("Portfolio Grid", EWF_SETUP_THEME_DOMAIN), "base" => "ewf-portfolio-grid", "class" => "", "icon" => "icon-wpb-ewf-portfolio-grid", "description" => __("Add a full width row with porftolio items", EWF_SETUP_THEME_DOMAIN), "category" => __('Portfolio', EWF_SETUP_THEME_DOMAIN), "params" => array(array("type" => "textfield", "holder" => "div", "class" => "", "heading" => __("Number of portfolio items", EWF_SETUP_THEME_DOMAIN), "param_name" => "items", "value" => 9, "description" => __("Select the number of items you want to load", EWF_SETUP_THEME_DOMAIN)), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Prortfolio grid layout", EWF_SETUP_THEME_DOMAIN), "param_name" => "columns", "value" => array(__('3 Columns', EWF_SETUP_THEME_DOMAIN) => 3, __('4 Columns', EWF_SETUP_THEME_DOMAIN) => 4)), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("How should the portfolio items to load, be chosen", EWF_SETUP_THEME_DOMAIN), "param_name" => "list", "value" => array(__('Random', EWF_SETUP_THEME_DOMAIN) => 'random', __('From a service', EWF_SETUP_THEME_DOMAIN) => 'service', __('Latest projects', EWF_SETUP_THEME_DOMAIN) => 'latest')), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Service", EWF_SETUP_THEME_DOMAIN), "param_name" => "service", "value" => ewf_vc_portfolio_grid_services(), "description" => __("Specify projects from a defined category", EWF_SETUP_THEME_DOMAIN), "dependency" => array("element" => "list", "value" => array("service"))), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => __("Projects order", EWF_SETUP_THEME_DOMAIN), "param_name" => "order", "value" => array('DESC', 'ASC'), "dependency" => array("element" => "list", "value" => array("service")), "description" => __("Load projects in a Ascendent(1,2,3) or Descendent (3,2,1) order", EWF_SETUP_THEME_DOMAIN)))));
}