PluginProbe
Polylang / 2.6.2
Polylang v2.6.2
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 | include/rest-request.php +6 -10 2.7.42.6.2 View file →
@@ -9,9 +9,8 @@
9 9 * model => inherited, reference to PLL_Model object
10 10 * links_model => inherited, reference to PLL_Links_Model object
11 11 * links => reference to PLL_Admin_Links object
12 12 * static_pages => reference to PLL_Static_Pages object
13 - * filters => reference to PLL_Frontend_Filters object
14 13 * filters_links => reference to PLL_Filters_Links object
15 14 * posts => reference to PLL_CRUD_Posts object
16 15 * terms => reference to PLL_CRUD_Terms object
17 16 * sync => reference to PLL_Sync object
@@ -18,9 +17,9 @@
18 17 *
19 18 * @since 2.6
20 19 */
21 20 class PLL_REST_Request extends PLL_Base {
22 - public $links, $static_pages, $posts, $terms, $filters, $filters_links, $sync;
21 + public $links, $posts, $terms, $filters_links, $sync;
23 22
24 23 /**
25 24 * Setup filters
26 25 *
@@ -29,14 +28,9 @@
29 28 public function init() {
30 29 parent::init();
31 30
32 31 if ( $this->model->get_languages_list() ) {
33 -
34 - /** This action is documented in include/class-polylang.php */
35 - do_action( 'pll_no_language_defined' ); // To load overridden textdomains.
36 -
37 32 $this->filters_links = new PLL_Filters_Links( $this );
38 - $this->filters = new PLL_Filters( $this );
39 33
40 34 // Static front page and page for posts
41 35 if ( 'page' === get_option( 'show_on_front' ) ) {
42 36 $this->static_pages = new PLL_Static_Pages( $this );
@@ -50,9 +44,11 @@
50 44 $this->nav_menu = new PLL_Nav_Menu( $this ); // For auto added pages to menu
51 45
52 46 // Share term slugs
53 47 if ( get_option( 'permalink_structure' ) && $this->options['force_lang'] && class_exists( 'PLL_Share_Term_Slug' ) ) {
54 - $this->share_term_slug = new PLL_Share_Term_Slug( $this );
48 + $this->share_term_slug = version_compare( $GLOBALS['wp_version'], '4.8', '<' ) ?
49 + new PLL_Frontend_Share_Term_Slug( $this ) :
50 + new PLL_Share_Term_Slug( $this );
55 51 }
56 52
57 53 // Translate slugs, only for pretty permalinks
58 54 if ( get_option( 'permalink_structure' ) && class_exists( 'PLL_Translate_Slugs' ) ) {
@@ -60,10 +56,10 @@
60 56 $slugs_model = new PLL_Translate_Slugs_Model( $this );
61 57 $this->translate_slugs = new PLL_Translate_Slugs( $slugs_model, $curlang );
62 58 }
63 59
64 - if ( class_exists( 'PLL_Sync_Post_Model' ) ) {
65 - $this->sync_post_model = new PLL_Sync_Post_Model( $this );
60 + if ( class_exists( 'PLL_Sync_Content' ) ) {
61 + $this->sync_content = new PLL_Sync_Content( $this );
66 62 }
67 63
68 64 if ( class_exists( 'PLL_Sync_Post_REST' ) ) {
69 65 $this->sync_post = new PLL_Sync_Post_REST( $this );