Changeset 118


Ignore:
Timestamp:
03/29/2009 03:15:10 PM (3 years ago)
Author:
amir
Message:

Added a separated css file to control the widget appearance and allow simpler adjustment/fixes for different themes.

Location:
trunk/WordPress/plugin/transposh
Files:
1 added
1 edited

Legend:

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

    r117 r118  
    7474        // Register widget control 
    7575        register_widget_control("Transposh",'transposh_widget_control'); 
    76 } 
    77  
     76         
     77        //regigster callback for widget's css 
     78        add_action('wp_print_styles', 'add_transposh_widget_css'); 
     79} 
     80 
     81/* 
     82 * Add custom css, i.e. transposh.css 
     83 */ 
     84function add_transposh_widget_css() { 
     85        global $plugin_url; 
     86         
     87        //include the transposh_widget.css  
     88        wp_enqueue_style("transposh_widget","$plugin_url/transposh_widget.css",array(),'1.0.1'); 
     89        logger("Added transposh_widget_css"); 
     90} 
    7891 
    7992/* 
     
    101114    $is_showing_languages = FALSE; 
    102115 
    103         //echo $before_widget . $before_title . __(no_translate("Transposh")) . $after_title; 
    104116        echo $before_widget . $before_title . __("Translation") . $after_title; 
    105117 
     
    107119                case 1: // flags 
    108120            //keep the flags in the same direction regardless of the overall page direction 
    109             echo "<div style=\"text-align: left;\" class=\"" . NO_TRANSLATE_CLASS . "\" >"; 
     121            echo "<div class=\"" . NO_TRANSLATE_CLASS . " transposh_flags\" >"; 
    110122 
    111123            foreach($languages as $code => $lang2) 
Note: See TracChangeset for help on using the changeset viewer.