| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * @package Polylang | |
| 4 | + */ | |
| 2 | 5 | |
| 3 | 6 | /** |
| 4 | 7 | * REST API controller |
| 5 | 8 | * accessible as $polylang global object |
| @@ -13,14 +16,13 @@ | ||
| 13 | 16 | * filters => reference to PLL_Frontend_Filters object |
| 14 | 17 | * filters_links => reference to PLL_Filters_Links object |
| 15 | 18 | * posts => reference to PLL_CRUD_Posts object |
| 16 | 19 | * terms => reference to PLL_CRUD_Terms object |
| 17 | - * sync => reference to PLL_Sync object | |
| 18 | 20 | * |
| 19 | 21 | * @since 2.6 |
| 20 | 22 | */ |
| 21 | 23 | class PLL_REST_Request extends PLL_Base { |
| 22 | - public $links, $static_pages, $posts, $terms, $filters, $filters_links, $sync; | |
| 24 | + public $links, $static_pages, $posts, $terms, $filters, $filters_links; | |
| 23 | 25 | |
| 24 | 26 | /** |
| 25 | 27 | * Setup filters |
| 26 | 28 | * |
| @@ -42,36 +44,9 @@ | ||
| 42 | 44 | $this->static_pages = new PLL_Static_Pages( $this ); |
| 43 | 45 | } |
| 44 | 46 | |
| 45 | 47 | $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 ); | |
| 49 | 48 | |
| 50 | 49 | $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 | - } | |
| 75 | 50 | } |
| 76 | 51 | } |
| 77 | 52 | } |