ID ); if ( ! $user || is_wp_error( $user ) ) { return $array; } $array['links'][] = array( 'rel' => 'self', 'type' => 'application/activity+json', 'href' => $user->get_url(), ); return $array; } /** * Add WebFinger discovery links * * @param array $array the jrd array * @param string $resource the WebFinger resource * @param WP_User $user the WordPress user * * @return array the jrd array */ public static function add_pseudo_user_discovery( $array, $resource ) { if ( $array ) { return $array; } return Webfinger_Rest::get_profile( $resource ); } }