PluginProbe
Polylang / 2.6.3
Polylang v2.6.3
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
← All changes | frontend/frontend.php +4 -6 2.7.42.6.3 View file →
@@ -91,16 +91,14 @@
91 91 }
92 92
93 93 // Share term slugs
94 94 if ( $this->options['force_lang'] && class_exists( 'PLL_Share_Term_Slug' ) ) {
95 - $this->share_term_slug = new PLL_Share_Term_Slug( $this );
95 + $this->share_term_slug = version_compare( $GLOBALS['wp_version'], '4.8', '<' ) ?
96 + new PLL_Frontend_Share_Term_Slug( $this ) :
97 + new PLL_Share_Term_Slug( $this );
96 98 }
97 99 }
98 100
99 - if ( class_exists( 'PLL_Sync_Post_Model' ) ) {
100 - $this->sync_post_model = new PLL_Sync_Post_Model( $this );
101 - }
102 -
103 101 if ( class_exists( 'PLL_Sync_Post' ) ) {
104 102 $this->sync_post = new PLL_Sync_Post( $this );
105 103 }
106 104 }
@@ -165,9 +163,9 @@
165 163 $taxonomies = array_diff( $taxonomies, array( 'language', 'category', 'post_tag' ) );
166 164
167 165 // Remove pages query when the language is set unless we do a search
168 166 // Take care not to break the single page, attachment and taxonomies queries!
169 - if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_singular && empty( $taxonomies ) && ! $query->is_category && ! $query->is_tag ) {
167 + if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_singular && empty( $taxonomies ) ) {
170 168 $query->set( 'post_type', 'post' );
171 169 }
172 170
173 171 // Unset the is_archive flag for language pages to prevent loading the archive template