Changeset 13194 for trunk/src/bp-groups/bp-groups-blocks.php
- Timestamp:
- 12/23/2021 06:24:36 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-groups/bp-groups-blocks.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-blocks.php
r13185 r13194 325 325 return; 326 326 } 327 328 $path = sprintf( 329 '/%1$s/%2$s/%3$s', 330 bp_rest_namespace(), 331 bp_rest_version(), 332 buddypress()->groups->id 333 ); 334 335 wp_localize_script( 336 'bp-dynamic-groups-script', 337 'bpDynamicGroupsSettings', 338 array( 339 'path' => ltrim( $path, '/' ), 340 'root' => esc_url_raw( get_rest_url() ), 341 'nonce' => wp_create_nonce( 'wp_rest' ), 342 ) 343 ); 327 344 328 345 // Include the common JS template. … … 496 513 wp_set_script_translations( 'bp-dynamic-groups-script', 'buddypress' ); 497 514 wp_enqueue_script( 'bp-dynamic-groups-script' ); 498 wp_localize_script(499 'bp-dynamic-groups-script',500 'bpDynamicGroupsSettings',501 array(502 'path' => ltrim( $path, '/' ),503 'root' => esc_url_raw( get_rest_url() ),504 'nonce' => wp_create_nonce( 'wp_rest' ),505 )506 );507 515 508 516 add_action( 'wp_footer', 'bp_groups_blocks_add_script_data', 1 );
Note: See TracChangeset
for help on using the changeset viewer.