WordPress.org

Plugin Directory

Changeset 617853


Ignore:
Timestamp:
10/26/12 20:22:17 (18 months ago)
Author:
Chouby
Message:

bug corrections

Location:
polylang/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • polylang/trunk/include/admin-filters.php

    r614619 r617853  
    943943            return; 
    944944 
     945        $lang = $this->get_post_language($post->ID); 
     946        $menu_lang = get_option('polylang_nav_menus'); 
     947 
     948        if (!$lang || !$menu_lang) 
     949            return; 
     950 
    945951        // get all the menus in the post language 
    946952        $menus = array(); 
    947         $lang = $this->get_post_language($post->ID); 
    948         $menu_lang = get_option('polylang_nav_menus'); 
    949953        foreach ($menu_lang as $menu) { 
    950954            if (isset($menu[$lang->slug])) 
  • polylang/trunk/include/core.php

    r616447 r617853  
    218218 
    219219    // sets the language of comment 
    220     // useful to redirect to correct post comment url when adding the language to all url 
    221220    function pre_comment_on_post($post_id) { 
    222221        $this->curlang = $this->get_post_language($post_id); 
    223         $this->add_post_term_link_filters(); 
     222        add_filter('page_link', array(&$this, 'page_link'), 10, 2); // useful when posting a comment on static front page in non default language 
     223        $this->add_post_term_link_filters();    // useful to redirect to correct post comment url when adding the language to all url 
    224224    } 
    225225 
     
    241241        // thanks to Gonçalo Peres for pointing out the issue with queries unknown to WP 
    242242        // http://wordpress.org/support/topic/plugin-polylang-language-homepage-redirection-problem-and-solution-but-incomplete?replies=4#post-2729566 
    243         if (str_replace('www.', '', home_url('/')) == trailingslashit((is_ssl() ? 'https://' : 'http://').str_replace('www.', '', $_SERVER['HTTP_HOST']).str_replace(array('index.php', '?'.$_SERVER['QUERY_STRING']), array('', ''), $_SERVER['REQUEST_URI']))) 
     243        // take care to post preview http://wordpress.org/support/topic/static-frontpage-url-parameter-url-language-information 
     244        if (str_replace('www.', '', home_url('/')) == trailingslashit((is_ssl() ? 'https://' : 'http://').str_replace('www.', '', $_SERVER['HTTP_HOST']).str_replace(array('index.php', '?'.$_SERVER['QUERY_STRING']), array('', ''), $_SERVER['REQUEST_URI'])) && !strpos($_SERVER['QUERY_STRING'], 'preview')) 
    244245            $this->home_requested(); 
    245246 
  • polylang/trunk/polylang.php

    r616447 r617853  
    33Plugin Name: Polylang 
    44Plugin URI: http://wordpress.org/extend/plugins/polylang/ 
    5 Version: 0.9.4 
     5Version: 0.9.4.1 
    66Author: F. Demarle 
    77Description: Adds multilingual capability to Wordpress 
     
    2525*/ 
    2626 
    27 define('POLYLANG_VERSION', '0.9.4'); 
     27define('POLYLANG_VERSION', '0.9.4.1'); 
    2828define('PLL_MIN_WP_VERSION', '3.1'); 
    2929 
  • polylang/trunk/readme.txt

    r616451 r617853  
    9292 
    9393== Changelog == 
     94 
     95= 0.9.5 = 
     96 
     97* Bug correction: post preview does not work when adding the language code to all urls 
     98* Bug correction: redirect to front page in default language when posting a comment on static front page 
    9499 
    95100= 0.9.4 (2012-10-23) = 
Note: See TracChangeset for help on using the changeset viewer.