Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7151 closed enhancement (fixed)

Move `'bp_register_post_types'` and `'bp_register_taxonomies'` hooks before`'bp_core_set_uri_globals'`

Reported by: r-a-y's profile r-a-y Owned by: r-a-y's profile r-a-y
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.2
Component: Core Keywords: has-patch commit
Cc:

Description (last modified by r-a-y)

Split from #7138, we should preferably move our 'bp_register_post_types' and 'bp_register_taxonomies' hooks before bp_core_set_uri_globals() is run.

Currently, bp_core_set_uri_globals() runs on 'bp_init' at priority 2 and the two other hooks run at priority 3.

Attached patch does two things:

  • Sets the priority of 'bp_register_post_types' and 'bp_register_taxonomies' to 2 and called just before the 'bp_core_set_uri_globals' hook.
  • Replaces add_action( 'bp_loaded', 'bp_register_member_types', 8 ); with add_action( 'bp_register_taxonomies', 'bp_register_member_types' ); to be more inline with our existing 'bp_register_taxonomies' hook.

Attachments (1)

7151.01.patch (2.0 KB) - added by r-a-y 8 years ago.

Download all attachments as: .zip

Change History (5)

@r-a-y
8 years ago

#1 @r-a-y
8 years ago

  • Description modified (diff)

#2 @DJPaul
8 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.7

LGTM

#3 @r-a-y
8 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 10981:

Core: Move 'bp_register_post_types' and 'bp_register_taxonomies' hooks before'bp_core_set_uri_globals'.

This commit does two things:

  • Sets the priority of the 'bp_register_post_types' and 'bp_register_taxonomies' to 2 and called just before the 'bp_core_set_uri_globals' hook.
  • Registers our member and group types on the more, appropriate 'bp_register_taxonomies' hook.

Fixes #7151.

This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.


8 years ago

Note: See TracTickets for help on using tickets.