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 @@
post_title; if ( $post->post_type == 'opalestate_agency' ) { $prefixs = OPALESTATE_AGENCY_PREFIX; - $picture = OpalEstate_Agency::get_avatar_url( $post->ID , 'full' ); + $picture = OpalEstate_Agency::get_avatar_url( $post->ID, 'full' ); } else { $prefixs = OPALESTATE_AGENT_PREFIX; - $picture = OpalEstate_Agent::get_avatar_url( $post->ID , 'full' ); - } - - $trusted = get_post_meta( $related, $prefixs . 'trusted', true ); - } elseif ( $related ) { - $post = get_post( $related ); - $link = get_permalink( $related ); - $author_name = $post->post_title; - - if ( $post->post_type == 'opalestate_agency' ) { - $prefixs = OPALESTATE_AGENCY_PREFIX; - $picture = OpalEstate_Agency::get_avatar_url( $post->ID , 'full' ); - } else { - $prefixs = OPALESTATE_AGENT_PREFIX; - $picture = OpalEstate_Agent::get_avatar_url( $post->ID, 'full' ); + $picture = OpalEstate_Agent::get_avatar_url( $post->ID, 'full' ); } $trusted = get_post_meta( $related, $prefixs . 'trusted', true ); @@ -52,7 +38,6 @@ $trusted = get_user_meta( $user_id, $prefix . 'trusted', true ); $picture = OpalEstate_User::get_author_picture( $user_id ); } - ?>
@@ -71,12 +56,12 @@
-
+

-

+ "> -
+
-
+ @@ -107,7 +92,7 @@ - + - + - + - + - + - + - +