mirror of
https://ghproxy.net/https://github.com/abhijitb/helix.git
synced 2025-08-27 20:13:02 +08:00
26 lines
452 B
PHP
26 lines
452 B
PHP
<?php
|
|
/**
|
|
* Registers REST API routes for Helix.
|
|
*
|
|
* @package Helix
|
|
*/
|
|
|
|
add_action(
|
|
'rest_api_init',
|
|
function () {
|
|
register_rest_route(
|
|
'helix/v1',
|
|
'/settings',
|
|
array(
|
|
'methods' => 'GET',
|
|
'permission_callback' => '__return_true',
|
|
'callback' => function () {
|
|
return array(
|
|
'siteTitle' => get_option( 'blogname' ),
|
|
'language' => get_option( 'WPLANG' ),
|
|
);
|
|
},
|
|
)
|
|
);
|
|
}
|
|
);
|