Skip to content

Commit

Permalink
Merge pull request #19 from klandestino/lakrisgubben-patch-1
Browse files Browse the repository at this point in the history
Do not set post author to 0 if no byline is set
  • Loading branch information
lakrisgubben authored Jan 27, 2025
2 parents fc4c814 + f05fc2b commit f9d1d25
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,6 @@ function( $post, $request ) {
if ( ! empty( $bylines ) || $is_delete ) {
Utils::set_post_bylines( $post->ID, $bylines );
}
if ( empty( $bylines ) ) {
$wpdb->update(
$wpdb->posts,
array(
'post_author' => 0,
),
array(
'ID' => $post->ID,
)
);
clean_post_cache( $post->ID );
}
delete_post_meta( $post->ID, 'bylines' );
return $post;
},
Expand Down

0 comments on commit f9d1d25

Please sign in to comment.