Changeset 3308
- Timestamp:
- 10/25/2010 08:56:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-templatetags.php
r3300 r3308 959 959 global $topic_template; 960 960 961 / * Never show for the first post in a topic. */962 if ( 0 == $topic_template->current_post && $topic_template->pag_page == 1)961 // Never show for the first post in a topic. 962 if ( 0 == $topic_template->current_post && 1 == $topic_template->pag_page ) 963 963 return; 964 964 965 965 $defaults = array( 966 'sep erator' => '|'966 'separator' => ' | ' 967 967 ); 968 968 … … 970 970 extract( $r, EXTR_SKIP ); 971 971 972 $query_vars = ''; 972 973 if ( $_SERVER['QUERY_STRING'] ) 973 974 $query_vars = '?' . $_SERVER['QUERY_STRING']; 974 975 975 $links = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit/post/' . $topic_template->post->post_id . '/' . $query_vars, 'bp_forums_edit_post' ) . '">' . __( 'Edit', 'buddypress' ) . '</a> ' . $seperator . ' '; 976 $links .= '<a class="confirm" id="post-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete/post/' . $topic_template->post->post_id, 'bp_forums_delete_post' ) . '">' . __( 'Delete', 'buddypress' ) . '</a> | '; 977 978 return $links; 976 $links = array(); 977 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit/post/' . $topic_template->post->post_id . '/' . $query_vars, 'bp_forums_edit_post' ) . '">' . __( 'Edit', 'buddypress' ) . '</a>'; 978 $links[] .= '<a class="confirm" id="post-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete/post/' . $topic_template->post->post_id, 'bp_forums_delete_post' ) . '">' . __( 'Delete', 'buddypress' ) . '</a>'; 979 980 return apply_filters( 'bp_get_the_topic_post_admin_links', implode( $separator, $links ), $links, $r ); 979 981 } 980 982
Note: See TracChangeset
for help on using the changeset viewer.