Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action('init', 'drubo_video_shortcode_map'); // Call kc_add_map function ///
- if(!function_exists('drubo_video_shortcode_map')):
- function drubo_video_shortcode_map(){
- if(function_exists('kc_add_map')): // if kingComposer is active
- kc_add_map(
- array(
- 'TAG_NAME' => array( // <-- shortcode tag name
- 'name' => __('Video', DRUBO_SHORTCODE_TEXT_DOMAIN),
- 'icon' => 'sl-control-play',
- 'category' => DRUBO_SHORTCODE_CATEGORY,
- 'params' => array(
- 'TAB_NAME' => array(
- array(
- 'name' => 'video_url',
- 'label' => __('Video URL',DRUBO_SHORTCODE_TEXT_DOMAIN),
- 'description' => __('youtube video URL',DRUBO_SHORTCODE_TEXT_DOMAIN),
- 'type' => 'text',
- ),
- ),
- 'styling' => array(
- array(
- 'name' => 'custom_css',
- 'type' => 'css',
- 'options' => array(
- array(
- 'screens' => 'any,1024,999,767,479',
- ////////////////////////////////
- 'style-tab-1' => array(
- array(
- 'property' => 'color',
- 'label' => 'Icon Color',
- 'selector' => '+ .video-shortcode i'
- ),
- ), // style single tab
- ////////////////////////////////
- )
- ) //End of options
- )), //End of styling
- 'animate' => array(
- array(
- 'name' => 'animate',
- 'type' => 'animate'
- )
- ), //End of animate
- // .............................................
- // .............................................
- // .............................................
- /////////////////////////////////////////////////////////
- )// Params
- )// end shortcode key
- )// first array
- ); // End add map
- endif;
- }
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement