Changeset 3505 for branches/plugin/bbp-includes/bbp-reply-functions.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-functions.php
r3501 r3505 32 32 $default_reply = array( 33 33 'post_parent' => 0, // topic ID 34 'post_status' => 'publish',34 'post_status' => bbp_get_public_status_id(), 35 35 'post_type' => bbp_get_reply_post_type(), 36 36 'post_author' => 0, … … 116 116 return; 117 117 118 global $bbp;119 120 118 // Nonce check 121 119 check_admin_referer( 'bbp-new-reply' ); … … 232 230 'post_content' => $reply_content, 233 231 'post_parent' => $topic_id, 234 'post_status' => 'publish',232 'post_status' => bbp_get_public_status_id(), 235 233 'post_type' => bbp_get_reply_post_type() 236 234 ); … … 264 262 // If this reply starts as trash, add it to pre_trashed_replies 265 263 // for the topic, so it is properly restored. 266 if ( bbp_is_topic_trash( $topic_id ) || ( $reply_data['post_status'] == $bbp->trash_status_id) ) {264 if ( bbp_is_topic_trash( $topic_id ) || ( $reply_data['post_status'] == bbp_get_trash_status_id() ) ) { 267 265 268 266 // Trash the reply … … 282 280 283 281 // If reply or topic are spam, officially spam this reply 284 if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] == $bbp->spam_status_id) )285 add_post_meta( $reply_id, '_bbp_spam_meta_status', 'publish');282 if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] == bbp_get_spam_status_id() ) ) 283 add_post_meta( $reply_id, '_bbp_spam_meta_status', bbp_get_public_status_id() ); 286 284 287 285 /** Update counts, etc... *****************************************/ … … 1078 1076 */ 1079 1077 function bbp_spam_reply( $reply_id = 0 ) { 1080 global $bbp;1081 1078 1082 1079 // Get reply … … 1085 1082 1086 1083 // Bail if already spam 1087 if ( $reply['post_status'] == $bbp->spam_status_id)1084 if ( bbp_get_spam_status_id() == $reply['post_status'] ) 1088 1085 return false; 1089 1086 … … 1095 1092 1096 1093 // Set post status to spam 1097 $reply['post_status'] = $bbp->spam_status_id;1094 $reply['post_status'] = bbp_get_spam_status_id(); 1098 1095 1099 1096 // No revisions … … 1125 1122 */ 1126 1123 function bbp_unspam_reply( $reply_id = 0 ) { 1127 global $bbp;1128 1124 1129 1125 // Get reply … … 1132 1128 1133 1129 // Bail if already not spam 1134 if ( $reply['post_status'] != $bbp->spam_status_id)1130 if ( bbp_get_spam_status_id() != $reply['post_status'] ) 1135 1131 return false; 1136 1132
Note: See TracChangeset
for help on using the changeset viewer.