Changeset 13194 for trunk/src/bp-friends/bp-friends-blocks.php
- Timestamp:
- 12/23/2021 06:24:36 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-friends/bp-friends-blocks.php (modified) (2 diffs)
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 );
Note: See TracChangeset
for help on using the changeset viewer.