Update API

This commit is contained in:
Hoang Huu
2019-10-01 15:57:58 +07:00
parent ff39207b86
commit d5bb6abe51
5 changed files with 41 additions and 18 deletions

View File

@@ -134,6 +134,15 @@ class OpalEstate_Agent {
public static function get_link( $agent_id ) {
$agent = get_post( $agent_id );
if ( ! $agent ) {
return [
'name' => '',
'avatar' => '',
'link' => '',
];
}
$url = self::get_avatar_url( $agent_id );
return [
@@ -141,7 +150,6 @@ class OpalEstate_Agent {
'avatar' => $url,
'link' => get_permalink( $agent->ID ),
];
}
public static function metaboxes_fields() {