Changeset 3125 for branches/plugin/bbp-includes/bbp-reply-template.php
- Timestamp:
- 05/09/2011 06:51:40 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-template.php
r3101 r3125 1071 1071 function bbp_get_reply_topic_id( $reply_id = 0 ) { 1072 1072 1073 // Assume there is no topic id 1074 $topic_id = 0; 1075 1073 1076 // Check that reply_id is valid 1074 if ( $reply_id = bbp_get_reply_id( $reply_id ) ) {1077 if ( $reply_id = bbp_get_reply_id( $reply_id ) ) 1075 1078 1076 1079 // Get topic_id from reply 1077 $topic_id = get_post_meta( $reply_id, '_bbp_topic_id', true ); 1078 $topic_id = bbp_get_topic_id( $topic_id ); 1079 1080 // reply_id is not valid, so no topic exists 1081 } else { 1082 $topic_id = 0; 1083 } 1080 if ( $topic_id = get_post_meta( $reply_id, '_bbp_topic_id', true ) ) 1081 1082 // Validate the topic_id 1083 $topic_id = bbp_get_topic_id( $topic_id ); 1084 1084 1085 1085 return apply_filters( 'bbp_get_reply_topic_id', (int) $topic_id, $reply_id ); … … 1111 1111 function bbp_get_reply_forum_id( $reply_id = 0 ) { 1112 1112 1113 // Assume there is no forum 1114 $forum_id = 0; 1115 1113 1116 // Check that reply_id is valid 1114 if ( $reply_id = bbp_get_reply_id( $reply_id ) ) {1117 if ( $reply_id = bbp_get_reply_id( $reply_id ) ) 1115 1118 1116 1119 // Get forum_id from reply 1117 $forum_id = get_post_meta( $reply_id, '_bbp_forum_id', true ); 1118 $forum_id = bbp_get_forum_id( $forum_id ); 1119 1120 // reply_id is not valid, so no forum exists 1121 } else { 1122 $forum_id = 0; 1123 } 1120 if ( $forum_id = get_post_meta( $reply_id, '_bbp_forum_id', true ) ) 1121 1122 // Validate the forum_id 1123 $forum_id = bbp_get_forum_id( $forum_id ); 1124 1124 1125 1125 return apply_filters( 'bbp_get_reply_forum_id', (int) $forum_id, $reply_id );
Note: See TracChangeset
for help on using the changeset viewer.