WordPress.org

Plugin Directory

Changeset 630892


Ignore:
Timestamp:
11/27/12 21:02:29 (17 months ago)
Author:
Chouby
Message:

admin language filter correction + more WP 3.5 compat

Location:
polylang/trunk
Files:
3 edited

Legend:

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

    r630317 r630892  
    223223            $query->set('lang', $lang->slug); 
    224224 
    225         if (!isset($qvars['lang']) && $lg = get_user_meta(get_current_user_id(), 'pll_filter_content', true)) 
     225        if (isset($qvars['post_type']) && in_array($qvars['post_type'], $this->post_types) && 
     226            !isset($qvars['lang']) && $lg = get_user_meta(get_current_user_id(), 'pll_filter_content', true)) 
    226227            $qvars['lang'] = $lg; 
    227228 
     
    548549 
    549550        // fills with the post language when uploading from post, otherwise the default language 
    550         if (!$lang) 
     551        if (!$lang) { 
    551552            $lang = $post->post_parent ? $this->get_post_language($post->post_parent) : $this->get_default_language(); 
     553            $this->set_post_language($post_id, $lang); // save it 
     554        } 
    552555 
    553556        $fields['language'] = array( 
     
    624627        $this->save_translations('post', $tr_id, $translations); 
    625628 
    626         wp_redirect(admin_url("media.php?attachment_id=$tr_id&action=edit")); 
     629        $url = version_compare($GLOBALS['wp_version'], '3.5', '<') ? "media.php?attachment_id=$tr_id&action=edit" : "post.php?post=$tr_id&action=edit"; 
     630        wp_redirect(admin_url($url)); 
    627631        exit; 
    628632    } 
  • polylang/trunk/polylang.php

    r630317 r630892  
    33Plugin Name: Polylang 
    44Plugin URI: http://wordpress.org/extend/plugins/polylang/ 
    5 Version: 0.9.6 
     5Version: 0.9.6.1 
    66Author: F. Demarle 
    77Description: Adds multilingual capability to Wordpress 
     
    2727*/ 
    2828 
    29 define('POLYLANG_VERSION', '0.9.6'); 
     29define('POLYLANG_VERSION', '0.9.6.1'); 
    3030define('PLL_MIN_WP_VERSION', '3.1'); 
    3131 
  • polylang/trunk/readme.txt

    r630317 r630892  
    9393 
    9494== Changelog == 
     95 
     96= 0.9.6.1 = 
     97 
     98* Bug correction: the admin language filter does filter non translatable post types 
     99* Again test with WordPress 3.5 beta RC1 
    95100 
    96101= 0.9.6 (2012-11-26) = 
Note: See TracChangeset for help on using the changeset viewer.