PluginProbe
Polylang / 2.9.2
Polylang v2.9.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
polylang / include / rest-request.php

rest-request.php in Polylang 2.9.2, at include/rest-request.php

53 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Polylang
4 */
5
6 /**
7 * REST API controller
8 * accessible as $polylang global object
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 *
21 * @since 2.6
22 */
23 class PLL_REST_Request extends PLL_Base {
24 public $links, $static_pages, $posts, $terms, $filters, $filters_links;
25
26 /**
27 * Setup filters
28 *
29 * @since 2.6
30 */
31 public function init() {
32 parent::init();
33
34 if ( $this->model->get_languages_list() ) {
35
36 /** This action is documented in include/class-polylang.php */
37 do_action( 'pll_no_language_defined' ); // To load overridden textdomains.
38
39 $this->filters_links = new PLL_Filters_Links( $this );
40 $this->filters = new PLL_Filters( $this );
41
42 // Static front page and page for posts
43 if ( 'page' === get_option( 'show_on_front' ) ) {
44 $this->static_pages = new PLL_Static_Pages( $this );
45 }
46
47 $this->links = new PLL_Admin_Links( $this );
48
49 $this->nav_menu = new PLL_Nav_Menu( $this ); // For auto added pages to menu
50 }
51 }
52 }
53