Changeset 3505 for branches/plugin/bbp-admin/bbp-topics.php
- Timestamp:
- 09/10/2011 10:27:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-topics.php
r3376 r3505 721 721 */ 722 722 function topics_row_actions( $actions, $topic ) { 723 global $bbp;724 723 725 724 if ( $topic->post_type == $this->post_type ) { … … 735 734 // Close 736 735 // Show the 'close' and 'open' link on published and closed posts only 737 if ( in_array( $topic->post_status, array( 'publish', $bbp->closed_status_id) ) ) {736 if ( in_array( $topic->post_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) { 738 737 $close_uri = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID ) ); 739 738 if ( bbp_is_topic_open( $topic->ID ) ) … … 767 766 // Do not show trash links for spam topics, or spam links for trashed topics 768 767 if ( current_user_can( 'delete_topic', $topic->ID ) ) { 769 if ( $bbp->trash_status_id== $topic->post_status ) {768 if ( bbp_get_trash_status_id() == $topic->post_status ) { 770 769 $post_type_object = get_post_type_object( bbp_get_topic_post_type() ); 771 770 $actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>"; … … 774 773 } 775 774 776 if ( $bbp->trash_status_id== $topic->post_status || !EMPTY_TRASH_DAYS ) {775 if ( bbp_get_trash_status_id() == $topic->post_status || !EMPTY_TRASH_DAYS ) { 777 776 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>"; 778 } elseif ( $bbp->spam_status_id== $topic->post_status ) {777 } elseif ( bbp_get_spam_status_id() == $topic->post_status ) { 779 778 unset( $actions['trash'] ); 780 779 } … … 949 948 global $bbp; 950 949 950 // Bail if bbPress is not loaded 951 if ( 'bbPress' !== get_class( $bbp ) ) return; 952 951 953 $bbp->admin->topics = new BBP_Topics_Admin(); 952 954 }
Note: See TracChangeset
for help on using the changeset viewer.