• Around line 169 if you change:

    $this->supported_post_types = apply_filters( 'coauthors_supported_post_types', $post_types_with_authors );

    to check for an already set array

    if (!$this->supported_post_types) {
    $this->supported_post_types = apply_filters( 'coauthors_supported_post_types', $post_types_with_authors );
    }

    Then the ability to declare supported_post_types will actually work. Without this fix I couldn’t get your plugin working with CPT-onomies.

    https://wordpress.org/plugins/co-authors-plus/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Sorry, not sure I follow. Why aren’t you using the filter?

    Thread Starter dancingmammoth

    (@dancingmammoth)

    Because for some reason get_post_types() doesn’t return all the custom fields registered by CPT-onomies.

    The point isn’t to avoid the filter. It’s to force it to not redeclare $this->supported_post_types if you set it manually at the beginning of the file.

    Is get_post_types() not returning CPT-onomies custom post types or is get_post_types() getting everything and then certain custom post types are being removed in the foreach loop that removes custom post types that don’t support ‘author’?

    Thread Starter dancingmammoth

    (@dancingmammoth)

    It’s not returning them irrespective of whether they support the ‘author’ or not.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fix for supported_post_types’ is closed to new replies.