11, 'bp_setup_nav' => 12, 'bp_core_action_search_site' => 13, 'bp_setup_title' => 14, '_bp_maybe_remove_redirect_canonical' => 20, 'bp_remove_adjacent_posts_rel_link' => 20, ); if ( 'bp_init' === $hook ) { $key_actions['bp_setup_canonical_stack'] = 5; $key_actions['bp_setup_nav'] = 6; $key_actions['bp_core_action_search_site'] = 7; $key_actions['bp_setup_title'] = 8; $key_actions['_bp_maybe_remove_redirect_canonical'] = 10; $key_actions['bp_remove_adjacent_posts_rel_link'] = 10; } foreach ( $key_actions as $action => $priority ) { $arguments = 1; if ( 'bp_core_action_search_site' === $action ) { $arguments = 0; } add_action( $hook, $action, $priority, $arguments ); } // Fire a deprecation notice for following deprecated hooks, if needed. if ( ! bp_is_classic() ) { apply_filters_deprecated( 'bp_uri', array( '' ), '12.0.0' ); do_action_deprecated( 'is_not_buddypress', array(), '12.0.0' ); } } add_action( 'bp_init', 'bp_core_setup_query_parser', 1 ); /** * The bp_register_taxonomies hooks - Attached to 'bp_init' @ priority 2 above. */ add_action( 'bp_register_taxonomies', 'bp_register_member_types' ); add_action( 'bp_register_taxonomies', 'bp_register_type_metadata', 20 ); /** * Late includes. * * Run after the canonical stack is setup to allow for conditional includes * on certain pages. */ add_action( 'bp_setup_canonical_stack', 'bp_late_include', 20 ); /** * The bp_template_redirect hook - Attached to 'template_redirect' above. * * Attach various template actions to the bp_template_redirect action. * The load order helps to execute code at the correct time. * * Note that we currently use template_redirect versus template include because * BuddyPress is a bully and overrides the existing themes output in many * places. This won't always be this way, we promise. * v---Load order */ add_action( 'bp_template_redirect', 'bp_redirect_canonical', 2 ); add_action( 'bp_template_redirect', 'bp_actions', 4 ); add_action( 'bp_template_redirect', 'bp_screens', 6 ); add_action( 'bp_template_redirect', 'bp_post_request' ); add_action( 'bp_template_redirect', 'bp_get_request' ); /** * Add the BuddyPress functions file and the Theme Compat Default features. */ add_action( 'bp_after_setup_theme', 'bp_check_theme_template_pack_dependency', -10 ); add_action( 'bp_after_setup_theme', 'bp_set_block_theme_compat', 0 ); add_action( 'bp_after_setup_theme', 'bp_load_theme_functions', 1 ); add_action( 'bp_after_setup_theme', 'bp_register_theme_compat_default_features' ); // Adds a new hook to be sure to enqueue scripts when `is_buddypress()` is true. add_action( 'bp_enqueue_scripts', 'bp_enqueue_community_scripts' ); // Load the admin. if ( is_admin() ) { add_action( 'bp_loaded', 'bp_admin' ); } // Activation redirect. add_action( 'bp_activation', 'bp_add_activation_redirect' ); // Email unsubscribe. add_action( 'bp_get_request_unsubscribe', 'bp_email_unsubscribe_handler' );