style.php
99 lines
| 1 | <?php |
| 2 | |
| 3 | $glt_css = get_option("googlelanguagetranslator_css"); |
| 4 | |
| 5 | echo '<style type="text/css">'; |
| 6 | echo $glt_css; |
| 7 | |
| 8 | if (get_option('googlelanguagetranslator_flags') == 'show_flags') { |
| 9 | |
| 10 | if(get_option('googlelanguagetranslator_display')=='Vertical') { |
| 11 | if (get_option('googlelanguagetranslator_language_option')=='specific') { |
| 12 | echo '#flags {display:none !important; }'; |
| 13 | } |
| 14 | |
| 15 | echo 'p.hello { font-size:12px; color:darkgray; }'; |
| 16 | echo '#google_language_translator, #flags { text-align:left; }'; |
| 17 | } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') { |
| 18 | |
| 19 | if (get_option('googlelanguagetranslator_language_option')=='specific') { |
| 20 | echo '#flags {display:none !important; }'; |
| 21 | } |
| 22 | |
| 23 | if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') { |
| 24 | echo '#google_language_translator { text-align:left !important; }'; |
| 25 | echo 'select.goog-te-combo { float:right; }'; |
| 26 | echo '.goog-te-gadget { padding-top:13px; }'; |
| 27 | echo '.goog-te-gadget .goog-te-combo { margin-top:-7px !important; }'; |
| 28 | } |
| 29 | |
| 30 | echo '.goog-te-gadget { margin-top:2px !important; }'; |
| 31 | echo 'p.hello { font-size:12px; color:#666; }'; |
| 32 | } |
| 33 | |
| 34 | if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { |
| 35 | echo '#google_language_translator, #language { clear:both; width:auto !important; text-align:right; }'; |
| 36 | echo '#language { float:right; }'; |
| 37 | echo '#flags { text-align:right; width:165px; float:right; clear:right; }'; |
| 38 | echo '#flags ul { float:right !important; }'; |
| 39 | echo 'p.hello { text-align:right; float:right; clear:both; }'; |
| 40 | echo '.glt-clear { height:0px; clear:both; margin:0px; padding:0px; }'; |
| 41 | } |
| 42 | |
| 43 | if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') { |
| 44 | echo '#google_language_translator { clear:both; }'; |
| 45 | echo '#flags { width:165px; }'; |
| 46 | echo '#flags a { display:inline-block; margin-right:2px; }'; |
| 47 | } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { |
| 48 | echo '#flags { width:165px; }'; |
| 49 | echo '#flags a { display:inline-block; margin-left:2px; }'; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | if (get_option('googlelanguagetranslator_manage_translations') == 0) { |
| 54 | if(get_option('googlelanguagetranslator_active')==1) { |
| 55 | echo '.goog-tooltip {display: none !important;}'; |
| 56 | echo '.goog-tooltip:hover {display: none !important;}'; |
| 57 | echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}'; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | if (get_option('googlelanguagetranslator_showbranding')=='Yes') { |
| 62 | if(get_option('googlelanguagetranslator_active')==1) { |
| 63 | echo '#google_language_translator { width:auto !important; }'; |
| 64 | } |
| 65 | |
| 66 | } elseif(get_option('googlelanguagetranslator_showbranding')=='No') { |
| 67 | if(get_option('googlelanguagetranslator_active')==1) { |
| 68 | echo '#google_language_translator a {display: none !important; }'; |
| 69 | echo '.goog-te-gadget {color:transparent !important;}'; |
| 70 | echo '.goog-te-gadget { font-size:0px !important; }'; |
| 71 | echo '.goog-branding { display:none; }'; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | if (get_option('googlelanguagetranslator_translatebox') == 'no') { |
| 76 | if(get_option('googlelanguagetranslator_active')==1) { |
| 77 | echo '#google_language_translator { display:none; }'; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | if (get_option('googlelanguagetranslator_flags') == 'hide_flags') { |
| 82 | if(get_option('googlelanguagetranslator_active') ==1) { |
| 83 | echo '#flags { display:none; }'; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | if(get_option('googlelanguagetranslator_toolbar')=='Yes') { |
| 88 | if(get_option('googlelanguagetranslator_active')==1) { |
| 89 | echo '#google_language_translator {color: transparent;}'; |
| 90 | echo 'body { top:0px !important; }'; |
| 91 | } |
| 92 | } elseif(get_option('googlelanguagetranslator_toolbar')=='No') { |
| 93 | if(get_option('googlelanguagetranslator_active')==1) { |
| 94 | echo '.goog-te-banner-frame{visibility:hidden !important;}'; |
| 95 | echo 'body { top:0px !important;}'; |
| 96 | } |
| 97 | } |
| 98 | echo '</style>'; |
| 99 | ?> |