Plugin Directory

Changeset 1161754


Ignore:
Timestamp:
05/16/2015 11:09:31 AM (11 years ago)
Author:
msalsas
Message:

Fix registering CSS

Location:
dynamic-audio-player-basic/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dynamic-audio-player-basic/trunk/dynamicplayer.php

    r1160665 r1161754  
    44Plugin URI: http://dynamicaudioplayer.com
    55Description: This plugin allows you to add an audio player widget with a dynamic playlist and shortcodes for single buttons
    6 Version: 2.0.5
     6Version: 2.0.6
    77Author: Manolo Salsas Durán
    88Author URI: http://msalsas.com/en/
     
    5252     
    5353    $dyn_option = get_option( "widget_dynamic-player-widget" );
    54     if(is_array($dyn_option) && isset($dyn_option[1]) && is_array($dyn_option[1]) && isset($dyn_option[1]['dynTotalWidth']) && $dyn_option[1]['dynTotalWidth'] == 'Small')
    55         wp_register_style( 'default-stylesheet', plugins_url('/css/smallPlayer.css', __FILE__) );
    56    
    57     else if(is_array($dyn_option) && isset($dyn_option[1]) && is_array($dyn_option[1]) && isset($dyn_option[1]['dynTotalWidth']) && $dyn_option[1]['dynTotalWidth'] == 'Large')
    58         wp_register_style( 'default-stylesheet', plugins_url('/css/largePlayer.css', __FILE__) );
    59    
    60     else
     54    $styleRegistered = false;
     55    foreach($dyn_option as $option)
     56    {
     57        if(is_array($option) && isset($option['dynTotalWidth']) && $option['dynTotalWidth'] == 'Small')
     58        {
     59            wp_register_style( 'default-stylesheet', plugins_url('/css/smallPlayer.css', __FILE__) );
     60            $styleRegistered = true;
     61            break;
     62        }
     63        else if(is_array($option) && isset($option['dynTotalWidth']) && $option['dynTotalWidth'] == 'Large')
     64        {
     65            wp_register_style( 'default-stylesheet', plugins_url('/css/largePlayer.css', __FILE__) );
     66            $styleRegistered = true;           
     67            break;
     68        }
     69               
     70    }
     71   
     72    if(! $styleRegistered)
     73    {
    6174        wp_register_style( 'default-stylesheet', plugins_url('/css/default.css', __FILE__) );
    62        
     75    }
     76   
    6377    wp_enqueue_style( 'default-stylesheet' );
    6478
     
    104118function dynamic_my_admin_scripts45656754() {
    105119
    106         if(substr($_SERVER["REQUEST_URI"], 0, 57) === "/wp-admin/admin.php?page=dynamic_player_register_settings") {
     120        if(isset($_GET["page"]) && $_GET["page"] === "dynamic_player_register_settings") {
    107121            if(! wp_script_is('media-upload'))
    108122                wp_enqueue_script('media-upload');
  • dynamic-audio-player-basic/trunk/readme.txt

    r1160665 r1161754  
    44Requires at least: 3.0.1
    55Tested up to: 4.2.2
    6 Stable tag: 1.1.2
     6Stable tag: 2.0.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949== Changelog ==
    5050
     51= 2.0.6 =
     52Fix registering css.
     53
    5154= 2.0.5 =
    5255Small fix.
Note: See TracChangeset for help on using the changeset viewer.