Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/14/2021 06:45:11 PM (5 years ago)
Author:
imath
Message:

Merge the BP Blocks plugin's 'bp/dynamic-groups' Block

  • Adds a new assets/widgets/dynamic-groups.php JavaScript template to our two template packs.
  • Add a front-end script to the Groups component to manage Widget Block sort filters dynamically.
  • Adapt Grunt sass tasks.
  • Add the Block JavaScript source files into src/js/bp-groups/js/blocks.
  • Add the Block Scss source file into src/bp-groups/sass.
  • Generate the development files to ease testing.

Fixes #8523

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-cssjs.php

    r12745 r13004  
    6464        );
    6565}
     66
     67/**
     68 * Registers a new script to manage the dynamic part of the Dynamic groups widget/block.
     69 *
     70 * @since 9.0.0
     71 *
     72 * @param array $scripts Data about the scripts to register.
     73 * @return array Data about the scripts to register.
     74 */
     75function bp_groups_register_widget_block_scripts( $scripts = array() ) {
     76        $scripts['bp-dynamic-groups-script'] = array(
     77                'file'         => plugins_url( 'js/dynamic-groups.js', __FILE__ ),
     78                'dependencies' => array(
     79                        'bp-dynamic-widget-block-script',
     80                        'wp-i18n',
     81                ),
     82                'footer'       => true,
     83        );
     84
     85        return $scripts;
     86}
     87add_filter( 'bp_core_register_common_scripts', 'bp_groups_register_widget_block_scripts', 9, 1 );
Note: See TracChangeset for help on using the changeset viewer.