Changeset 490
- Timestamp:
- 08/07/2010 08:56:05 PM (18 months ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/transposh.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/transposh.php
r489 r490 140 140 141 141 // full post wrapping (should happen late) 142 add_filter('the_content', array(&$this, 'post_ wrap'), 9999);142 add_filter('the_content', array(&$this, 'post_content_wrap'), 9999); 143 143 add_filter('the_title', array(&$this, 'post_wrap'), 9999, 2); 144 144 // allow to mark the language? … … 757 757 758 758 /** 759 * Modify posts and posts titleto have language wrapping759 * Modify posts to have language wrapping 760 760 * @global int $id the post id 761 761 * @param string $text the post text (or title text) 762 * @return string wrapped text 763 */ 764 function post_content_wrap($text) { 765 $lang = get_post_meta($GLOBALS['id'], 'tp_language', true); 766 if ($lang) { 767 $text = "<span lang =\"$lang\">" . $text . "</span>"; 768 } 769 return $text; 770 } 771 772 /** 773 * Modify post title to have language wrapping 774 * @param string $text the post title text 762 775 * @return string wrapped text 763 776 */
Note: See TracChangeset
for help on using the changeset viewer.
