lbineau
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Ajax current languageOk I found how to do it, you have to call admin-ajax.php?lang=code.
So I have to wait pll_current_language() to be available with pll_language_defined action.
Then the ajax function was called with the right language.function.php
add_action('pll_language_defined', 'on_language_defined'); // Set some JS variables function on_language_defined() { if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) { // write variables into DOM global $wp_query; wp_localize_script( 'ajax-pagination', 'ajaxpagination', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) . '?lang='.pll_current_language(), // the language parameters is usefull to call ajax function with language set 'query_vars' => json_encode( $wp_query->query ) )); } }
Forum: Plugins
In reply to: [Yoast SEO] WP-Seo by Yoast 1.7.2. update Polylang version 1.6.4. errorsSame here with a fresh install and last versions of WordPress SEO and Polylang.
I have also the following fatal error : ( ! ) Fatal error: Call to undefined method stdClass::canonical() in ***\wp-content\plugins\wordpress-seo\inc\wpseo-non-ajax-functions.php on line 227Forum: Plugins
In reply to: [Polylang] WP-Seo by Yoast-update – PolyLang errorsSame here with a fresh install and last versions of WordPress SEO and Polylang.
I have also the following fatal error : ( ! ) Fatal error: Call to undefined method stdClass::canonical() in ***\wp-content\plugins\wordpress-seo\inc\wpseo-non-ajax-functions.php on line 227I don’t think so. I never actived it on my own. How can I check that ?
Yep I am on version 3.4.2