%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/gachan/www/wp-content/plugins/jekas_extensions/vc_extended/
Upload File :
Create Path :
Current File : /home/gachan/www/wp-content/plugins/jekas_extensions/vc_extended/jekas_composer_include.php

<?php

if(!function_exists('vc_map'))
    return;

define('jekas_COMPOSER_DIR',plugin_dir_path(__FILE__));
define('jekas_COMPOSER_URI',plugin_dir_url(__FILE__));
define('jekas_COMPOSER_TPL_ROW',jekas_COMPOSER_DIR.'/template/row_styles/');

require jekas_COMPOSER_DIR.'params/list_textfield.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_table_pricing.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_portfolio.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_promotion.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_owl_carousel_container.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_gridrotator_image.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_grid_blog.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_owl_carousel_work.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_owl_carousel_team.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_owl_carousel_testimonial.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_result.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_arrow.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_service_process.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_service2.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_service1.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_sponsor.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_slider_team.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_contact_data.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_image.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_list_container.php';
require jekas_COMPOSER_DIR.'shortcodes/jekas_link.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_grid_team.php';
require jekas_COMPOSER_DIR.'shortcodes/jekas_text.php';
require jekas_COMPOSER_DIR.'shortcodes/vc_blogs/vc_blogs.php';

vc_set_shortcodes_templates_dir(jekas_COMPOSER_DIR.'/template');

add_action('vc_after_init','jekas_remap_shortcodes');
if(!function_exists('jekas_remap_shortcodes')){
    function jekas_remap_shortcodes(){

        // remap rows
        $params=array();
        $params[]=array('type'=>'dropdown',
            'param_name'=>'jekas_style',
            'heading'=>__(' Jekas Style row','jekas'),
            'value'=>array(__('Default','jekas')=>'default',
                esc_html__('White Space','jekas')=>'white_space',
                esc_html__('Info title','jekas')=>'info_title',
                esc_html__('Section bordered','jekas')=>'section_bordered',
                esc_html__('Container Simple','jekas')=>'section_simple',
                esc_html__('Section top bordered','jekas')=>'section_top_bordered',
                esc_html__('Section with padding','jekas')=>'section_padding',
                esc_html__('Section with imagen,padding,bg_opacity and parallax effect ','jekas')=>'section_padding_img_bg_opacity',
                esc_html__('Section with imagen,padding,bg_opacity and parallax effect 2','jekas')=>'section_padding_img_bg_opacity2',
                esc_html__('Section with imagen,padding,bg_opacity and parallax effect 3','jekas')=>'section_padding_img_bg_opacity3',
                esc_html__('Section with video background,padding,bg_opacity and border ','jekas')=>'section_video_bg_opacity',
                esc_html__('Section with video background,padding and bg_opacity','jekas')=>'section_video_bg_opacity2',
                esc_html__('Section dark with padding ','jekas')=>'section_dark_padding',
                esc_html__('Section with padding bottom','jekas')=>'section_padding_bottom',
                esc_html__('Section bordered 2','jekas')=>'section_bordered2',
                esc_html__('Section bordered 3','jekas')=>'section_bordered3',
                esc_html__('Section top bordered 2','jekas')=>'section_top_bordered2',
                esc_html__('Section top bordered 3','jekas')=>'section_top_bordered3',
                esc_html__('Section with background skin','jekas')=>'section_skin',
            ),

        );
        $params[]=array('type'=>'dropdown',
            'param_name'=>'effect',
            'heading'=>__('Effect to load','jekas'),
            'value'=>array(__('-None -','jekas')=>'',
                esc_html__('FadeInUp','jekas')=>'wow fadeInUp',
                esc_html__('FadeInDown','jekas')=>'wow fadeInDown',
                esc_html__('FadeInLeft','jekas')=>'wow fadeInLeft',
                esc_html__('FadeInRight','jekas')=>'wow fadeInRight',
            ),

        );
        vc_add_params('vc_row_inner',$params);

        $params[]=array('type'=>'list_textfield',
            'param_name'=>'video_url',
            'heading'=>__('Video url background','jekas'),
            'value'=>'',
            'dependency' => array(
                'element' => 'jekas_style',
                'value'   => array('section_video_bg_opacity','section_video_bg_opacity2'),
            ),
        );

        $params[] = array(
            'type'        => 'textfield',
            'param_name'  => 'id_section',
            'heading'     => esc_html__('Id Section','jekas'),
            'description' => esc_html__('Used by identify section on one page','jekas'),
            'param_holder_class' => 'field-section',
        );


        vc_add_params('vc_row',$params);

        // remap vc_column
        $params=array();
        $params[]=array('type'=>'dropdown',
            'param_name'=>'effect',
            'heading'=>__('Effect to load','jekas'),
            'value'=>array(__('-None -','jekas')=>'',
                esc_html__('FadeInUp','jekas')=>'wow fadeInUp',
                esc_html__('FadeInDown','jekas')=>'wow fadeInDown',
                esc_html__('FadeInLeft','jekas')=>'wow fadeInLeft',
                esc_html__('FadeInRight','jekas')=>'wow fadeInRight',
            ),

        );
        $params[]=array('type'=>'checkbox',
            'param_name'=>'white_space',
            'heading'=>__('White space','jekas'),
            'value'=>array(__('Yes','jekas')=>'1',
            ),

        );
        vc_add_params('vc_column',$params);
        $params[]=array(
            'type' => 'column_offset',
            'heading' => esc_html__( 'Responsivenes', 'jekas' ),
            'param_name' => 'offset',
            'group' => esc_html__( 'Width & Responsiveness', 'jekas' ),
        );
        vc_add_params('vc_column_inner',$params);

        vc_remove_param('vc_progress_bar','units');
        //update vc_button
        $param=array('type'=>'dropdown',
            'heading'=>__( 'Button type', 'jekas' ),
            'param_name'=>'button_type',
            'value'=>array(
                esc_html__('1','jekas')=>'button',
                esc_html__('2','jekas')=>'btn',
            ),
        );
        vc_add_param('vc_button',$param);
        $param = WPBMap::getParam( 'vc_button', 'color' );
        $param['type']='colorpicker';
        $param['value']='';
        vc_update_shortcode_param('vc_button',$param);
        $param = WPBMap::getParam( 'vc_button', 'icon' );
        $param['type']='iconpicker';
        $param['value']='';
        vc_update_shortcode_param('vc_button',$param);

        $param = WPBMap::getParam( 'vc_button', 'size' );
        $param['value']= array(
            esc_html__( 'Regular size', 'jekas' ) => '',
            esc_html__( 'Large', 'jekas' ) => 'btn-lg',
            esc_html__( 'Small', 'jekas' ) => 'btn-sm',
            esc_html__( 'Mini', 'jekas' ) => "btn-xs"
        );
        vc_update_shortcode_param('vc_button',$param);
        // vc_image


    }
}

function jekas_extract_img_css($css){
    $pos=strpos($css,'url');
    if($pos==-1) return '';
    $sub=substr($css,$pos);
    $end=strpos($sub,'?');
    $long=($end==-1) ? strpos($sub,')')-4 :$end-4;
    return substr($sub,4,$long);
}
function jekas_extract_img_repeat($css){
    foreach(array('repeat-x','repeat-y','no-repeat','repeat') as $repeat)
        if(strpos($css,$repeat))
            return $repeat;
    return '';
}

function jekas_buildStyle($css){
    if(!empty($css)){
        $begin=strpos($css,'{');
        $end=strpos($css,'}');
        $rule= substr($css,$begin,$end);
        $rule=str_replace(array('!important','{','}'),'',$rule);
        $style='style="'.$rule.'"';
        return $style;
    }
    return '';
}
function jekas_extract_image_rule(&$css){
    $pos=(int)strpos($css,'background-image');
    if($pos>0)
    {
        $sub=substr($css,$pos);
        $end=strpos($sub,';');
        $sub=substr($sub,0,$end+1);
        $css=str_replace($sub,'',$css);
    }
    $pos=strpos($css,'url');
    if(!empty($pos) || $pos!=-1)
    {
        $sub=substr($css,$pos);
        $end=strpos($sub,')');
        $sub=substr($sub,0,$end+1);
        $css=str_replace($sub,'',$css);
    }
}





Zerion Mini Shell 1.0