Changeset 13464 for trunk/src/bp-friends/bp-friends-cssjs.php
- Timestamp:
- 04/25/2023 10:17:33 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-friends/bp-friends-cssjs.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/bp-friends-cssjs.php
r13092 r13464 15 15 * 16 16 * @since 9.0.0 17 * @since 12.0.0 Uses the `@wordpress/scripts` `index.asset.php` generated file to get dependencies. 17 18 * 18 19 * @param array $scripts Data about the scripts to register. … … 20 21 */ 21 22 function bp_friends_register_scripts( $scripts = array() ) { 23 if ( ! bp_support_blocks() ) { 24 return $scripts; 25 } 26 27 $asset = array( 28 'dependencies' => array(), 29 'version' => '' 30 ); 31 $asset_path = trailingslashit( dirname( __FILE__ ) ) . 'blocks/dynamic-widget/index.asset.php'; 32 33 if ( file_exists( $asset_path ) ) { 34 $asset = require $asset_path; 35 } 36 22 37 $scripts['bp-friends-script'] = array( 23 'file' => plugins_url( 'js/friends.js', __FILE__ ), 24 'dependencies' => array( 25 'bp-dynamic-widget-block-script', 26 'wp-i18n', 27 ), 38 'file' => plugins_url( 'blocks/dynamic-widget/index.js', __FILE__ ), 39 'dependencies' => $asset['dependencies'], 28 40 'footer' => true, 29 41 );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)