array(), 'version' => '', ); $asset_path = trailingslashit( __DIR__ ) . 'blocks/dynamic-widget/index.asset.php'; if ( file_exists( $asset_path ) ) { $asset = require $asset_path; } $scripts['bp-dynamic-members-script'] = array( 'file' => plugins_url( 'blocks/dynamic-widget/index.js', __FILE__ ), 'dependencies' => $asset['dependencies'], 'footer' => true, ); return $scripts; } add_filter( 'bp_core_register_common_scripts', 'bp_members_register_scripts', 9, 1 );