Plugin Directory

Changeset 168825


Ignore:
Timestamp:
10/30/2009 07:50:23 PM (16 years ago)
Author:
toddiceton
Message:

Scripts load only outside of admin -- gets rid of SM2 debug button in admin

Location:
wpaudio-mp3-player/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpaudio-mp3-player/trunk/readme.txt

    r168814 r168825  
    117117== Changelog ==
    118118
     119= 2.0.2 =
     120* Load scripts only outside of admin (removes SM2 debug button)
     121
    119122= 2.0.1 =
    120123* Fixed checkbox preference save issue
  • wpaudio-mp3-player/trunk/wpaudio.php

    r168755 r168825  
    55Plugin URI: http://wpaudio.com
    66Description: Play mp3s and podcasts in your posts by converting links and tags into a simple, customizable audio player.
    7 Version: 2.0.1
     7Version: 2.0.2
    88Author: Todd Iceton
    99Author URI: http://ticeton.com
     
    2727
    2828## WPaudio version
    29 $wpa_version = '2.0.1';
     29$wpa_version = '2.0.2';
    3030
    3131## Pre-2.6 compatibility (from WP codex)
     
    8686
    8787## WP handlers
    88 # Calling scripts
    89 add_action('init', 'wpaLibraries');
    90 # Add header action to include CSS and JS vars
    91 add_action('wp_head', 'wpaHead');
    92 # Add shortcode for WPaudio player
    93 add_shortcode('wpaudio', 'wpaShortcode');
    94 # Add filter for shortcode in excerpt and widgets
    95 add_filter('the_excerpt', 'do_shortcode');
    96 add_filter('widget_text', 'do_shortcode');
    97 # Add filter for non-shortcode substitutes (including excerpts and widgets)
    98 if ($wpa_options['wpa_tag_audio']) {
    99     add_filter('the_content', 'wpaFilter');
    100     add_filter('the_excerpt', 'wpaFilter');
    101     add_filter('widget_text', 'wpaFilter');
     88# If it's not an admin page, get everything for the player
     89if (!is_admin()) {
     90    # Calling scripts
     91    add_action('init', 'wpaLibraries');
     92    # Add header action to include CSS and JS vars
     93    add_action('wp_head', 'wpaHead');
     94    # Add shortcode for WPaudio player
     95    add_shortcode('wpaudio', 'wpaShortcode');
     96    # Add filter for shortcode in excerpt and widgets
     97    add_filter('the_excerpt', 'do_shortcode');
     98    add_filter('widget_text', 'do_shortcode');
     99    # Add filter for non-shortcode substitutes (including excerpts and widgets)
     100    if ($wpa_options['wpa_tag_audio']) {
     101        add_filter('the_content', 'wpaFilter');
     102        add_filter('the_excerpt', 'wpaFilter');
     103        add_filter('widget_text', 'wpaFilter');
     104    }
    102105}
    103106# Add admin
Note: See TracChangeset for help on using the changeset viewer.