Changeset 13194
- Timestamp:
- 12/23/2021 06:24:36 AM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/bp-friends-blocks.php
r13185 r13194 24 24 return; 25 25 } 26 27 $path = sprintf( 28 '/%1$s/%2$s/%3$s', 29 bp_rest_namespace(), 30 bp_rest_version(), 31 buddypress()->members->id 32 ); 33 34 wp_localize_script( 35 'bp-friends-script', 36 'bpFriendsSettings', 37 array( 38 'path' => ltrim( $path, '/' ), 39 'root' => esc_url_raw( get_rest_url() ), 40 'nonce' => wp_create_nonce( 'wp_rest' ), 41 ) 42 ); 26 43 27 44 // Include the common JS template. … … 220 237 wp_set_script_translations( 'bp-friends-script', 'buddypress' ); 221 238 wp_enqueue_script( 'bp-friends-script' ); 222 wp_localize_script(223 'bp-friends-script',224 'bpFriendsSettings',225 array(226 'path' => ltrim( $path, '/' ),227 'root' => esc_url_raw( get_rest_url() ),228 'nonce' => wp_create_nonce( 'wp_rest' ),229 )230 );231 239 232 240 add_action( 'wp_footer', 'bp_friends_blocks_add_script_data', 1 ); -
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 ); -
trunk/src/bp-members/bp-members-blocks.php
r13185 r13194 346 346 return; 347 347 } 348 349 $path = sprintf( 350 '/%1$s/%2$s/%3$s', 351 bp_rest_namespace(), 352 bp_rest_version(), 353 buddypress()->members->id 354 ); 355 356 wp_localize_script( 357 'bp-dynamic-members-script', 358 'bpDynamicMembersSettings', 359 array( 360 'path' => ltrim( $path, '/' ), 361 'root' => esc_url_raw( get_rest_url() ), 362 'nonce' => wp_create_nonce( 'wp_rest' ), 363 ) 364 ); 348 365 349 366 // Include the common JS template. … … 513 530 wp_set_script_translations( 'bp-dynamic-members-script', 'buddypress' ); 514 531 wp_enqueue_script( 'bp-dynamic-members-script' ); 515 wp_localize_script(516 'bp-dynamic-members-script',517 'bpDynamicMembersSettings',518 array(519 'path' => ltrim( $path, '/' ),520 'root' => esc_url_raw( get_rest_url() ),521 'nonce' => wp_create_nonce( 'wp_rest' ),522 )523 );524 532 525 533 add_action( 'wp_footer', 'bp_members_blocks_add_script_data', 1 );
Note: See TracChangeset
for help on using the changeset viewer.