Changeset 3505 for branches/plugin/bbp-includes/bbp-reply-template.php
- Timestamp:
- 09/10/2011 10:27:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-template.php
r3501 r3505 70 70 71 71 // Default status 72 $default_status = join( ',', array( 'publish', $bbp->closed_status_id) );72 $default_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ); 73 73 74 74 // Skip topic_id if in the replies widget query … … 84 84 // What are the default allowed statuses (based on user caps) 85 85 if ( bbp_get_view_all( 'edit_others_replies' ) ) { 86 $default_status = join( ',', array( 'publish', $bbp->closed_status_id, $bbp->spam_status_id, 'trash' ) );86 $default_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), 'trash' ) ); 87 87 } 88 88 } … … 369 369 */ 370 370 function bbp_get_reply_url( $reply_id = 0, $redirect_to = '' ) { 371 global $ bbp, $wp_rewrite;371 global $wp_rewrite; 372 372 373 373 // Set needed variables … … 692 692 function bbp_get_reply_status( $reply_id = 0 ) { 693 693 $reply_id = bbp_get_reply_id( $reply_id ); 694 695 694 return apply_filters( 'bbp_get_reply_status', get_post_status( $reply_id ), $reply_id ); 696 695 } … … 707 706 */ 708 707 function bbp_is_reply_published( $reply_id = 0 ) { 709 global $bbp;710 711 708 $reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) ); 712 return apply_filters( 'bbp_is_reply_published', 'publish'== $reply_status, $reply_id );709 return apply_filters( 'bbp_is_reply_published', bbp_get_public_status_id() == $reply_status, $reply_id ); 713 710 } 714 711 … … 724 721 */ 725 722 function bbp_is_reply_spam( $reply_id = 0 ) { 726 global $bbp;727 728 723 $reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) ); 729 730 return apply_filters( 'bbp_is_reply_spam', $bbp->spam_status_id == $reply_status, $reply_id ); 724 return apply_filters( 'bbp_is_reply_spam', bbp_get_spam_status_id() == $reply_status, $reply_id ); 731 725 } 732 726 … … 742 736 */ 743 737 function bbp_is_reply_trash( $reply_id = 0 ) { 744 global $bbp;745 746 738 $reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) ); 747 748 return apply_filters( 'bbp_is_reply_trash', $bbp->trash_status_id == $reply_status, $reply_id ); 739 return apply_filters( 'bbp_is_reply_trash', bbp_get_trash_status_id() == $reply_status, $reply_id ); 749 740 } 750 741 … … 1337 1328 */ 1338 1329 function bbp_get_reply_admin_links( $args = '' ) { 1339 global $bbp;1340 1330 1341 1331 $defaults = array ( … … 1383 1373 // See if links need to be unset 1384 1374 $reply_status = bbp_get_reply_status( $r['id'] ); 1385 if ( in_array( $reply_status, array( $bbp->spam_status_id, $bbp->trash_status_id) ) ) {1375 if ( in_array( $reply_status, array( bbp_get_spam_status_id(), bbp_get_trash_status_id() ) ) ) { 1386 1376 1387 1377 // Spam link shouldn't be visible on trashed topics 1388 if ( $reply_status == $bbp->trash_status_id)1378 if ( $reply_status == bbp_get_trash_status_id() ) 1389 1379 unset( $r['links']['spam'] ); 1390 1380 1391 1381 // Trash link shouldn't be visible on spam topics 1392 elseif ( isset( $r['links']['trash'] ) && $reply_status == $bbp->spam_status_id)1382 elseif ( isset( $r['links']['trash'] ) && $reply_status == bbp_get_spam_status_id() ) 1393 1383 unset( $r['links']['trash'] ); 1394 1384 }
Note: See TracChangeset
for help on using the changeset viewer.