Plugin Directory

Changeset 1599760


Ignore:
Timestamp:
02/20/2017 12:57:32 PM (9 years ago)
Author:
Sohelwpexpert
Message:

Change Version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • my-news-ticker/trunk/main-function.php

    r1265437 r1599760  
    55Description: 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.
    66Author: news Persons
    7 Version: 1.0
     7Version: 1.1
    88Author URI: paisleyfarmersmarket.ca/sohels/
    99*/
    1010
    1111
    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*/
     13define('WP_MS_NEWS_TICKER_PLUGIN_PATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
     14
     15function ms_news_tickr_latest_jquery() {
     16/**
     17 * Register global styles & scripts.
     18 */
     19wp_register_style('news-news-css', WP_MS_NEWS_TICKER_PLUGIN_PATH.'css/ticker-style.css');
     20wp_register_style('news-style-css', WP_MS_NEWS_TICKER_PLUGIN_PATH.'css/style.css');
     21
     22wp_register_script('news-news-js', WP_MS_NEWS_TICKER_PLUGIN_PATH.'js/jquery.ticker.js', array( 'jquery' ));
    1623
    1724
     25/**
     26 * Enqueue global styles & scripts.
     27 */
     28 
     29wp_enqueue_style('news-news-css');
     30wp_enqueue_style('news-style-css');
    1831
    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__ ));
     32wp_enqueue_script('news-news-js');
     33wp_enqueue_script('jquery');
    2334}
    24 
    25 add_action('init','news_news_plugin_main_js');
     35add_action( 'wp_enqueue_scripts', 'ms_news_tickr_latest_jquery' );
    2636
    2737
Note: See TracChangeset for help on using the changeset viewer.