We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c107ee commit 6437d3dCopy full SHA for 6437d3d
includes/transformer/class-post.php
@@ -116,12 +116,19 @@ public function get_url() {
116
* @return string The User-URL.
117
*/
118
protected function get_attributed_to() {
119
+ $blog_user = new Blog_User();
120
+
121
if ( is_single_user() ) {
- $user = new Blog_User();
122
+ return $blog_user->get_url();
123
+ }
124
125
+ $user = Users::get_by_id( $this->wp_object->post_author );
126
127
+ if ( $user && ! is_wp_error( $user ) ) {
128
return $user->get_url();
129
}
130
- return Users::get_by_id( $this->wp_object->post_author )->get_url();
131
132
133
134
/**
0 commit comments