WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
bug when integrated with WPUF (1 post)

  1. leoloso
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/co-authors-plus/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.