| Server IP : 94.16.115.136 / Your IP : 216.73.217.106 Web Server : Apache/2.4.52 (Ubuntu) System : Linux rogerrabbit 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 User : bkillingseder ( 1001) PHP Version : 8.1.2-1ubuntu2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /srv/web/www/sites/silentroots/html/wp-content/plugins/polylang/modules/REST/ |
Upload File : |
<?php
/**
* @package Polylang
*/
namespace WP_Syntex\Polylang\REST;
use PLL_Model;
defined( 'ABSPATH' ) || exit;
/**
* Sets all Polylang REST controllers up.
*
* @since 3.7
*/
class API {
/**
* REST languages.
*
* @var V1\Languages|null
*/
public $languages;
/**
* REST settings.
*
* @var V1\Settings|null
*/
public $settings;
/**
* @var PLL_Model
*/
private $model;
/**
* Constructor.
*
* @since 3.7
*
* @param PLL_Model $model Polylang's model.
*/
public function __construct( PLL_Model $model ) {
$this->model = $model;
}
/**
* Adds hooks and registers endpoints.
*
* @since 3.7
*
* @return void
*/
public function init(): void {
$this->languages = new V1\Languages( $this->model );
$this->languages->register_routes();
$this->settings = new V1\Settings( $this->model );
$this->settings->register_routes();
}
}