# polylang/3.8/src/modules/REST/load.php

Polylang, version 3.8. 17 lines.

- Page: https://pluginprobe.com/plugins/polylang/3.8/code/src/modules/REST/load.php
- Raw: https://pluginprobe.com/plugins/polylang/3.8/raw/src/modules/REST/load.php
- Modified: 2026-02-23T14:05:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/polylang/3.8/code/src/modules/REST/load.php#L10-L20`.

```php
<?php
/**
 * @package Polylang
 */

namespace WP_Syntex\Polylang\REST;

defined( 'ABSPATH' ) || exit;

add_action(
	'pll_init',
	function ( $polylang ) {
		$polylang->rest = new API( $polylang->model );
		add_action( 'rest_api_init', array( $polylang->rest, 'init' ) );
	}
);

```
