Changeset 68
- Timestamp:
- 03/17/2009 09:07:25 AM (3 years ago)
- Location:
- trunk/WordPress/plugin/transposh
- Files:
-
- 5 edited
-
constants.php (modified) (3 diffs)
-
js/transposh.js (modified) (4 diffs)
-
parser.php (modified) (28 diffs)
-
transposh.php (modified) (19 diffs)
-
transposh_widget.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/constants.php
r54 r68 61 61 define("TRANLSLATOR", 'translator'); 62 62 63 //Option defining whether anonymous translation is allowed. 63 //Option defining whether anonymous translation is allowed. 64 64 define("ANONYMOUS_TRANSLATION", "transposh_allow_anonymous_translation"); 65 65 … … 73 73 define("DEFAULT_LANG", "transposh_default_language"); 74 74 75 //Define segment id prefix, will be included in span tag. 75 //Option defining transposh widget appearance 76 define("WIDGET_TRANSPOSH", "transposh_widget"); 77 78 //Define segment id prefix, will be included in span tag. also used as class identifier 76 79 define("SPAN_PREFIX", "tr_"); 77 80 … … 79 82 define("IMG_PREFIX", "tr_img_"); 80 83 81 //Option defining transposh widget appearance82 define("WIDGET_TRANSPOSH", "widget_transposh");83 84 84 //Option to enable/disable rewrite of permalinks 85 85 define("ENABLE_PERMALINKS_REWRITE", "transposh_enable_permalinks"); 86 87 86 ?> -
trunk/WordPress/plugin/transposh/js/transposh.js
r58 r68 15 15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 16 */ 17 17 18 function display_dialog(caption, content) 18 19 { … … 47 48 48 49 // fetch translation from google translate... 49 function getgt( lang)50 function getgt() 50 51 { 51 google.language.translate($("#tr_original_unescaped").text(), "", lang, function(result) {52 google.language.translate($("#tr_original_unescaped").text(), "", transposh_target_lang, function(result) { 52 53 if (!result.error) { 53 $("#tr_translation"). attr('value',result.translation);54 $("#tr_translation").val(result.translation); 54 55 } 55 56 }); 56 57 } 57 58 59 //Ajax translation 60 function ajax_translate(original,translation,source,segment_id) { 61 var query = 'original=' + escape(original) + 62 '&translation=' + translation + 63 '&lang=' + transposh_target_lang + 64 '&source=' + source + 65 '&translation_posted=1'; 66 67 $.ajax({ 68 type: "POST", 69 url: transposh_post_url, 70 data: query, 71 success: function(req) { 72 //rewrite onclick function - in case of re-edit 73 $("#tr_img_" + segment_id).click(function () { 74 translate_dialog(original, translation, segment_id); 75 }); 76 77 //current img 78 var img = $("#tr_img_" + segment_id).attr('src'); 79 var text_rewrite = translation; 80 81 if(jQuery.trim(translation).length == 0) { 82 //reset to the original content - the not escaped version 83 text_rewrite = original; 84 85 //switch to the edit img 86 img = img.replace(/translate_fix.png/, "translate.png"); 87 } 88 else { 89 if (source == 1) { 90 //switch to the auto img 91 img = img.replace(/translate.png/, "translate_auto.png"); 92 } else { 93 //switch to the fix img 94 img = img.replace(/translate.png/, "translate_fix.png"); 95 } 96 } 97 98 99 //rewrite text 100 $("#tr_" + segment_id).html(text_rewrite); 101 102 //rewrite image 103 $("#tr_img_" + segment_id).attr('src', img); 104 105 //close dialog 106 cClick(); 107 }, 108 109 error: function(req) { 110 alert("Error !!! failed to translate.\n\nServer's message: " + req.statusText); 111 } 112 }); 113 114 } 115 58 116 //Open translation dialog 59 function translate_dialog(original, trans, lang, post_url,segment_id)117 function translate_dialog(original, trans, segment_id) 60 118 { 61 119 caption='Edit Translation'; 62 120 //alert (this.id); 63 121 var dialog = ''+ 64 ('<form id="tr_form" name="transposh_edit_form" method="post" action="' + post_url + '"><div>') +122 ('<form id="tr_form" name="transposh_edit_form" method="post" action="' + transposh_post_url + '"><div>') + 65 123 '<p dir="ltr">Original text<br \/><textarea id="tr_original_unescaped" cols="60" rows="3" readonly="readyonly">' + 66 124 original + '</textarea> <\/p>' + … … 68 126 '"' + 'onfocus="OLmEdit=1;" onblur="OLmEdit=0;"<\/p>' + 69 127 '<input type="hidden" id="tr_original" name="original" value="' + escape(original) +'">' + 70 '<input type="hidden" id="tr_lang" name="lang" value="'+lang+'">' +71 128 '<input type="hidden" name="translation_posted" value= "1">' + 72 '<p><input onclick="getgt( \''+lang+'\')" type="button" value="Get Suggestion!"/> <input type="submit" value="Translate"/><\/p>' +129 '<p><input onclick="getgt()" type="button" value="Get Suggestion!"/> <input type="submit" value="Translate"/><\/p>' + 73 130 ('<\/div><\/form>'); 74 131 75 display_dialog(caption, dialog);132 display_dialog(caption, dialog); 76 133 77 // attach handler to form's submit event78 $('#tr_form').submit(function() {134 // attach handler to form's submit event 135 $('#tr_form').submit(function() { 79 136 var translation = $('#tr_translation').val(); 80 var query = 'original=' + escape(original) + 81 '&translation=' + translation + 82 '&lang=' + $('#tr_lang').val() + 83 '&translation_posted=1'; 84 85 86 $.ajax({ 87 type: "POST", 88 url: post_url, 89 data: query, 90 success: function(req) { 91 //rewrite onclick function - in case of re-edit 92 $("#tr_img_" + segment_id).click(function () { 93 translate_dialog(original, translation, lang, post_url, segment_id); 94 }); 95 96 //current img 97 var img = $("#tr_img_" + segment_id).attr('src'); 98 var text_rewrite = translation; 99 100 if(jQuery.trim(translation).length == 0) { 101 //reset to the original content - the not escaped version 102 text_rewrite = original; 103 104 //switch to the edit img 105 img = img.replace(/translate_fix.png/, "translate.png"); 106 } 107 else { 108 //switch to the fix img 109 img = img.replace(/translate.png/, "translate_fix.png"); 110 } 111 112 113 //rewrite text 114 $("#tr_" + segment_id).html(text_rewrite); 115 116 //rewrite image 117 $("#tr_img_" + segment_id).attr('src', img); 118 119 //close dialog 120 cClick(); 121 }, 122 123 error: function(req) { 124 alert("Error !!! failed to translate.\n\nServer's message: " + req.statusText); 125 } 126 127 128 }); 137 138 ajax_translate(original,translation,0,segment_id); 129 139 130 140 // return false to prevent normal browser submit and page navigation … … 132 142 133 143 }); 144 134 145 } 146 //function for auto translation 147 148 function do_auto_translate() { 149 $(".tr_u").each(function (i) { 150 var translated_id = $(this).attr('id'); 151 google.language.translate($(this).text(), "", transposh_target_lang, function(result) { 152 if (!result.error) { 153 var segment_id = translated_id.substr(translated_id.lastIndexOf('_')+1); 154 ajax_translate($("#"+translated_id).text(),result.translation,1,segment_id); 155 } 156 }); 157 }); 158 } -
trunk/WordPress/plugin/transposh/parser.php
r61 r68 97 97 $tag_start = $pos; 98 98 $pos = strpos($page, '>', $pos); 99 99 100 100 //Mark tag end position 101 101 $tag_end = $pos; … … 156 156 logger("Exit " . __METHOD__, 4); 157 157 } 158 159 158 160 159 /* … … 209 208 global $is_in_channel; 210 209 $is_in_channel = TRUE; 211 break; 212 } 213 214 } 215 210 break; 211 } 212 213 } 216 214 217 215 /* … … 240 238 } 241 239 242 243 240 /* 244 241 * Process html tag. Set the direction for rtl languages. … … 301 298 if(is_word('![CDATA[')) 302 299 { 303 $pos += 8; //skip to end of ![CDATA[ 300 $pos += 8; //skip to end of ![CDATA[ 304 301 } 305 302 else … … 311 308 } 312 309 } 313 310 314 311 logger("Exit " . __METHOD__. ": $pos", 5); 315 312 return substr($page,$start, $pos - $start); … … 385 382 { 386 383 global $page, $pos; 387 384 388 385 logger("Enter " . __METHOD__ , 4); 389 386 … … 394 391 $start = $pos; 395 392 $page_length = strlen($page); 396 397 // Indicates if the html entity should break into a new translation segment. 398 $is_breaker = FALSE; 399 393 394 // Indicates if the html entity should break into a new translation segment. 395 $is_breaker = FALSE; 396 400 397 while($pos < $page_length && $page[$pos] != '<') 401 398 { … … 409 406 $start = $end_of_entity; 410 407 } 411 408 412 409 //skip past entity 413 410 $pos = $end_of_entity; … … 433 430 } 434 431 435 436 /* 437 * Translate the content of a cdata section. For now we only expect to handle it 438 * within RSS feeds. 432 /* 433 * Translate the content of a cdata section. For now we only expect to handle it 434 * within RSS feeds. 439 435 */ 440 436 function process_cdata_section() 441 437 { 442 438 global $page, $pos; 443 439 444 440 logger("Enter " . __METHOD__ , 4); 445 441 … … 450 446 $start = $pos; 451 447 $page_length = strlen($page); 452 448 453 449 while($pos < $page_length && !is_word(']]>')) 454 450 { … … 477 473 /** 478 474 * Determines position in page marks a transaltable tag in html page or rss feed section. 479 * Return TRUE if should be translated otherwise FALSE. 475 * Return TRUE if should be translated otherwise FALSE. 480 476 */ 481 477 function is_translatable_section() … … 484 480 $rc = FALSE; 485 481 $current_tag = end($tags_list); 486 482 487 483 if($is_in_body || $current_tag == 'title') 488 484 { … … 496 492 497 493 logger("Exit " . __METHOD__ . " $current_tag, translate: " . ($rc ? "yes" : "no"), 4); 498 return $rc; 494 return $rc; 499 495 } 500 496 … … 525 521 $page[$position] == ';' || 526 522 //break on numbers but not like: 3rd, 4th 527 (is_digit($position) && !is_a_to_z_character($position+1))) 523 (is_digit($position) && !is_a_to_z_character($position+1))) 528 524 { 529 525 //break the sentence into segments regardless of the next character. … … 537 533 * Determines if the current position marks the begining of an html 538 534 * entity. E.g & 539 * Return 0 if not an html entity otherwise return the position past this entity. In addition 535 * Return 0 if not an html entity otherwise return the position past this entity. In addition 540 536 * the $is_breaker will be set to TRUE if entity should break translation into a new segment. 541 537 * … … 677 673 } 678 674 679 680 675 /* 681 676 * Check within page buffer position for the given word. 682 677 * param word The word to look for. 683 * param index1 Optional position within the page buffer, if not available then the current 684 * position ($pos) is used. 678 * param index1 Optional position within the page buffer, if not available then the current 679 * position ($pos) is used. 685 680 * Return TRUE if the word matches otherwise FALSE 686 681 */ … … 689 684 global $page, $pos; 690 685 $rc = FALSE; 691 686 692 687 if(!isset($index1)) 693 688 { … … 695 690 $index1 = $pos; 696 691 } 697 692 698 693 $index2 = 0; //position within word 699 694 $word_len = strlen($word); 700 695 $page_length = strlen($page); 701 696 702 697 while($index1 < $page_length && $index2 < $word_len) 703 698 { … … 712 707 } 713 708 } 714 709 715 710 //check if we have full match 716 711 if($index2 == $word_len) … … 718 713 $rc = TRUE; 719 714 } 720 715 721 716 return $rc; 722 717 } 723 718 724 725 /** 719 /* 726 720 * Translate the text between the given start position and the current 727 721 * position (pos) within the buffer. … … 757 751 } 758 752 759 $translated_text= fetch_translation($original_text);760 761 insert_translation($original_text, $translated_text, $s tart, $end);753 list($translated_text, $source) = fetch_translation($original_text); 754 755 insert_translation($original_text, $translated_text, $source, $start, $end); 762 756 } 763 757 … … 769 763 * param end Marks the end position of the text to be replaced within the original page 770 764 */ 771 function insert_translation(&$original_text, &$translated_text, $s tart, $end)765 function insert_translation(&$original_text, &$translated_text, $source, $start, $end) 772 766 { 773 767 global $segment_id, $is_edit_mode, $tags_list; … … 784 778 else 785 779 { 786 $span = "<span id=\"" . SPAN_PREFIX . "$segment_id\">"; 780 $span_prefix = SPAN_PREFIX; 781 // We will mark translated text with tr_t class and untranslated with tr_u 782 $span = "<span class=\"$span_prefix"; 787 783 788 784 if($translated_text == NULL) 789 785 { 786 $span .= "u\" id=\"{$span_prefix}{$segment_id}\">"; 790 787 $span .= $original_text . '</span>'; 791 788 } 792 789 else 793 790 { 791 $span .= "t\" id=\"{$span_prefix}{$segment_id}\">"; 794 792 $span .= $translated_text . "</span>"; 795 793 $is_translated = TRUE; … … 801 799 802 800 //Insert image to allow editing this segment 803 $img = get_img_tag($original_text, $translated_text, $s egment_id, $is_translated);801 $img = get_img_tag($original_text, $translated_text, $source, $segment_id, $is_translated); 804 802 update_translated_page($end + 1, - 1, $img); 805 803 … … 813 811 } 814 812 815 816 813 /* 817 814 * Scrubs text prior to translation to remove/encode special … … 833 830 return $text; 834 831 } 835 836 832 837 833 /** … … 865 861 866 862 } 867 868 863 ?> -
trunk/WordPress/plugin/transposh/transposh.php
r67 r68 42 42 43 43 //Database version 44 define("DB_VERSION", "1.0 1");44 define("DB_VERSION", "1.02"); 45 45 46 46 //Constant used as key in options database … … 221 221 * Fetch translation from db or cache. 222 222 * Returns the translated string or NULL if not available. 223 * TODO: // will an array work? 223 224 */ 224 225 function fetch_translation($original) … … 230 231 if(ENABLE_APC && function_exists('apc_fetch')) 231 232 { 232 $cached = apc_fetch($original . $lang, $rc);233 $cached = apc_fetch($original .'___'. $lang, $rc); 233 234 if($rc === TRUE) 234 235 { … … 243 244 if($row !== FALSE) 244 245 { 245 $translated = $row->translated;246 $translated = stripslashes($translated);247 248 logger("db result for $original >>> $translated ($lang)" , 3);246 $translated_text = stripslashes($row->translated); 247 $translated = array($translated_text, $row->source); 248 249 logger("db result for $original >>> $translated_text ($lang) ({$row->source})" , 3); 249 250 } 250 251 … … 260 261 261 262 //update cache 262 $rc = apc_store($original . $lang, $cache_entry, 3600);263 $rc = apc_store($original .'___'. $lang, $cache_entry, 3600); 263 264 if($rc === TRUE) 264 265 { … … 298 299 $js .= "\n<script type=\"text/javascript\" src=\"$overlib_dir/overlibmws_shadow.js\"></script>"; 299 300 300 $js .= "\n<script type=\"text/javascript\" src=\"$plugin_url/js/transposh.js\"></script>\n"; 301 $js .= "\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></script>\n"; 302 $js .= "\n<script type=\"text/javascript\" src=\"http://www.google.com/jsapi\"></script>\n"; 303 $js .= "\n<script type=\"text/javascript\">google.load(\"language\", \"1\");</script>\n"; 301 $js .= "\n<script type=\"text/javascript\" src=\"$plugin_url/js/transposh.js\"></script>"; 302 $js .= "\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></script>"; 303 $js .= "\n<script type=\"text/javascript\" src=\"http://www.google.com/jsapi\"></script>"; 304 $js .= "\n<script type=\"text/javascript\">google.load(\"language\", \"1\");</script>"; 305 global $lang, $home_url; 306 $post_url = $home_url . '/index.php'; 307 $js .= "\n<script type=\"text/javascript\">var transposh_post_url='$post_url';var transposh_target_lang='$lang';$(document).ready(function() {do_auto_translate();});</script>"; 304 308 305 309 echo $js; … … 313 317 placed within the img tag for use on client side operation (jquery) 314 318 */ 315 function get_img_tag($original, $translation, $s egment_id, $is_translated = FALSE)319 function get_img_tag($original, $translation, $source, $segment_id, $is_translated = FALSE) 316 320 { 317 321 global $plugin_url, $lang, $home_url; … … 330 334 } 331 335 336 if ($source == 1) { 337 $add_img = "_auto"; 338 } 339 332 340 $img = "<img src=\"$plugin_url/translate$add_img.png\" alt=\"translate\" id=\"" . IMG_PREFIX . "$segment_id\" 333 onclick=\"translate_dialog('$original','$translation','$ lang','$url', '$segment_id'); return false;\"341 onclick=\"translate_dialog('$original','$translation','$segment_id'); return false;\" 334 342 onmouseover=\"hint('$original'); return true;\" 335 343 onmouseout=\"nd()\" />"; … … 395 403 $translation = $_POST['translation']; 396 404 $lang = $_POST['lang']; 405 $source = $_POST['source']; 397 406 398 407 if(!isset($original) || !isset($translation) || !isset($lang)) 399 408 { 400 logger("Enter " . __FILE__ . " missing params: $original , $translation, $lang," . 401 $ref, 0); 409 logger("Enter " . __FILE__ . " missing params: $original , $translation, $lang," . $ref, 0); 402 410 return; 403 411 } … … 413 421 $translation = $wpdb->escape(htmlspecialchars(stripslashes(urldecode($translation)))); 414 422 415 $update = "REPLACE INTO $table_name (original, translated, lang) 416 VALUES ('" . $original . "','" . $translation . "','" . $lang . "')"; 423 //TODO: Check more escaping... 424 425 $update = "REPLACE INTO $table_name (original, translated, lang, source) 426 VALUES ('" . $original . "','" . $translation . "','" . $lang . "','" . $source . "')"; 417 427 418 428 $result = $wpdb->query($update); … … 420 430 if($result !== FALSE) 421 431 { 422 update_transaction_log($original, $translation, $lang );432 update_transaction_log($original, $translation, $lang, $source); 423 433 424 434 //Delete entry from cache 425 435 if(ENABLE_APC && function_exists('apc_store')) 426 436 { 427 apc_delete($original . $lang);437 apc_delete($original .'___'. $lang); 428 438 } 429 439 logger("Inserted to db '$original' , '$translation', '$lang' " , 3); … … 443 453 * 444 454 */ 445 function update_transaction_log(&$original, &$translation, &$lang )455 function update_transaction_log(&$original, &$translation, &$lang, $source) 446 456 { 447 457 global $wpdb, $user_ID; … … 458 468 } 459 469 460 $log = "INSERT INTO ".$wpdb->prefix.TRANSLATIONS_LOG." (original, translated, lang, translated_by )461 VALUES ('" . $original . "','" . $translation . "','" . $lang . "','".$loguser."' )";470 $log = "INSERT INTO ".$wpdb->prefix.TRANSLATIONS_LOG." (original, translated, lang, translated_by, source) 471 VALUES ('" . $original . "','" . $translation . "','" . $lang . "','".$loguser."','".$source."')"; 462 472 463 473 $result = $wpdb->query($log); … … 465 475 if($result === FALSE) 466 476 { 467 logger("Error !!! failed to update transaction log: $loguser, $original ,$translation, $lang" , 0); 468 } 469 470 } 471 477 logger("Error !!! failed to update transaction log: $loguser, $original ,$translation, $lang, $source" , 0); 478 } 479 } 472 480 473 481 /* … … 510 518 } 511 519 512 513 520 /* 514 521 * Page generation completed - flush buffer. … … 518 525 ob_flush(); 519 526 } 520 521 527 522 528 /* … … 580 586 return $qvars; 581 587 } 582 583 588 584 589 /* … … 609 614 dbDelta($sql); 610 615 616 // TODO: remove this? 611 617 //Verify that newly created table is ready for use. 612 618 //$insert = "INSERT INTO " . $table_name . " (original, translated, lang) " . … … 634 640 translated VARCHAR(256), 635 641 translated_by VARCHAR(15), 642 source TINYINT NOT NULL, 636 643 timestamp TIMESTAMP, 637 644 PRIMARY KEY (original, lang, timestamp)) "; -
trunk/WordPress/plugin/transposh/transposh_widget.php
r59 r68 36 36 37 37 global $wp_rewrite; 38 38 39 39 $ref=getenv('HTTP_REFERER'); 40 40 $lang = $_POST[LANG_PARAM]; 41 41 42 //remove existing language settings. 42 //remove existing language settings. 43 43 $ref = cleanup_url($ref); 44 44 45 45 if($lang != "none") 46 46 { … … 100 100 101 101 $is_showing_languages = FALSE; 102 102 103 103 echo $before_widget . $before_title . __(no_translate("Transposh")) . $after_title; 104 104 105 105 switch ($options['style']) { 106 106 case 1: // flags 107 107 //keep the flags in the same direction regardless of the overall page direction 108 echo "<div style=\"text-align: left;\" class=\"" . NO_TRANSLATE_CLASS . "\" >"; 108 echo "<div style=\"text-align: left;\" class=\"" . NO_TRANSLATE_CLASS . "\" >"; 109 109 110 110 global $plugin_url; 111 111 $using_permalinks = $wp_rewrite->using_permalinks(); 112 112 113 113 foreach($languages as $code => $lang2) 114 114 { 115 115 list($language,$flag) = explode (",",$lang2); 116 116 117 //remove any language identifier 117 //remove any language identifier 118 118 $page_url = cleanup_url($page_url); 119 119 120 120 //Only show languages which are viewable or (editable and the user is a translator) 121 121 if(strstr($viewable_langs, $code) || … … 123 123 { 124 124 $page_url = rewrite_url_lang_param($page_url, $code, $is_edit, !$using_permalinks); 125 125 126 126 echo "<a href=\"" . $page_url . "\"> 127 127 <img src=\"$plugin_url/flags/$flag.png\" title=\"$language\" alt=\"$language\" … … 131 131 } 132 132 echo "</div>"; 133 133 134 134 // this is the form for the edit... 135 135 echo "<form action=\"$page_url\" method=\"post\">"; … … 139 139 140 140 echo "<form action=\"$page_url\" method=\"post\">"; 141 echo "<span class=\"" . NO_TRANSLATE_CLASS . "\" >";141 echo "<span class=\"" .NO_TRANSLATE_CLASS . "\" >"; 142 142 echo "<select name=\"lang\" id=\"lang\" onchange=\"Javascript:this.form.submit();\">"; 143 143 echo "<option value=\"none\">[Language]</option>"; … … 171 171 "\" onClick=\"this.form.submit();\"/> Edit Translation"; 172 172 } 173 173 174 174 echo "<input type=\"hidden\" name=\"transposh_widget_posted\" value=\"1\"/>"; 175 175 } … … 181 181 182 182 echo "</form>"; 183 echo "<button onClick=\"do_auto_translate();\">translate all</button>"; 183 184 184 185 echo $after_widget; 185 186 } 186 187 187 188 /* 189 *Remove from url any language (or editing) params that were added for our use. 190 *Return the scrubed url 188 /* 189 * Remove from url any language (or editing) params that were added for our use. 190 * Return the scrubed url 191 191 */ 192 192 function cleanup_url($url) 193 193 { 194 194 global $home_url, $home_url_quoted; 195 195 196 196 //cleanup previous lang & edit parameter from url 197 197 $url = preg_replace("/(" . LANG_PARAM . "|" . EDIT_PARAM . ")=[^&]*/i", "", $url); 198 199 198 199 200 200 if(!$home_url) 201 201 { … … 203 203 init_global_vars(); 204 204 } 205 205 206 206 //cleanup lang identifier in permalinks 207 207 $url = preg_replace("/$home_url_quoted\/(..\/)/", "$home_url/", $url); … … 245 245 echo '<option ' . ($style == 1 ? 'selected="selected"' : '') . 246 246 'value="1">Flags</option>'; 247 247 248 248 echo '</select></label></p> 249 249 <input type="hidden" name="transposh-submit" id="transposh-submit" value="1" />'; 250 251 } 252 250 251 } 253 252 254 253 //Register callback for WordPress events … … 256 255 add_action('widgets_init', 'transposh_widget_init'); 257 256 258 259 257 ?>
Note: See TracChangeset
for help on using the changeset viewer.
