Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php
<+>UTF-8
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php	(revision 4380)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php	(revision )
@@ -41,6 +41,7 @@
 		if ( $blog_id && defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID == $blog_id ) {
 			$this->dropin          = new Dropin;
 			$this->support_compat  = new Support_Compat;
+			$this->user_notes      = new User_Notes;
 
 			// Only load Performance_Optimizations if necessary.
 			$this->performance = new Performance_Optimizations;
Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php	(revision )
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php	(revision )
@@ -0,0 +1,264 @@
+<?php
+
+namespace WordPressdotorg\Forums;
+
+class User_Notes {
+	/**
+	 * An array of authors who have written notes.
+	 *
+	 * These are stored to avoid looking up user IDs for every note.
+	 *
+	 * @access private
+	 *
+	 * @var array $note_authors
+	 */
+	private $note_authors = array();
+
+	/**
+	 * An array of all notes for each user.
+	 *
+	 * As users may have written multiple replies, in a thread, this will save us needing to look up all notes multiple times.
+	 *
+	 * @access private
+	 *
+	 * @var array $user_notes
+	 */
+	private $user_notes = array();
+
+	public function __construct() {
+		add_action( 'bbp_theme_after_reply_author_details', array( $this, 'user_note_link' ) );
+		add_action( 'bbp_theme_after_reply_content', array( $this, 'user_note_fields' ) );
+
+		add_action( 'bbp_template_after_user_profile', array( $this, 'user_profile_notes_section' ) );
+
+		add_action( 'init', array( $this, 'add_note' ) );
+
+		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+	}
+
+	/**
+	 * Append a notes section to user profiles
+	 *
+	 * @return void
+	 */
+	function user_profile_notes_section() {
+		if ( ! current_user_can( 'moderate' ) ) {
+			return;
+		}
+		$user = bbp_get_user_id();
+
+		printf(
+			'<h2 class="entry-title">%s</h2>',
+			esc_html__( 'User Notes', 'wporg-forums' )
+		);
+
+		$this->output_user_notes( $user );
+	}
+
+	/**
+	 * Check if a note is added to a post and add it to the relevant users meta data
+	 *
+	 * @return void
+	 */
+	function add_note() {
+		// Make sure a note is added, and that the current user has capabilities to add them
+		if ( ! isset( $_POST['bbp-user-notes-new-note'] ) || empty( $_POST['bbp-user-notes-new-note'] ) || ! current_user_can( 'moderate' ) ) {
+			return;
+		}
+
+		// Make sure our nonces are in order
+		if ( ! check_admin_referer( sprintf( 'bbp_user_note-add-%d', $_POST['bbp-user-note-user-id'] ), '_bbp_user_note_nonce' ) ) {
+			wp_die();
+		}
+
+		// Ensure the ID used is an integer, and a legitimate user
+		$check_user = get_user_by( 'ID', intval( $_POST['bbp-user-note-user-id'] ) );
+		if ( ! $check_user ) {
+			return;
+		}
+
+		// Get an array of existing notes, or create an array if there are none
+		$user_notes = get_user_meta( $check_user->ID, '_bbp_user_note', true );
+		if ( ! $user_notes ) {
+			$user_notes = array();
+		}
+
+		// Add the new note to the array of notes
+		$user_notes[] = (object) array(
+			'note'   => wp_kses( $_POST['bbp-user-notes-new-note'], array( 'a' => array( 'href' => array() ) ) ),
+			'time'   => date( "c" ),
+			'post'   => bbp_get_reply_url( intval( $_POST['bbp-user-note-original-reply'] ) ),
+			'author' => get_current_user_id()
+		);
+
+		update_user_meta( $check_user->ID, '_bbp_user_note', $user_notes );
+	}
+
+	/**
+	 * Register scripts and styles that plugin relies on.
+	 *
+	 * @return void
+	 */
+	function enqueue_scripts() {
+		if ( ! current_user_can( 'moderate' ) ) {
+			return;
+		}
+
+		wp_enqueue_script( 'bbpress-user-notes', plugins_url( '/js/user-notes.js', __DIR__ ), array( 'jquery' ), false, true );
+	}
+
+	/**
+	 * Add the toggle link for notes to the author area of a post
+	 *
+	 * @return void
+	 */
+	function user_note_link() {
+		if ( ! current_user_can( 'moderate' ) ) {
+			return;
+		}
+
+		printf(
+			'<span class="bbpress-user-notes-toggle" data-bbp-user-note-toggle="#bbpress-user-notes-%d">%s</span>',
+			esc_attr( get_the_ID() ),
+			esc_html(
+				sprintf(
+					__( 'Toggle user notes (%d)', 'wporg-forums' ),
+					$this->user_note_count()
+				)
+			)
+		);
+
+	}
+
+	/**
+	 * @param int $user Default null. The user to get counts for, the default being the current user.
+	 *
+	 * @return int
+	 */
+	function user_note_count( $user = null ) {
+		if ( empty( $user ) ) {
+			$user = get_the_author_meta( 'ID' );
+		}
+
+		if ( ! isset( $this->user_notes[ $user ] ) ) {
+			$this->set_user_note_fields( $user );
+		}
+
+		return $this->user_notes[ $user ]['count'];
+	}
+
+	function set_user_note_fields( $user = null ) {
+		if ( empty( $user ) ) {
+			$user = get_the_author_meta( 'ID' );
+		}
+
+		// Break out early if the notes are already grabbed for this session
+		if ( isset( $this->user_notes[ $user ] ) ) {
+			return;
+		}
+
+		$user_notes = get_user_meta( $user, '_bbp_user_note', true );
+
+		$this->user_notes[ $user ] = array(
+			'count' => 0,
+			'raw'   => null,
+			'html'  => array()
+		);
+
+		if ( is_array( $user_notes ) ) {
+			$this->user_notes[ $user ]['count'] = count( $user_notes );
+			$this->user_notes[ $user ]['raw']   = $user_notes;
+
+			foreach ( $user_notes AS $user_note ) {
+				if ( ! isset( $this->note_authors[ $user_note->author ] ) ) {
+					$this->note_authors[ $user_note->author ] = get_user_by( 'ID', $user_note->author );
+				}
+
+				$this->user_notes[ $user ]['html'][] = sprintf(
+					'<div class="bbpress-user-note-single">%s <span class="bbpress-user-note-meta">%s</span></div>',
+					wp_kses( $user_note->note, array( 'a' => array( 'href' => array() ) ) ),
+					sprintf(
+					/* translators: 1: Users display name 2: Link to post 3: Time of creation */
+						__( 'by %1$s at <a href="%2$s">%3$s</a>', 'wporg-forums' ),
+						esc_html( $this->note_authors[ $user_note->author ]->display_name ),
+						esc_url( $user_note->post ),
+						date_i18n( "Y-m-d H:i:s", strtotime( $user_note->time ) )
+					)
+				);
+			}
+		}
+	}
+
+	/**
+	 * @param $user
+	 *
+	 * @return void
+	 */
+	function output_user_notes( $user ) {
+		if ( ! isset( $this->user_notes[ $user ] ) ) {
+			$this->set_user_note_fields( $user );
+		}
+
+		if ( ! empty( $this->user_notes[ $user ]['html'] ) ) {
+			echo implode( '', $this->user_notes[ $user ]['html'] );
+		} else {
+			esc_html_e(
+				'No notes have been added to this user.',
+				'wporg-forums'
+			);
+		}
+	}
+
+	/**
+	 * Output all existing users notes, and the form for adding new ones to a hidden area in the post content.
+	 *
+	 * @return void
+	 */
+	function user_note_fields() {
+		if ( ! current_user_can( 'moderate' ) ) {
+			return;
+		}
+
+		$lookup_user = get_the_author_meta( 'ID' );
+
+		$this->set_user_note_fields( $lookup_user );
+
+		printf(
+			'<div class="bbpress-user-notes" id="bbpress-user-notes-%d">',
+			esc_attr( get_the_ID() )
+		);
+
+		printf(
+			'<h2>%s</h2>',
+			esc_html__( 'User notes', 'wporg-forums' )
+		);
+
+		$this->output_user_notes( $lookup_user );
+
+		$this->add_note_form();
+
+		echo '</div>';
+	}
+
+	/**
+	 * Generate the form for adding new notes
+	 *
+	 * @return void
+	 */
+	function add_note_form() {
+		?>
+		<form action="<?php echo esc_url( sprintf( '%s#post-%d', bbp_get_topic_permalink(), get_the_ID() ) ); ?>" method="post" class="bbp-add-user-note">
+			<input type="hidden" name="bbp-user-note-user-id" value="<?php echo esc_attr( get_the_author_meta( 'ID' ) ); ?>">
+			<input type="hidden" name="action" value="bbpress-user-notes-add">
+			<input type="hidden" name="bbp-user-note-original-reply" value="<?php echo esc_attr( get_the_ID() ); ?>">
+
+			<?php wp_nonce_field( sprintf( 'bbp_user_note-add-%d', get_the_author_meta( 'ID' ) ), '_bbp_user_note_nonce' ); ?>
+
+			<label for="bbp-user-notes-new-note" class="screen-reader-text"><?php esc_html_e( 'New note:', 'wporg-forums' ); ?></label>
+			<textarea name="bbp-user-notes-new-note" id="bbp-user-notes-new-note"></textarea>
+
+			<button type="submit"><?php esc_html_e( 'Add your note', 'wporg-forums' ); ?></button>
+		</form>
+		<?php
+	}
+}
\ No newline at end of file
Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/js/user-notes.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/js/user-notes.js	(revision )
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/js/user-notes.js	(revision )
@@ -0,0 +1,6 @@
+jQuery(document).ready(function ($) {
+    $( ".bbp-reply-author" ).on( 'click', '.bbpress-user-notes-toggle', function (e) {
+        e.preventDefault();
+        $( $(this).data('bbp-user-note-toggle') ).slideToggle();
+    } );
+});
\ No newline at end of file
Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/support-forums.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/support-forums.php	(revision 4380)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/support-forums.php	(revision )
@@ -16,6 +16,7 @@
 // General includes.
 include( dirname( __FILE__ ) . '/inc/class-plugin.php' );
 include( dirname( __FILE__ ) . '/inc/class-users.php' );
+include( dirname( __FILE__ ) . '/inc/class-user-notes.php' );
 include( dirname( __FILE__ ) . '/inc/class-moderators.php' );
 include( dirname( __FILE__ ) . '/inc/class-hooks.php' );
 
Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/css/styles-moderators.css
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/css/styles-moderators.css	(revision 4380)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/css/styles-moderators.css	(revision )
@@ -5,3 +5,26 @@
 #bbpress-forums .status-archived.odd {
 	background-color: #fdd !important;
 }
+
+/** User notes **/
+.bbpress-user-notes-toggle {
+	cursor: pointer;
+}
+
+.bbpress-user-note-single {
+	display: inline-block;
+	width: 100%;
+	border-left: 2px solid #00a0d2;
+	padding: .5rem;
+	margin-bottom: 1rem;
+}
+.bbpress-user-note-meta {
+	font-style: italic;
+	display: inline-block;
+	width: 100%;
+	text-align: right;
+}
+
+.bbpress-user-notes {
+	display: none;
+}
\ No newline at end of file
