"Advanced News Ticker", "category" => 'Advanced Elements', "description" => "Animated News", "base" => "awavc_news_style", "class" => "", "icon" => "awavc-news-ticker-icon", "params" => array( array( "type" => "dropdown", "class" => "", "heading" => __("News Ticker Styles", "awavcl"), "param_name" => "news_ticker", "description" => __("Ps: In a page you can use one tab section...We are on fixing this bug ASAP . then you will use more then one tsb box", "awavcl"), "value" => array( __("Style 1","awavcl") => 'newsticker-1', __("Style 2 (RSS Feed)","awavcl") => 'newsticker-2', __("Style 3 (RTL)","awavcl") => 'newsticker-3', __("Style 4 (RTL RSS Feed) upcoming","awavcl") => 'newsticker-4', ), "admin_label" => true, ), array( "type" => "textfield", "heading" => __("Tab Lable", "awavcl"), "param_name" => "tab_lbl", "value" => "News", "description" => __("Ex: Breaking News", "awavcl"), ), array( 'type' => 'param_group', 'heading' => __( 'News Contents', 'awavcl' ), 'param_name' => 'news_contents', "dependency" => array( 'element' => "news_ticker", 'value' => array('newsticker-1','newsticker-3',) ), 'params' => array( array( "type" => "textfield", "heading" => __("Highlighted text", "awavcl"), "param_name" => "highlite_txt", "value" => "Law And Order Breaks Down: ", "description" => __("", "awavcl"), ), array( "type" => "textfield", "heading" => __("Headlines", "awavcl"), "param_name" => "headline", "value" => "Yellow vest' protests across France trigger spurts of violence, calls for calm", "description" => __("", "awavcl"), ), array( "type" => "textfield", "heading" => __("Healine Numbering", "awavcl"), "param_name" => "num", "value" => "1.1", "description" => __("If dont Want any any numbering then leave it empty", "awavcl"), ), array( "type" => "textfield", "heading" => __("News Details Link Here", "awavcl"), "param_name" => "url", "value" => "https://edition.cnn.com/", "description" => __("must inclued https:// or http://", "awavcl"), ), array( "type" => "dropdown", "heading" => __("Open in", "awavcl"), "param_name" => "target", "value" => array( __("Same Window","awavcl") => "bbb", __("New Window","awavcl") => "_blank", ), ), ), ), array( "type" => "textfield", "heading" => __("RSS Feed Link Here", "awavcl"), "param_name" => "rss_url", "value" => "http://rss.cnn.com/rss/edition.rss", "description" => __("Default Cnn Feed: http://rss.cnn.com/rss/edition.rss", "awavcl"), "dependency" => array( 'element' => "news_ticker", 'value' => array('newsticker-2','newsticker-4',) ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Height', 'awavcl' ), 'param_name' => 'height', "value" => 45, "min" => 5, "max" => 400, "step" => 1, "unit" => "px", "description" => __("Default height is 40px", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __("Play and Pause Button Enabled", "awavcl"), "param_name" => "enabled", "value" => array( __("No Button","awavcl") => "empty", __("Next And Previous Button only","awavcl") => "no_btn", __("Next And Previous With Pause Button","awavcl") => "yes_btn", ), "group" => __("Button", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Lable Font Size', 'awavcl' ), 'param_name' => 'lable_size', "value" => 20, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Headline Font Size', 'awavcl' ), 'param_name' => 'heading_size', "value" => 16, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __("Heading Font style", "awavcl"), "param_name" => "heading_style", "value" => array( __("Normal","awavcl") => "", __("Italic","awavcl") => "italic", ), "group" => __("Settings", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Tab Lable Padding: Top+Bottom', 'awavcl' ), 'param_name' => 'pad_tb', "value" => 5, "min" => 0, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Lable Background Color/Theme Color", 'awavcl'), "param_name" => "lbl_bg_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Lable Color", 'awavcl'), "param_name" => "lable_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Heading Color", 'awavcl'), "param_name" => "heading_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("hilighted Heading Color", 'awavcl'), "param_name" => "high_heading_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Heading Background", 'awavcl'), "param_name" => "heading_bg", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Border Color", 'awavcl'), "param_name" => "brdr_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "news_ticker", 'value' => array('newsticker-1','newsticker-3',) ), ), array( "type" => "colorpicker", "heading" => __("Text Hover Color", 'awavcl'), "param_name" => "hvr_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Button Color", 'awavcl'), "param_name" => "btn_clr", "value" => "", "group" => __("Button", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Button Border Color", 'awavcl'), "param_name" => "btn_brdr_clr", "value" => "", "group" => __("Button", 'awavcl'), ), array( "type" => "textfield", "heading" => esc_attr__("Extra class name", 'awavcl'), "param_name" => "el_class", "description" => esc_attr__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'awavcl'), ), ) )); function awavc_news_style_shortcode($atts, $content = null) { extract(shortcode_atts(array( 'news_ticker' => 'newsticker-1', 'tab_lbl' => 'Breaking News', 'news_contents' => '', 'lable_size' => '', 'heading_size' => '', 'heading_style' => '', 'pad_tb' => '', 'lbl_bg_clr' => '#CE2525', 'lable_clr' => '', 'high_heading_clr' => '', 'heading_clr' => '', 'heading_bg' => '', 'brdr_clr' => '', 'hvr_clr' => '', 'enabled' => 'yes_btn', 'height' => '', 'btn_clr' => '', 'btn_brdr_clr' => '', 'rss_url' => 'http://rss.cnn.com/rss/edition.rss', 'el_class' => '', ), $atts)); wp_register_style( 'awavcl-tcp', plugins_url( '/css/awavc-news-ticker.min.css', __FILE__) ); wp_enqueue_style( 'awavcl-tcp' ); wp_register_script('awavc-tjs', plugins_url('/js/news.js', __FILE__), array('jquery')); wp_enqueue_script('awavc-tjs'); $news_contents = vc_param_group_parse_atts($news_contents); $html = ''; if($news_ticker == 'newsticker-1') { $q = rand(99,99999); $html .= '
'; if (!empty($tab_lbl)){$html .= '
'.$tab_lbl.'
'; } $html .= '
    '; foreach($news_contents as $news_content){ $hihglite =''; $highlite_txt = $news_content['highlite_txt']; $headline = $news_content['headline']; $url = $news_content['url']; $target = ''; if(!empty($news_content['target'])){$target = $news_content['target'];} $num =''; if(!empty($news_content['num'])){$num = $news_content['num'];} if(!empty($highlite_txt)){ $hihglite .= ''.$highlite_txt.'';} $html .= '
  • '.$hihglite.' '.$num.' '.$headline.'
  • '; } $html .= '
'; if($enabled == 'yes_btn'){ $html .= '
'; } if($enabled == 'no_btn'){ $html .= '
'; } $html .= '
'; } if($news_ticker == 'newsticker-2') { $q = rand(99,99999); $html .= '
'; if (!empty($tab_lbl)){$html .= '
'.$tab_lbl.'
'; } $html .= '
  • Data loading...
'; if($enabled == 'yes_btn'){ $html .= '
'; } if($enabled == 'no_btn'){ $html .= '
'; } $html .= '
'; } if($news_ticker == 'newsticker-3') { $q = rand(99,99999); $html .= '
'; if (!empty($tab_lbl)){$html .= '
'.$tab_lbl.'
'; } $html .= '
    '; foreach($news_contents as $news_content){ $hihglite =''; $highlite_txt = $news_content['highlite_txt']; $headline = $news_content['headline']; $url = $news_content['url']; $target = ''; if(!empty($news_content['target'])){$target = $news_content['target'];} $num =''; if(!empty($news_content['num'])){$num = $news_content['num'];} if(!empty($highlite_txt)){ $hihglite .= ''.$highlite_txt.'';} $html .= '
  • '.$hihglite.' '.$num.' '.$headline.'
  • '; } $html .= '
'; if($enabled == 'yes_btn'){ $html .= '
'; } if($enabled == 'no_btn'){ $html .= '
'; } $html .= '
'; } /* if($news_ticker == 'newsticker-4') { $q = rand(99,99999); $html .= '
'; if($enabled == 'yes_btn'){ $html .= '
'; } if($enabled == 'no_btn'){ $html .= '
'; } $html .= '
  • Data loading...
'; if (!empty($tab_lbl)){$html .= '
'.$tab_lbl.'
'; } $html .= ' '; if($enabled == 'yes_btn'){ $html .= '
'; } if($enabled == 'no_btn'){ $html .= '
'; } $html .= '
'; }*/ $html .= ' '; return $html; } add_shortcode("awavc_news_style", "awavc_news_style_shortcode");