Changeset 1032 for trunk/bp-friends/bp-friends-templatetags.php
- Timestamp:
- 02/09/2009 06:52:51 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends/bp-friends-templatetags.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-templatetags.php
r1025 r1032 248 248 global $friends_template, $bp; 249 249 250 echo apply_filters( 'bp_friend_accept_request_link', $bp->loggedin_user->domain . $bp->friends->slug . '/requests/accept/' . $friends_template->friendship->id);250 echo apply_filters( 'bp_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/requests/accept/' . $friends_template->friendship->id, 'friends_accept_friendship' ) ); 251 251 } 252 252 … … 254 254 global $friends_template, $bp; 255 255 256 echo apply_filters( 'bp_friend_reject_request_link', $bp->loggedin_user->domain . $bp->friends->slug . '/requests/reject/' . $friends_template->friendship->id);256 echo apply_filters( 'bp_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/requests/reject/' . $friends_template->friendship->id, 'friends_reject_friendship' ) ); 257 257 } 258 258 … … 269 269 ?> 270 270 <form action="<?php echo $action ?>" id="friend-search-form" method="post"> 271 271 272 <label for="friend-search-box" id="friend-search-label"><?php echo $label ?> <img id="ajax-loader" src="<?php echo $bp->friends->image_base ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></label> 272 273 <input type="search" name="friend-search-box" id="friend-search-box" value="<?php echo $value ?>"<?php echo $disabled ?> /> 273 <?php if ( function_exists('wp_nonce_field') ) 274 wp_nonce_field('friend_search' ); 275 ?> 274 275 <?php wp_nonce_field( 'friends_search', '_wpnonce_friend_search' ) ?> 276 276 <input type="hidden" name="initiator" id="initiator" value="<?php echo $bp->displayed_user->id ?>" /> 277 277 278 </form> 278 279 <?php … … 318 319 echo '<a class="requested" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '">' . __( 'Friendship Requested', 'buddypress' ) . '</a>'; 319 320 } else if ( 'is_friend' == $friend_status ) { 320 echo '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id. '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>';321 echo '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id, 'friends_remove_friend' ) . '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>'; 321 322 } else { 322 echo '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id. '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>';323 echo '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id, 'friends_add_friend' ) . '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>'; 323 324 } 324 325 echo '</div>'; 325 326 // This causes duplicates, so it's not feasible as is.327 // if ( function_exists('wp_nonce_field') )328 // wp_nonce_field('addremove_friend');329 326 } 330 327 }
Note: See TracChangeset
for help on using the changeset viewer.