• Hi,
    there is a bug into function pll_default_language into file include/api.php on line 27.

    $options = get_options(‘polylang’)
    get_options() not exist, correct function is get_option()

    APACHE LOG ERROR:
    PHP Fatal error: Call to undefined function get_options() in [cut]/wp-content/plugins/polylang/include/api.php on line 27

    Plugin version 1.0.1

    http://wordpress.org/extend/plugins/polylang/

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

    (@chouby)

    Thanks! It’s the proof that I did not test it 🙁
    There is also $arg to be replaced by $args at line 25.

    Thread Starter l.tamburo

    (@ltamburo)

    other error is default-lang when in option is saved as default_lang

    my fix
    /*
    * returns the default language
    */
    function pll_default_language($args = ‘slug’) {
    global $polylang;
    return !(isset($polylang) && ($options = get_option(‘polylang’)) && isset($options[‘default_lang’]) && $lang = $polylang->get_language($options[‘default_lang’])) ? false :
    ($args == ‘name’ ? $lang->name :
    ($args == ‘locale’ ? $lang->description :
    $lang->slug));
    }

    Have a nice day : )

    Plugin Author Chouby

    (@chouby)

    I should have been very tired when I wrote this 🙁

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘pll_default_language function bug’ is closed to new replies.