%PDF- %PDF-
Mini Shell

Mini Shell

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

<?php
add_action('vc_before_init','jekas_add_vc_sponsor');
if(!function_exists('jekas_add_vc_sponsor')){
 function jekas_add_vc_sponsor(){
  vc_map(array(
               'name'=>__( 'Sponsor', 'jekas' ),
               'base'=> 'vc_sponsor',
			   'icon' => 'jekas fa fa-user',
              'category' => esc_html__( 'Jekas Options', 'jekas' ),
               'description'=>__( 'Sponsor', 'jekas' ),
               'params'=>array(
                                array(
			            'type' => 'attach_image',
			            'heading' => esc_html__( 'Image', 'jekas' ),
			            'param_name' => 'image',
			            'value' => '',            
			            'description' => esc_html__( 'Select image from media library.', 'jekas' ),
		                   ),
                                 array('type'=>'textfield',
                                     'heading'=>__( 'Title tooltip', 'jekas' ),
                                     'param_name'=>'title',
                                     'value'=>'',
                                     'description'=> esc_html__( 'Tilte showed with tooltip plugin of boostrap.', 'jekas' ),
                                     ), 
                                 ),
                             ));
  
  }
}

  function vc_sponsor_render($atts,$content=''){

      $image = $title = '';

    extract(shortcode_atts(array(
        'image'=>'',
        'title'=>'',
        ),$atts));

    $output='<a href="#" class="tooltip_hover" title="'.$title.'"><img src="'.wp_get_attachment_url($image).'" alt="'.esc_attr__('Image','jekas').'"></a>';
   return $output;
  }
add_shortcode('vc_sponsor','vc_sponsor_render');
?>

Zerion Mini Shell 1.0