Changeset 754


Ignore:
Timestamp:
12/09/12 01:06:01 (23 months ago)
Author:
ofer
Message:

Don't load the subwidgets in the admin pages (not needed)

Location:
trunk/WordPress/plugin/transposh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/transposh.php

    r753 r754  
    11221122            return $translation; 
    11231123        } 
    1124         tp_logger("($translation, $orig, $domain)", 4); 
     1124        tp_logger("($translation, $orig, $domain)", 5); 
    11251125        // HACK - TODO - FIX 
    11261126        if (in_array($domain, transposh_consts::$ignored_po_domains)) 
  • trunk/WordPress/plugin/transposh/wp/transposh_widget.php

    r753 r754  
    3939     */ 
    4040    static function tp_widget_css($file, $plugin_dir, $plugin_url) { 
     41        tp_logger('looking for css:' . $file, 4); 
    4142        $basefile = substr($file, 0, -4); 
    4243        $widget_css = TRANSPOSH_DIR_WIDGETS . '/' . $basefile . ".css"; 
     
    5354     */ 
    5455    static function tp_widget_js($file, $plugin_dir, $plugin_url) { 
     56        tp_logger('looking for js:' . $file, 4); 
    5557        $basefile = substr($file, 0, -4); 
    5658        $widget_js = TRANSPOSH_DIR_WIDGETS . '/' . $basefile . ".js"; 
     
    8991        if (is_active_widget(false, false, $this->id_base) && self::$first_init) { 
    9092            self::$first_init = false; 
    91             add_action('wp_print_styles', array(&$this, 'add_transposh_widget_css')); 
    92             add_action('wp_print_scripts', array(&$this, 'add_transposh_widget_js')); 
     93            if (!is_admin()) { 
     94                add_action('wp_print_styles', array(&$this, 'add_transposh_widget_css')); 
     95                add_action('wp_print_scripts', array(&$this, 'add_transposh_widget_js')); 
     96            } 
    9397        } 
    9498    } 
     
    139143     */ 
    140144    function load_widget($file) { 
     145        tp_logger("widget loaded: $file", 4); 
    141146        $widget_src = $this->transposh->transposh_plugin_dir . TRANSPOSH_DIR_WIDGETS . '/' . $file; 
    142147        if ($file && file_exists($widget_src)) { 
Note: See TracChangeset for help on using the changeset viewer.