Skip to content

Commit

Permalink
enable wp_update_post()
Browse files Browse the repository at this point in the history
  • Loading branch information
leedxw committed Jan 7, 2025
1 parent 48db780 commit f61a2e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions templates/entry-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
$check_user = get_user_by('id', $check_author_id);
if (empty($check_user->user_login)) {
error_log("author of post {$post->ID} is deleted user $check_author_id", 0);
//add_filter('wp_insert_post_data', 'set_archive_author', 99, 2);
//wp_update_post($post);
add_filter('wp_footer', 'set_archive_author', 99, 2);
add_filter('wp_insert_post_data', 'set_archive_author', 99, 2);
wp_update_post($post);
}
}

Expand Down

0 comments on commit f61a2e7

Please sign in to comment.