Advertisement
KingRayhan

Kc Map

Mar 29th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.32 KB | None | 0 0
  1. <?php
  2. add_action('init', 'drubo_video_shortcode_map'); // Call kc_add_map function ///
  3.  
  4. if(!function_exists('drubo_video_shortcode_map')):
  5.     function drubo_video_shortcode_map(){
  6.         if(function_exists('kc_add_map')): // if kingComposer is active
  7.         kc_add_map(
  8.             array(
  9.                 'TAG_NAME' => array( // <-- shortcode tag name
  10.  
  11.                     'name' => __('Video', DRUBO_SHORTCODE_TEXT_DOMAIN),
  12.                     'icon' => 'sl-control-play',
  13.                     'category' => DRUBO_SHORTCODE_CATEGORY,
  14.                     'params' => array(
  15.                      'TAB_NAME' => array(
  16.                             array(
  17.                                 'name' => 'video_url',
  18.                                 'label' => __('Video URL',DRUBO_SHORTCODE_TEXT_DOMAIN),
  19.                                 'description' => __('youtube video URL',DRUBO_SHORTCODE_TEXT_DOMAIN),
  20.                                 'type' => 'text',
  21.                             ),
  22.  
  23.                      ),
  24.                     'styling' => array(
  25.                           array(
  26.                             'name' => 'custom_css',
  27.                             'type' => 'css',
  28.                             'options' => array(
  29.                                 array(
  30.                                    'screens' => 'any,1024,999,767,479',
  31.                             ////////////////////////////////
  32.                                     'style-tab-1' => array(
  33.                                         array(
  34.                                             'property' => 'color',
  35.                                             'label' => 'Icon Color',
  36.                                             'selector' => '+ .video-shortcode i'
  37.                                         ),
  38.                                      ), // style single tab
  39.                             ////////////////////////////////
  40.                                 )
  41.                              ) //End of options
  42.                     )), //End of styling
  43.                            
  44.                     'animate' => array(
  45.                         array(
  46.                             'name'    => 'animate',
  47.                             'type'    => 'animate'
  48.                         )
  49.                     ), //End of animate
  50.                 // .............................................
  51.                 // .............................................
  52.                 // .............................................
  53.  
  54.                 /////////////////////////////////////////////////////////
  55.                     )// Params
  56.  
  57.                 )// end shortcode key
  58.             )// first array
  59.         ); // End add map
  60.         endif;
  61.     }
  62. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement