Changeset 489


Ignore:
Timestamp:
08/07/2010 03:44:02 AM (18 months ago)
Author:
ofer
Message:

Fix titles of pages that appear in menu of a single item page from being erroneously language tagged

File:
1 edited

Legend:

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

    r488 r489  
    141141        // full post wrapping (should happen late) 
    142142        add_filter('the_content', array(&$this, 'post_wrap'), 9999); 
    143         add_filter('the_title', array(&$this, 'post_wrap'), 9999); 
     143        add_filter('the_title', array(&$this, 'post_wrap'), 9999, 2); 
    144144        // allow to mark the language? 
    145145//        add_action('admin_menu', array(&$this, 'transposh_post_language')); 
     
    762762     * @return string wrapped text 
    763763     */ 
    764     function post_wrap($text) { 
    765         global $id; 
     764    function post_wrap($text, $id = 0) { 
     765        $id = (is_object($id)) ? $id->ID : $id; 
     766        if (!$id) return $text; 
    766767        $lang = get_post_meta($id, 'tp_language', true); 
    767768        if ($lang) { 
Note: See TracChangeset for help on using the changeset viewer.