Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/28/2017 02:09:54 AM (4 years ago)
Author:
johnjamesjacoby
Message:

Core: Add source parameter to API registrations.

This change makes it easier to target bbPress-specific post types & statuses, and taxonomies. source may not be the final key, but thankfully all of these APIs accept additional keys, and if support is added to core eventually, we can easily migrate over to it without problems.

Trunk, for 2.6. See: https://core.trac.wordpress.org/ticket/41739

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/functions.php

    r6644 r6672  
    20492049
    20502050    // Some other post type besides Forums, Topics, or Replies
    2051     } elseif ( ! array_diff( $post_types, array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ) {
     2051    } elseif ( ! array_diff( $post_types, get_post_types( array( 'source' => 'bbpress' ) ) ) ) {
    20522052
    20532053        // Get forums to exclude
Note: See TracChangeset for help on using the changeset viewer.