| @@ -3,50 +3,31 @@ | ||
| 3 | 3 | * @package Polylang |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | - * Main Polylang class for REST API requrests, accessible from @see PLL(). | |
| 7 | + * REST API controller | |
| 8 | + * accessible as $polylang global object | |
| 8 | 9 | * |
| 10 | + * Properties: | |
| 11 | + * options => inherited, reference to Polylang options array | |
| 12 | + * model => inherited, reference to PLL_Model object | |
| 13 | + * links_model => inherited, reference to PLL_Links_Model object | |
| 14 | + * links => reference to PLL_Admin_Links object | |
| 15 | + * static_pages => reference to PLL_Static_Pages object | |
| 16 | + * filters => reference to PLL_Frontend_Filters object | |
| 17 | + * filters_links => reference to PLL_Filters_Links object | |
| 18 | + * posts => reference to PLL_CRUD_Posts object | |
| 19 | + * terms => reference to PLL_CRUD_Terms object | |
| 20 | + * | |
| 9 | 21 | * @since 2.6 |
| 10 | 22 | */ |
| 11 | 23 | class PLL_REST_Request extends PLL_Base { |
| 24 | + public $links, $static_pages, $posts, $terms, $filters, $filters_links; | |
| 12 | 25 | |
| 13 | 26 | /** |
| 14 | - * @var PLL_Filters | |
| 15 | - */ | |
| 16 | - public $filters; | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * @var PLL_Filters_Links | |
| 20 | - */ | |
| 21 | - public $filters_links; | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * @var PLL_Admin_Links | |
| 25 | - */ | |
| 26 | - public $links; | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * @var PLL_Nav_Menu | |
| 30 | - */ | |
| 31 | - public $nav_menu; | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * @var PLL_Static_Pages | |
| 35 | - */ | |
| 36 | - public $static_pages; | |
| 37 | - | |
| 38 | - /** | |
| 39 | - * @var PLL_Filters_Widgets_Options | |
| 40 | - */ | |
| 41 | - public $filters_widgets; | |
| 42 | - | |
| 43 | - /** | |
| 44 | - * Setup filters. | |
| 27 | + * Setup filters | |
| 45 | 28 | * |
| 46 | 29 | * @since 2.6 |
| 47 | - * | |
| 48 | - * @return void | |
| 49 | 30 | */ |
| 50 | 31 | public function init() { |
| 51 | 32 | parent::init(); |
| 52 | 33 | |
| @@ -56,11 +37,10 @@ | ||
| 56 | 37 | do_action( 'pll_no_language_defined' ); // To load overridden textdomains. |
| 57 | 38 | |
| 58 | 39 | $this->filters_links = new PLL_Filters_Links( $this ); |
| 59 | 40 | $this->filters = new PLL_Filters( $this ); |
| 60 | - $this->filters_widgets = new PLL_Filters_Widgets_Options( $this ); | |
| 61 | 41 | |
| 62 | - // Static front page and page for posts. | |
| 42 | + // Static front page and page for posts | |
| 63 | 43 | if ( 'page' === get_option( 'show_on_front' ) ) { |
| 64 | 44 | $this->static_pages = new PLL_Static_Pages( $this ); |
| 65 | 45 | } |
| 66 | 46 | |
| @@ -65,8 +45,8 @@ | ||
| 65 | 45 | } |
| 66 | 46 | |
| 67 | 47 | $this->links = new PLL_Admin_Links( $this ); |
| 68 | 48 | |
| 69 | - $this->nav_menu = new PLL_Nav_Menu( $this ); // For auto added pages to menu. | |
| 49 | + $this->nav_menu = new PLL_Nav_Menu( $this ); // For auto added pages to menu | |
| 70 | 50 | } |
| 71 | 51 | } |
| 72 | 52 | } |