| Server IP : 213.186.33.4 / Your IP : 216.73.216.222 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www/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();
}
}