• Resolved yoyurec

    (@yoyurec)


    latest WP, latest Polylang. in 0.4 new feature – “Each user can set the WordPress admin language in its profile”.

    Whent i try to login to dashboard i get error –
    Fatal error: Call to undefined function wp_get_current_user() in /usr/home/altima/domains/u2.com.ua/public_html/capital/wp-includes/user.php on line 227

    I don’t know how to fix it, so in admin.php file i comment 49,50 & 51 lines:

    // language management for users
    	//add_filter('locale', array(&$this, 'get_locale'));
    	//add_action('personal_options_update', array(&$this, 'personal_options_update'));
    	//add_action('personal_options', array(&$this, 'personal_options'));

    https://www.ads-software.com/extend/plugins/polylang/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Chouby

    (@chouby)

    I do not understand what happens. It works well on my installation. So it will be difficult to find what is wrong and to correct… Did you test if it comes from a conflict with a plugin or if you have the same issue with only Polylang activated ?

    Plugin Author Chouby

    (@chouby)

    Could you tell me if one of the two solutions below work ?

    1. Add require_once( ABSPATH . WPINC . '/pluggable.php' ); on top of the /include/admin.php line 2

    2. Move the three lines you have commented in the function admin_init line 58

    Thank you in advance !

    Thread Starter yoyurec

    (@yoyurec)

    thank you, both solutions works! ))

    PS: suggest rename in user profile label from “Language” to “Front-end Language”, or something like this. B’cose there are plugins for admin panel language swith that uses “Language” (https://imageshack.us/photo/my-images/88/20111114111332.png/)

    Thread Starter yoyurec

    (@yoyurec)

    PPS: Do you need russian\ukrainian localization for plugin?

    Plugin Author Chouby

    (@chouby)

    In fact I try to make exactly the same thing the plugin you are refering to: changing the admin language. I remember it was a user request. It’s true that is not very nice for users who use such plugin. However I followed your advice and changed “Language” to “Admin language” in 0.4.1.

    The second solution avoids the fatal error but has in fact no effect on the admin language. I did not test the solution before posting… So I chose the first solution.

    I released the version 0.4.1 today due to this bad bug. However I would be very happy to include other localizations in future releases. Ukrainian and Russian are welcome ! Do you know how to create a .po file ? I just setup a contact form so that you can contact me or send me files.

    Thread Starter yoyurec

    (@yoyurec)

    In fact I try to make exactly the same thing the plugin you are refering to: changing the admin language.

    oh…. i see ))
    i thought this saves front-end lang for current user, but i forgot that cookies saves selected lang.

    Thread Starter yoyurec

    (@yoyurec)

    PS: look how convenient “WP Native Dashboard” plugin add dropdown to admin panel – https://www.ads-software.com/extend/plugins/wp-native-dashboard/screenshots/?topic_id=8952

    it would be nice to have such thing in polylang… of course in far-far-future, b’cose it’s not deadly necessary )))

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Polylang] language management for users (in admin panel)’ is closed to new replies.