Changeset 4486
- Timestamp:
- 11/23/2012 11:16:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/replies/functions.php
r4427 r4486 987 987 */ 988 988 function bbp_update_reply_revision_log( $args = '' ) { 989 $defaults = array ( 989 990 // Parse arguments with default values 991 $r = bbp_parse_args( $args, array( 990 992 'reason' => '', 991 993 'reply_id' => 0, 992 994 'author_id' => 0, 993 995 'revision_id' => 0 994 ); 995 996 $r = bbp_parse_args( $args, $defaults, 'update_reply_revision_log' ); 997 extract( $r ); 996 ), 'update_reply_revision_log' ); 998 997 999 998 // Populate the variables 1000 $r eason = bbp_format_revision_reason( $reason);1001 $r eply_id = bbp_get_reply_id( $reply_id);1002 $ author_id = bbp_get_user_id ( $author_id, false, true );1003 $r evision_id = (int) $revision_id;999 $r['reason'] = bbp_format_revision_reason( $r['reason'] ); 1000 $r['reply_id'] = bbp_get_reply_id( $r['reply_id'] ); 1001 $r['author_id'] = bbp_get_user_id ( $r['author_id'], false, true ); 1002 $r['revision_id'] = (int) $r['revision_id']; 1004 1003 1005 1004 // Get the logs and append the new one to those 1006 $revision_log = bbp_get_reply_raw_revision_log( $reply_id);1007 $revision_log[ $revision_id] = array( 'author' => $author_id, 'reason' => $reason);1005 $revision_log = bbp_get_reply_raw_revision_log( $r['reply_id'] ); 1006 $revision_log[ $r['revision_id'] ] = array( 'author' => $r['author_id'], 'reason' => $r['reason'] ); 1008 1007 1009 1008 // Finally, update 1010 update_post_meta( $r eply_id, '_bbp_revision_log', $revision_log );1011 1012 return apply_filters( 'bbp_update_reply_revision_log', $revision_log, $r eply_id);1009 update_post_meta( $r['reply_id'], '_bbp_revision_log', $revision_log ); 1010 1011 return apply_filters( 'bbp_update_reply_revision_log', $revision_log, $r['reply_id'] ); 1013 1012 } 1014 1013
Note: See TracChangeset
for help on using the changeset viewer.