Plugin Directory

Changeset 634515


Ignore:
Timestamp:
12/05/2012 08:10:47 PM (13 years ago)
Author:
InoPlugs
Message:

Exclude stylesheet from admin screen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-backgrounds-lite/trunk/inoplugs_classes/inoplugs_background_display.php

    r573497 r634515  
    3131    public function handler_frontend_includes()
    3232    {
    33         $ino_backgrounds_path = INO_WPBLITE_URLPATH.'includes/';
    34         wp_register_style('inoplugs_backgrounds_css', $ino_backgrounds_path.'wp-backgrounds.css');
     33        $ino_backgrounds_path = INO_WPBLITE_URLPATH.'includes/';
    3534        wp_enqueue_script('jquery');
    36         wp_enqueue_style('inoplugs_backgrounds_css');
     35
     36        if(!is_admin())
     37        {
     38            wp_register_style('inoplugs_backgrounds_css', $ino_backgrounds_path.'wp-backgrounds.css');
     39            wp_enqueue_style('inoplugs_backgrounds_css');
     40        }
    3741    }
    3842
     
    4953        }
    5054        $images_slideshow = $this->set_bg_images();
    51        
     55
    5256        $background_slideshow = '';
    5357        $background_slideshow .= "\n\n\n<!--\n\n";
     
    5559        $background_slideshow .="#                      Fullscreen Backgrounds generated by                    #\n";
    5660        $background_slideshow .="#       WP-Backgrounds Lite Plugin by InoPlugs (http://inoplugs.com)          #\n";
    57         $background_slideshow .="###############################################################################\n";                   
     61        $background_slideshow .="###############################################################################\n";
    5862        $background_slideshow .="\n-->\n";
    59        
    60        
     63
     64
    6165        if ($this->deactivate == "1")
    6266        {
     
    6670
    6771        $ino_backgrounds_path = WP_PLUGIN_URL.'/wp-backgrounds-lite/includes/';
    68        
     72
    6973        $background_slideshow .= "<script type='text/javascript' src='".$ino_backgrounds_path."wp-backgrounds.js'></script>\n";
    70        
     74
    7175        $background_slideshow .= "<style type=\"text/css\">\n";
    72        
     76
    7377        if ( !empty($this->ino_bglite_options['zindex']) )
    7478        {
     
    7983            $background_slideshow .= '#supersized{z-index: 0 !important;} ';
    8084        }
    81        
     85
    8286        if ( !empty($this->ino_bglite_options['bg_color']) )
    8387        {
    8488            $background_slideshow .= 'body{background-color:'.$this->ino_bglite_options['bg_color'].' !important;} ';
    8589        }
    86        
     90
    8791        if ( !empty($this->ino_bglite_options['containerid']) )
    8892        {
    8993            $container .= $this->ino_bglite_options['containerid'].'{';
    90            
     94
    9195            if ( !empty($this->ino_bglite_options['zindexcontainer']) )
    9296            {
    9397                $container .= 'z-index:'.$this->ino_bglite_options['zindexcontainer'].';';
    9498            }
    95            
     99
    96100            if ( !empty($this->ino_bglite_options['positioncontainer']) )
    97101            {
    98102                $container .= 'position:'.$this->ino_bglite_options['positioncontainer'].';';
    99103            }
    100            
     104
    101105            $container .= '} ';
    102            
     106
    103107            $background_slideshow .= $container;
    104108        }
    105        
    106        
     109
     110
    107111        $background_slideshow .= "\n</style>\n";
    108112        $background_slideshow .= "\n<script type='text/javascript'>\n";
     
    128132    }
    129133
    130    
    131     public function handler_set_fallback_image() 
     134
     135    public function handler_set_fallback_image()
    132136    {
    133137        $inoplugs = apply_filters("inoplugs_link", '<div style="display: none;"><a href="http://inoplugs.com">WP-Backgrounds Lite by InoPlugs Web Design</a> and <a href="http://schoenmann.at/">Juwelier Sch&ouml;nmann 1010 Wien</a></div>');
     
    141145        $get_external_bg_image = get_post_meta($wp_query->post->ID, 'upload_image', true);
    142146        $get_image_link = get_post_meta($wp_query->post->ID, 'image_url', true);
    143        
     147
    144148        if (empty($get_external_bg_image)) {
    145149            $deactivate_image = 'on';
     
    154158        }
    155159
    156         if(!empty($this->bg_image)) 
    157         {       
     160        if(!empty($this->bg_image))
     161        {
    158162            if (!empty($get_image_link))
    159163            {
     
    173177            return $background_image = false;
    174178        }
    175     }   
     179    }
    176180}
    177181?>
Note: See TracChangeset for help on using the changeset viewer.