Changeset 603


Ignore:
Timestamp:
01/26/2011 12:17:38 PM (16 months ago)
Author:
ofer
Message:

Fix for excerpt wrapping, some wrong mangling of redirections

File:
1 edited

Legend:

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

    r601 r603  
    147147        // full post wrapping (should happen late) 
    148148        add_filter('the_content', array(&$this, 'post_content_wrap'), 9999); 
     149        add_filter('the_excerpt', array(&$this, 'post_content_wrap'), 9999); 
    149150        add_filter('the_title', array(&$this, 'post_wrap'), 9999, 2); 
    150151        // allow to mark the language? 
     
    185186     */ 
    186187    function on_wp_redirect($location, $status) { 
     188        // no point in mangling redirection if its our own or its the default language 
    187189        if ($this->transposh_redirect) return $location; 
     190        if ($this->options->is_default_language($this->target_language)) 
     191                return $location; 
    188192        logger($status . ' ' . $location); 
    189193        // $trace = debug_backtrace(); 
    190194        // logger($trace); 
    191195        // logger($this->target_language); 
    192         $location = str_replace(array('%2F', '%3A', '%3B', '%3F', '%3D', '%26'), array('/', ':', ';', '?', '=', '&'), urlencode($this->rewrite_url($location))); 
     196        $location = $this->rewrite_url($location); 
    193197        return $location; 
    194198    } 
Note: See TracChangeset for help on using the changeset viewer.