diff --git a/inc/api/v1/property.php b/inc/api/v1/property.php index 8cd229cb..bf9fc1e1 100644 --- a/inc/api/v1/property.php +++ b/inc/api/v1/property.php @@ -94,6 +94,24 @@ class Opalestate_Property_Api extends Opalestate_Base_API { // ], ] ); + + register_rest_route( + $this->namespace, + '/' . $this->base . '/search/', + [ + 'args' => [ + 'id' => [ + 'description' => __( 'Unique identifier for the resource.', 'opalestate-pro' ), + 'type' => 'integer', + ], + ], + [ + 'methods' => WP_REST_Server::READABLE, + 'callback' => [ $this, 'get_results' ], + // 'permission_callback' => [ $this, 'get_item_permissions_check' ], + ], + ] + ); } /** diff --git a/templates/single-property/user/author-user-box.php b/templates/single-property/user/author-user-box.php index e4030ef4..e4dc32a8 100755 --- a/templates/single-property/user/author-user-box.php +++ b/templates/single-property/user/author-user-box.php @@ -1,7 +1,6 @@