PluginProbe
Polylang / 2.7.3
Polylang v2.7.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 | include/rest-request.php +29 -4 2.82.7.3 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * REST API controller
8 5 * accessible as $polylang global object
@@ -16,13 +13,14 @@
16 13 * filters => reference to PLL_Frontend_Filters object
17 14 * filters_links => reference to PLL_Filters_Links object
18 15 * posts => reference to PLL_CRUD_Posts object
19 16 * terms => reference to PLL_CRUD_Terms object
17 + * sync => reference to PLL_Sync object
20 18 *
21 19 * @since 2.6
22 20 */
23 21 class PLL_REST_Request extends PLL_Base {
24 - public $links, $static_pages, $posts, $terms, $filters, $filters_links;
22 + public $links, $static_pages, $posts, $terms, $filters, $filters_links, $sync;
25 23
26 24 /**
27 25 * Setup filters
28 26 *
@@ -44,9 +42,36 @@
44 42 $this->static_pages = new PLL_Static_Pages( $this );
45 43 }
46 44
47 45 $this->links = new PLL_Admin_Links( $this );
46 + $this->posts = new PLL_CRUD_Posts( $this );
47 + $this->terms = new PLL_CRUD_Terms( $this );
48 + $this->sync = new PLL_Sync( $this );
48 49
49 50 $this->nav_menu = new PLL_Nav_Menu( $this ); // For auto added pages to menu
51 +
52 + // Share term slugs
53 + 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 );
55 + }
56 +
57 + // Translate slugs, only for pretty permalinks
58 + if ( get_option( 'permalink_structure' ) && class_exists( 'PLL_Translate_Slugs' ) ) {
59 + $curlang = null;
60 + $slugs_model = new PLL_Translate_Slugs_Model( $this );
61 + $this->translate_slugs = new PLL_Translate_Slugs( $slugs_model, $curlang );
62 + }
63 +
64 + if ( class_exists( 'PLL_Sync_Post_Model' ) ) {
65 + $this->sync_post_model = new PLL_Sync_Post_Model( $this );
66 + }
67 +
68 + if ( class_exists( 'PLL_Sync_Post_REST' ) ) {
69 + $this->sync_post = new PLL_Sync_Post_REST( $this );
70 + }
71 +
72 + if ( class_exists( 'PLL_Duplicate_REST' ) ) {
73 + $this->duplicate_rest = new PLL_Duplicate_REST();
74 + }
50 75 }
51 76 }
52 77 }