• Hi,

    Running a search with Polylang 2.0.5 and Relevanssi 3.5.4 activated returns this message from the debugger :
    Notice: get_post_language was called incorrectly in C:\mysite\wp-content\plugins\relevanssi\lib\common.php on line 26: the call to $polylang->model->get_post_language() has been deprecated in Polylang 1.8, use PLL()->model->post->get_language() instead. Error handler in C:\mysite\wp-content\plugins\polylang\include\model.php on line 620

    Changing line 26 in \lib\common.php
    from
    if (PLL()->model->get_post_language($hit->ID)->slug == ICL_LANGUAGE_CODE) {
    to
    if (PLL()->model->post->get_language($hit->ID)->slug == ICL_LANGUAGE_CODE) {
    works fine.

    Just thought you should know.
    (thx for the great plugin btw!)

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Deprecated Polylang function : $polylang->model->get_post_language()’ is closed to new replies.