From a293bed116a80e5f52a7adf6c1769d27c56c2fc0 Mon Sep 17 00:00:00 2001 From: ThemeLexus Date: Thu, 3 Oct 2019 10:10:43 +0700 Subject: [PATCH 1/2] uapte --- inc/agency/class-opalestate-agency.php | 4 ++-- inc/agent/class-opalestate-agent.php | 9 +++++++-- templates/single-property/user/author-user-box.php | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/inc/agency/class-opalestate-agency.php b/inc/agency/class-opalestate-agency.php index 64b32265..bb73c90f 100755 --- a/inc/agency/class-opalestate-agency.php +++ b/inc/agency/class-opalestate-agency.php @@ -114,10 +114,10 @@ class OpalEstate_Agency { /** * Get url of user avatar by agency id */ - public static function get_avatar_url( $userID ) { + public static function get_avatar_url( $userID, $size='thumbnail' ) { $id = get_post_meta( $userID, OPALESTATE_AGENCY_PREFIX . 'avatar_id', true );; - $url = wp_get_attachment_image_url( $id, 'thumbnail' ); + $url = wp_get_attachment_image_url( $id, $size ); if( $url ) { return $url; diff --git a/inc/agent/class-opalestate-agent.php b/inc/agent/class-opalestate-agent.php index e86329b8..0bcaaa77 100755 --- a/inc/agent/class-opalestate-agent.php +++ b/inc/agent/class-opalestate-agent.php @@ -87,8 +87,13 @@ class OpalEstate_Agent { /** * Get url of user avatar by agent id */ - public static function get_avatar_url( $userID ) { - return get_post_meta( $userID, OPALESTATE_AGENT_PREFIX . "avatar", true ); + public static function get_avatar_url( $userID, $size='thumbnail' ) { + $id = get_post_meta( $userID, OPALESTATE_AGENT_PREFIX . 'avatar_id', true );; + $url = wp_get_attachment_image_url( $id, $size ); + + if( $url ) { + return $url; + } } /** diff --git a/templates/single-property/user/author-user-box.php b/templates/single-property/user/author-user-box.php index b26ea82c..e4030ef4 100755 --- a/templates/single-property/user/author-user-box.php +++ b/templates/single-property/user/author-user-box.php @@ -25,10 +25,10 @@ if ( $post->post_type == 'opalestate_agency' ) { $prefixs = OPALESTATE_AGENCY_PREFIX; - $picture = OpalEstate_Agency::get_avatar_url( $post->ID ); + $picture = OpalEstate_Agency::get_avatar_url( $post->ID , 'full' ); } else { $prefixs = OPALESTATE_AGENT_PREFIX; - $picture = OpalEstate_Agent::get_avatar_url( $post->ID ); + $picture = OpalEstate_Agent::get_avatar_url( $post->ID , 'full' ); } $trusted = get_post_meta( $related, $prefixs . 'trusted', true ); @@ -39,10 +39,10 @@ if ( $post->post_type == 'opalestate_agency' ) { $prefixs = OPALESTATE_AGENCY_PREFIX; - $picture = OpalEstate_Agency::get_avatar_url( $post->ID ); + $picture = OpalEstate_Agency::get_avatar_url( $post->ID , 'full' ); } else { $prefixs = OPALESTATE_AGENT_PREFIX; - $picture = OpalEstate_Agent::get_avatar_url( $post->ID ); + $picture = OpalEstate_Agent::get_avatar_url( $post->ID, 'full' ); } $trusted = get_post_meta( $related, $prefixs . 'trusted', true ); From 0d835506ef708a2b594ca8ce5859e3aacf4ab242 Mon Sep 17 00:00:00 2001 From: ThemeLexus Date: Thu, 3 Oct 2019 10:11:42 +0700 Subject: [PATCH 2/2] uapte --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index b3ffc924..9d6775a5 100755 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -=== Opal Estate Pro === +=== Opal Estate Pro - Portal for posting property === Contributors: wpopal Donate link: http://www.wpopal.com/product/opal-estate-wordpress-plugin/ Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace