From c93c699a7747b1241072f078e7a0b8a2052242ea Mon Sep 17 00:00:00 2001 From: Hoang Huu Date: Wed, 25 Sep 2019 14:01:07 +0700 Subject: [PATCH] Update --- templates/single-property/author-v2.php | 80 +++++++++++++------------ templates/single-property/author-v3.php | 40 +++++++------ templates/single-property/author.php | 40 +++++++------ 3 files changed, 85 insertions(+), 75 deletions(-) diff --git a/templates/single-property/author-v2.php b/templates/single-property/author-v2.php index 5fe57932..77913183 100755 --- a/templates/single-property/author-v2.php +++ b/templates/single-property/author-v2.php @@ -9,48 +9,54 @@ if ( ! opalestate_get_option( 'enable_single_author_box' ) ) { return; } -$type = $property->get_author_type(); -$data = get_userdata( $post->post_author ); +$type = $property->get_author_type(); +$data = get_userdata( $post->post_author ); $layout = ''; switch ( $type ) { - case 'hide': - return ; - break; - case 'agent' : - $agent_id = $property->get_metabox_value( 'agent' ); - - $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', - array( 'author' => $data, - 'id' => $agent_id , - 'prefix' => OPALESTATE_AGENT_PREFIX, - 'picture' => '', - 'type' => 'agent', - 'hide_description' => true ) ); - break; - case 'agency' : - $agency_id = $property->get_metabox_value( 'agency' ); - $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', - array( 'author' => $data, - 'id' => $agency_id , - 'picture' => '', - 'type' => 'agency', - 'hide_description' => true ) ); - break; - default: - - $author_info = opalestate_load_template_path( 'single-property/user/author-user-box', array('author' => $data , 'hide_description' => true ), $layout ); - - break; -} + case 'hide': + return; + break; + case 'agent' : + $agent_id = $property->get_metabox_value( 'agent' ); + + $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [ + 'author' => $data, + 'id' => $agent_id, + 'prefix' => OPALESTATE_AGENT_PREFIX, + 'picture' => '', + 'type' => 'agent', + 'hide_description' => true, + ] ); + break; + case 'agency' : + $agency_id = $property->get_metabox_value( 'agency' ); + $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [ + 'author' => $data, + 'id' => $agency_id, + 'picture' => '', + 'type' => 'agency', + 'hide_description' => true, + ] ); + break; + default: + $author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ + 'author' => $data, + 'hide_description' => true, + ], + $layout + ); + + break; +} ?>
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/templates/single-property/author-v3.php b/templates/single-property/author-v3.php index 90e563f8..cb3c7277 100755 --- a/templates/single-property/author-v3.php +++ b/templates/single-property/author-v3.php @@ -14,30 +14,32 @@ switch ( $type ) { case 'agent' : $agent_id = $property->get_metabox_value( 'agent' ); - $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', - [ - 'author' => $data, - 'id' => $agent_id, - 'prefix' => OPALESTATE_AGENT_PREFIX, - 'picture' => '', - 'type' => 'agent', - 'hide_description' => true, - ] ); + $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [ + 'author' => $data, + 'id' => $agent_id, + 'prefix' => OPALESTATE_AGENT_PREFIX, + 'picture' => '', + 'type' => 'agent', + 'hide_description' => true, + ] ); break; case 'agency' : $agency_id = $property->get_metabox_value( 'agency' ); - $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', - [ - 'author' => $data, - 'id' => $agency_id, - 'picture' => '', - 'type' => 'agency', - 'hide_description' => true, - ] ); + $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [ + 'author' => $data, + 'id' => $agency_id, + 'picture' => '', + 'type' => 'agency', + 'hide_description' => true, + ] ); break; default: - - $author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ 'author' => $data, 'hide_description' => true ], $layout ); + $author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ + 'author' => $data, + 'hide_description' => true, + ], + $layout + ); break; } diff --git a/templates/single-property/author.php b/templates/single-property/author.php index f73f9b00..a4feead1 100755 --- a/templates/single-property/author.php +++ b/templates/single-property/author.php @@ -14,30 +14,32 @@ switch ( $type ) { case 'agent' : $agent_id = $property->get_metabox_value( 'agent' ); - $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', - [ - 'author' => $data, - 'id' => $agent_id, - 'prefix' => OPALESTATE_AGENT_PREFIX, - 'picture' => '', - 'type' => 'agent', - 'hide_description' => true, - ] ); + $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [ + 'author' => $data, + 'id' => $agent_id, + 'prefix' => OPALESTATE_AGENT_PREFIX, + 'picture' => '', + 'type' => 'agent', + 'hide_description' => true, + ] ); break; case 'agency' : $agency_id = $property->get_metabox_value( 'agency' ); - $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', - [ - 'author' => $data, - 'id' => $agency_id, - 'picture' => '', - 'type' => 'agency', - 'hide_description' => true, - ] ); + $author_info = opalestate_load_template_path( 'single-property/user/author-member-box', [ + 'author' => $data, + 'id' => $agency_id, + 'picture' => '', + 'type' => 'agency', + 'hide_description' => true, + ] ); break; default: - - $author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ 'author' => $data, 'hide_description' => true ], $layout ); + $author_info = opalestate_load_template_path( 'single-property/user/author-user-box', [ + 'author' => $data, + 'hide_description' => true, + ], + $layout + ); break; }