PluginProbe
Polylang / 1.0.1
Polylang v1.0.1
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / include / plugins-compat.php

plugins-compat.php in Polylang 1.0.1, at include/plugins-compat.php

27 lines 869 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Polylang_Plugins_Compat{
4 function __construct() {
5 // YARPP
6 // just makes YARPP aware of the language taxonomy (after Polylang registered it)
7 add_action('init', create_function('',"\$GLOBALS['wp_taxonomies']['language']->yarpp_support = 1;"), 20);
8
9 // WordPress SEO by Yoast
10 // Unfortunately this plugin loads the text domain before Polylang is able to modify the locale
11 if (is_admin())
12 add_filter('override_load_textdomain', array(&$this, 'wp_seo_override_load_textdomain'), 10, 2);
13
14 }
15
16 function wp_seo_override_load_textdomain( $return, $domain ) {
17 if ($domain == 'wordpress-seo' && !did_action('plugins_loaded')) {
18 add_filter('plugins_loaded', create_function('', "load_plugin_textdomain('wordpress-seo', false, dirname(WPSEO_BASENAME).'/languages');"));
19 return true;
20 }
21 return $return;
22 }
23
24 }
25
26 new Polylang_Plugins_Compat();
27