bug when integrated with WPUF
-
Hi, I use Co-Authors plus 3.0.5 in combination with WP User Frontend plugin.
There’s a bug when editing a post in the frontend, and the post was created before installing Co-Authors plugin: because the term for the author was never saved for this post, in file template-tags.php, function get_coauthors, I changed the code:
else if ( !$coauthors_plus->force_guest_authors ) { if ( !is_admin()) { $post_from_post_id = get_post($post_id); $post_author = get_userdata( $post_from_post_id->post_author ); } elseif ( $post ) { $post_author = get_userdata( $post->post_author ); } else {
I added that !is_admin() if sentence (WPUF => editing in front-end), otherwise since that old post has no terms from Co-Author Plus, it would take $post (I have force_guest_author = false), but $post is not the post we’re editing, but the page where to edit the post in the frontend. Then it creates a mess.
- The topic ‘bug when integrated with WPUF’ is closed to new replies.