Changeset 10809 for trunk/src/bp-groups/classes/class-bp-groups-widget.php
- Timestamp:
- 05/25/2016 05:36:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-widget.php
r10793 r10809 31 31 parent::__construct( false, _x( '(BuddyPress) Groups', 'widget name', 'buddypress' ), $widget_ops ); 32 32 33 if ( is_customize_preview() || is_active_widget( false, false, $this->id_base ) && ! is_admin() && ! is_network_admin() ) { 34 $min = bp_core_get_minified_asset_suffix(); 35 wp_enqueue_script( 'groups_widget_groups_list-js', buddypress()->plugin_url . "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() ); 33 if ( is_customize_preview() || is_active_widget( false, false, $this->id_base ) ) { 34 add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 36 35 } 36 } 37 38 /** 39 * Enqueue scripts. 40 * 41 * @since 2.6.0 42 */ 43 public function enqueue_scripts() { 44 $min = bp_core_get_minified_asset_suffix(); 45 wp_enqueue_script( 'groups_widget_groups_list-js', buddypress()->plugin_url . "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() ); 37 46 } 38 47
Note: See TracChangeset
for help on using the changeset viewer.