';
parse_str(urldecode($value), $image_text);
if(is_array($image_text))
{
$i = 1;
foreach ($image_text as $key => $value) {
if(!isset($value['url'])) $value['url'] = '';
$html .= '
';
$i++;
}
}
$html .= '';
$html .= '';
$html .= '';
return $html;
}
// function account menu
sv_add_custom_shortcode_param('add_account_menu', 'sv_add_account_menu', get_template_directory_uri(). '/assets/js/vc_js.js');
function sv_add_account_menu($settings, $value)
{
// $dependency = vc_generate_dependencies_attributes($settings);
$val = $value;
$html = '';
$html .= '';
$html .= '';
return $html;
}
// function banner tab
sv_add_custom_shortcode_param('add_image_banner', 'sv_add_image_banner', get_template_directory_uri(). '/assets/js/vc_js.js');
function sv_add_image_banner($settings, $value){
$val = $value;
$html = '';
parse_str(urldecode($value), $image_text);
if(is_array($image_text))
{
$i = 1;
foreach ($image_text as $key => $value) {
if(!isset($value['url'])) $value['url'] = '';
$html .= '
';
$html .= '
'.esc_html__("Item","bigc").' '.$i.':';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
'.esc_html__("Delete","bigc").'';
$html .= '
';
$i++;
}
}
$html .= '
';
$html .= '';
$html .= '';
return $html;
}
// function social + title
sv_add_custom_shortcode_param('add_social_ex', 'sv_add_social_ex', get_template_directory_uri(). '/assets/js/vc_js.js');
function sv_add_social_ex($settings, $value){
$val = $value;
$html = '';
parse_str(urldecode($value), $social);
if(is_array($social))
{
$i = 1;
foreach ($social as $key => $value) {
if(!isset($value['url'])) $value['url'] = '';
$html .= '
';
$i++;
}
}
$html .= '
';
$html .= '';
$html .= '';
return $html;
}
// function Icon Category
sv_add_custom_shortcode_param('add_icon_cat', 'sv_add_icon_cat', get_template_directory_uri(). '/assets/js/vc_js.js');
function sv_add_icon_cat($settings, $value){
$val = $value;
$html = '';
parse_str(urldecode($value), $social);
if(is_array($social))
{
$i = 1;
foreach ($social as $key => $value) {
$html .= '
';
$i++;
}
}
$html .= '
';
$html .= '';
$html .= '';
return $html;
}
// function social
sv_add_custom_shortcode_param('add_social', 'sv_add_social', get_template_directory_uri(). '/assets/js/vc_js.js');
function sv_add_social($settings, $value){
$val = $value;
$html = '';
parse_str(urldecode($value), $social);
if(is_array($social))
{
$i = 1;
foreach ($social as $key => $value) {
if(!isset($value['url'])) $value['url'] = '';
$html .= '
';
$i++;
}
}
$html .= '
';
$html .= '';
$html .= '';
return $html;
}
// Mutil location param
sv_add_custom_shortcode_param('add_location_map', 'sv_add_location_map', get_template_directory_uri(). '/assets/js/vc_js.js');
function sv_add_location_map($settings, $value){
$val = $value;
$html = '';
parse_str(urldecode($value), $locations);
if(is_array($locations))
{
$i = 1;
foreach ($locations as $key => $value) {
$html .= '
';
$html .= '
'.esc_html__("Location",'bigc').' '.$i.'
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
'.esc_html__("delete",'bigc').'';
$html .= '
';
$i++;
}
}
$html .= '
';
$html .= '';
$html .= '';
return $html;
}
// Mutil location param
if(!class_exists('SV_VisualComposerController'))
{
class SV_VisualComposerController
{
static function _init()
{
add_filter('vc_shortcodes_css_class',array(__CLASS__,'_change_class'), 10, 2);
}
static function _custom_vc_param()
{
}
static function _change_class($class_string, $tag)
{
if($tag=='vc_row' || $tag=='vc_row_inner') {
$class_string = str_replace('vc_row-fluid', '', $class_string);
}
if(defined ('WPB_VC_VERSION'))
{
if(version_compare(WPB_VC_VERSION,'4.2.3','>'))
{
if($tag=='vc_column' || $tag=='vc_column_inner') {
//$class_string = preg_replace('/vc_span(\d{1,2})/', 'col-lg-$1', $class_string);
$class_string=str_replace('vc_col', 'col', $class_string);
// $class_string=str_replace('col-sm', 'col-md', $class_string);
// $class_string=str_replace('col-md2', 'col-sm', $class_string);
}
}else
{
if($tag=='vc_column' || $tag=='vc_column_inner') {
$class_string = preg_replace('/vc_span(\d{1,2})/', 'col-lg-$1', $class_string);
// $class_string=str_replace('col-sm', 'col-md', $class_string);
// $class_string=str_replace('col-md2', 'col-sm', $class_string);
}
}
}
return $class_string;
}
}
SV_VisualComposerController::_init();
SV_VisualComposerController:: _custom_vc_param();
}
}