- Timestamp:
- 11/13/2021 02:33:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress-functions.php
r13089 r13145 177 177 add_action( 'bp_actions', array( $this, 'neutralize_core_template_notices' ), 6 ); 178 178 179 // Scripts. 180 add_action( 'bp_enqueue_scripts', array( $this, 'register_scripts' ), 2 ); // Register theme JS. 179 // Scripts & Styles. 180 $registration_params = array( 181 'hook' => 'bp_enqueue_scripts', 182 'priority' => 2, 183 ); 184 185 /* 186 * The WordPress Full Site Editing feature needs Scripts 187 * and Styles to be registered earlier. 188 */ 189 if ( current_theme_supports( 'block-templates' ) ) { 190 $registration_params['hook'] = 'bp_init'; 191 $registration_params['priority'] = 20; 192 } 193 194 // Register theme JS. 195 add_action( $registration_params['hook'], array( $this, 'register_scripts' ), $registration_params['priority'] ); 196 197 // Enqueue theme CSS. 198 add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 199 200 // Enqueue theme JS. 201 add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 202 203 // Enqueue theme script localization. 204 add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); 181 205 remove_action( 'bp_enqueue_scripts', 'bp_core_confirmation_js' ); 182 add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); // Enqueue theme CSS.183 add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Enqueue theme JS.184 add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization.185 206 186 207 // Body no-js class.
Note: See TracChangeset
for help on using the changeset viewer.