Update API

This commit is contained in:
Hoang Huu
2019-10-04 16:26:23 +07:00
parent 218c914e0d
commit cfd65c5aa4
7 changed files with 317 additions and 261 deletions

View File

@@ -22,7 +22,11 @@ class Opalestate_API {
public $base = 'estate-api';
public function __construct() {
return $this->init();
$this->init();
if ( is_admin() ) {
new Opalestate_API_Admin();
}
}
/**
@@ -35,8 +39,8 @@ class Opalestate_API {
* @since 1.1
*/
public function init() {
$this->includes( [
'class-opalestate-api-admin.php',
'class-opalestate-base-api.php',
'v1/property.php',
'v1/agent.php',