Skip to:
Content

BuddyPress.org

Changeset 10981


Ignore:
Timestamp:
08/02/2016 05:32:38 AM (5 years ago)
Author:
r-a-y
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-actions.php

    r10941 r10981  
    5858add_action( 'bp_loaded', 'bp_setup_cache_groups',       5  );
    5959add_action( 'bp_loaded', 'bp_setup_widgets',            6  );
    60 add_action( 'bp_loaded', 'bp_register_member_types',    8  );
    6160add_action( 'bp_loaded', 'bp_register_theme_packages',  12 );
    6261add_action( 'bp_loaded', 'bp_register_theme_directory', 14 );
     
    6968 *                                                   v---Load order
    7069 */
     70add_action( 'bp_init', 'bp_register_post_types',     2  );
     71add_action( 'bp_init', 'bp_register_taxonomies',     2  );
    7172add_action( 'bp_init', 'bp_core_set_uri_globals',    2  );
    72 add_action( 'bp_init', 'bp_register_post_types',     3  );
    73 add_action( 'bp_init', 'bp_register_taxonomies',     3  );
    7473add_action( 'bp_init', 'bp_setup_globals',           4  );
    7574add_action( 'bp_init', 'bp_setup_canonical_stack',   5  );
     
    8079add_action( 'bp_init', 'bp_add_rewrite_rules',       30 );
    8180add_action( 'bp_init', 'bp_add_permastructs',        40 );
     81
     82/**
     83 * The bp_register_taxonomies hook - Attached to 'bp_init' @ priority 2 above.
     84 */
     85add_action( 'bp_register_taxonomies', 'bp_register_member_types' );
    8286
    8387/**
  • trunk/src/bp-groups/bp-groups-actions.php

    r10917 r10981  
    2828    do_action( 'bp_groups_register_group_types' );
    2929}
    30 add_action( 'bp_init', 'bp_groups_register_group_types', 1 );
     30add_action( 'bp_register_taxonomies', 'bp_groups_register_group_types' );
    3131
    3232/**
Note: See TracChangeset for help on using the changeset viewer.