Changeset 1599760
- Timestamp:
- 02/20/2017 12:57:32 PM (9 years ago)
- File:
-
- 1 edited
-
my-news-ticker/trunk/main-function.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
my-news-ticker/trunk/main-function.php
r1265437 r1599760 5 5 Description: This plugin will enable news tickr in your wordpress theme. You can embed news tickr via shortcode in everywhere you want, even in theme files. 6 6 Author: news Persons 7 Version: 1. 07 Version: 1.1 8 8 Author URI: paisleyfarmersmarket.ca/sohels/ 9 9 */ 10 10 11 11 12 function news_tickr_wp_latest_jquery() { 13 wp_enqueue_script('jquery'); 14 } 15 add_action('init', 'news_tickr_wp_latest_jquery'); 12 /*Some Set-up*/ 13 define('WP_MS_NEWS_TICKER_PLUGIN_PATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' ); 14 15 function ms_news_tickr_latest_jquery() { 16 /** 17 * Register global styles & scripts. 18 */ 19 wp_register_style('news-news-css', WP_MS_NEWS_TICKER_PLUGIN_PATH.'css/ticker-style.css'); 20 wp_register_style('news-style-css', WP_MS_NEWS_TICKER_PLUGIN_PATH.'css/style.css'); 21 22 wp_register_script('news-news-js', WP_MS_NEWS_TICKER_PLUGIN_PATH.'js/jquery.ticker.js', array( 'jquery' )); 16 23 17 24 25 /** 26 * Enqueue global styles & scripts. 27 */ 28 29 wp_enqueue_style('news-news-css'); 30 wp_enqueue_style('news-style-css'); 18 31 19 function news_news_plugin_main_js() { 20 wp_enqueue_script( 'news-news-js', plugins_url( '/js/jquery.ticker.js', __FILE__ ), array('jquery'), 1.0, false); 21 wp_enqueue_style( 'news-news-css', plugins_url( '/css/ticker-style.css', __FILE__ )); 22 wp_enqueue_style( 'news-style-css', plugins_url( '/css/style.css', __FILE__ )); 32 wp_enqueue_script('news-news-js'); 33 wp_enqueue_script('jquery'); 23 34 } 24 25 add_action('init','news_news_plugin_main_js'); 35 add_action( 'wp_enqueue_scripts', 'ms_news_tickr_latest_jquery' ); 26 36 27 37
Note: See TracChangeset
for help on using the changeset viewer.