BP_Nouveau::setup_actions()
Setup the Template Pack common actions.
Description
Source
File: bp-templates/bp-nouveau/buddypress-functions.php
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | protected function setup_actions() { // Filter BuddyPress template hierarchy and look for page templates. add_filter( 'bp_get_buddypress_template' , array ( $this , 'theme_compat_page_templates' ), 10, 1 ); // Add our "buddypress" div wrapper to theme compat template parts. add_filter( 'bp_replace_the_content' , array ( $this , 'theme_compat_wrapper' ), 999 ); // We need to neutralize the BuddyPress core "bp_core_render_message()" once it has been added. add_action( 'bp_actions' , array ( $this , 'neutralize_core_template_notices' ), 6 ); // Scripts add_action( 'bp_enqueue_scripts' , array ( $this , 'register_scripts' ), 2 ); // Register theme JS remove_action( 'bp_enqueue_scripts' , 'bp_core_confirmation_js' ); add_action( 'bp_enqueue_scripts' , array ( $this , 'enqueue_styles' ) ); // Enqueue theme CSS add_action( 'bp_enqueue_scripts' , array ( $this , 'enqueue_scripts' ) ); // Enqueue theme JS add_filter( 'bp_enqueue_scripts' , array ( $this , 'localize_scripts' ) ); // Enqueue theme script localization // Register login and forgot password popup link add_action( 'login_enqueue_scripts' , array ( $this , 'register_scripts' ), 2 ); add_action( 'login_enqueue_scripts' , array ( $this , 'enqueue_styles' ) ); add_action( 'login_enqueue_scripts' , array ( $this , 'enqueue_scripts' ) ); add_action( 'login_head' , array ( $this , 'platform_login_scripts' ) ); // Body no-js class add_filter( 'body_class' , array ( $this , 'add_nojs_body_class' ), 20, 1 ); // Ajax querystring add_filter( 'bp_ajax_querystring' , 'bp_nouveau_ajax_querystring' , 10, 2 ); // Register directory nav items add_action( 'bp_screens' , array ( $this , 'setup_directory_nav' ), 15 ); // Register the Primary Object nav widget add_action( 'bp_widgets_init' , array ( 'BP_Nouveau_Object_Nav_Widget' , 'register_widget' ) ); // Set the BP Uri for the Ajax customizer preview add_filter( 'bp_uri' , array ( $this , 'customizer_set_uri' ), 10, 1 ); // Set the forum slug on edit page from backend. add_action( 'save_post' , array ( $this , 'bp_change_forum_slug_on_edit_save_page' ), 10, 2 ); // Set the Forums to selected in menu items. add_filter( 'nav_menu_css_class' , array ( $this , 'bbp_set_forum_selected_menu_class' ), 10, 3 ); /** Override **********************************************************/ /** * Fires after all of the BuddyPress theme compat actions have been added. * * @since BuddyPress 3.0.0 * * @param BP_Nouveau $this Current BP_Nouveau instance. */ do_action_ref_array( 'bp_theme_compat_actions' , array ( & $this ) ); } |
Changelog
Version | Description |
---|---|
BuddyPress 3.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.