<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[6910] sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer: developer.wordpress.org: Add support for user feedback on submitted user notes.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/6910">6910</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/6910","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>coffee2code</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-03-23 21:59:23 +0000 (Fri, 23 Mar 2018)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>developer.wordpress.org: Add support for user feedback on submitted user notes.
Props keesiemeijer.
See <a href="http://meta.trac.wordpress.org/ticket/1504">#1504</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdevelopercommentsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperinctemplatetagsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperincusercontentphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperjsusernotesjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperscssmainscss">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperstylesheetsmaincss">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperjsusernotesfeedbackjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes-feedback.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdevelopercommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php 2018-03-22 04:05:08 UTC (rev 6909)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,19 +32,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; // check for comment navigation ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <ol class="comment-list">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php
- /* Loop through and list the comments. Tell wp_list_comments()
- * to use wporg_developer_comment() to format the comments.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+ $feedback_editor = false;
+
+ /* Loop through and list the comments. Use wporg_developer_list_notes() to format the comments.
</ins><span class="cx" style="display: block; padding: 0 10px"> * If you want to override this in a child theme, then you can
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * define wporg_developer_comment() and that will be used instead.
- * See wporg_developer_comment() in inc/template-tags.php for more.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * define wporg_developer_list_notes() and that will be used instead.
+ * See wporg_developer_list_notes() in inc/template-tags.php for more.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_singular( 'post' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_list_comments();
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $ordered_comments = wporg_developer_get_ordered_notes();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $ordered_comments ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_list_comments( array( 'callback' => 'wporg_developer_user_note' ), $ordered_comments );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $feedback_editor = array_filter( wp_list_pluck( $ordered_comments, 'show_editor') );
+ wporg_developer_list_notes( $ordered_comments, array( 'avatar_size' => 32 ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,11 +64,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( \DevHub\is_parsed_post_type() && DevHub\can_user_post_note( true, get_the_ID() ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note or feedback to contribute?', 'wporg' ); ?></a></p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php $add_note_style = empty( $feedback_editor ) ? 'display:none;' : ''; ?>
+ <p id="add-user-note" style="<?php echo $add_note_style; ?>"><a href="<?php echo user_trailingslashit( get_permalink() ) . '#respond'; ?>"><?php _e( 'Have a note or feedback to contribute?', 'wporg' ); ?></a></p>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php comment_form( array(
- 'class_form' => 'comment-form tab-container',
- 'comment_field' => DevHub_User_Submitted_Content::wp_editor_comments(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+ $args = array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'logged_in_as' => '<p class="logged-in-as">'
</span><span class="cx" style="display: block; padding: 0 10px"> . sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: user profile link, 2: accessibility text, 3: user name, 4: logout URL */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,9 +92,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '<span class="text-button">' . __( 'inline code', 'wporg' ) . '</span>'
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> . '</li></ul></p>',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'comment_notes_after' => DevHub_Note_Preview::comment_preview()
- . '<p>'
- . __( 'Submission Notes:', 'wporg' )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'comment_notes_after' => '<p>'
+ . __( 'Submission Notes:', 'wporg' )
</ins><span class="cx" style="display: block; padding: 0 10px"> . '<ul><li>'
</span><span class="cx" style="display: block; padding: 0 10px"> . __( 'This form is not for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' )
</span><span class="cx" style="display: block; padding: 0 10px"> . '</li><li>'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,13 +106,29 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> . '</li></ul></p>',
</span><span class="cx" style="display: block; padding: 0 10px"> 'label_submit' => __( 'Add Note or Feedback', 'wporg' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'cancel_reply_link' => '',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'must_log_in' => '<p>' . sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> __( 'You must <a href="%s">log in</a> before being able to contribute a note or feedback.', 'wporg' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'https://wordpress.org/support/bb-login.php?redirect_to=' . urlencode( get_comments_link() )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'https://login.wordpress.org/?redirect_to=' . urlencode( get_comments_link() )
</ins><span class="cx" style="display: block; padding: 0 10px"> ) . '</p>',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'title_reply' => '', //'Add Example'
- ) ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'title_reply' => '', //'Add Example'
+ 'title_reply_to' => '',
+ );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( class_exists( 'DevHub_Note_Preview' ) ) {
+ $args['comment_notes_after'] = DevHub_Note_Preview::comment_preview() . $args['comment_notes_after'];
+ $args['class_form'] = 'comment-form tab-container';
+ }
+
+ if ( class_exists( 'DevHub_User_Submitted_Content' ) ) {
+ $args['comment_field'] = DevHub_User_Submitted_Content::wp_editor_comments();
+ }
+
+ // Insert comment form if feedback form is not already used.
+ if ( empty( $feedback_editor ) ) {
+ comment_form( $args );
+ }
+ ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( ! \DevHub\is_parsed_post_type() && comments_open() ) : ?>
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperinctemplatetagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php 2018-03-22 04:05:08 UTC (rev 6909)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,9 +76,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Get contibuted notes ordered by vote
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * By default only top level comments are returned.
- * If child notes are included use wp_list_comments() or a custom walker for display.
- * unapproved notes for the current user are included.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Only the parent notes are ordered by vote count.
+ * Child notes are added to to the parent note 'child_notes' property.
+ * Unapproved notes for the current user are included.
+ * Use `wporg_developer_list_notes()` to display the notes.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param integer $post_id Optional. Post id to get comments for
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args Arguments used for get_comments().
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,31 +93,62 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = get_the_ID();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $order = array();
</del><span class="cx" style="display: block; padding: 0 10px"> $defaults = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post__in' => array( $post_id ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'comment',
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'approve',
</span><span class="cx" style="display: block; padding: 0 10px"> 'include_unapproved' => array_filter( array( get_current_user_id() ) ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'parent' => false,
</del><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_super_admin() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $defaults['status'] = 'all';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $args = wp_parse_args( $args, $defaults );
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $args = wp_parse_args( $args, $defaults );
</ins><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments( $args );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $comments ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Check if the current page is a reply to a note.
+ $reply_id = 0;
+ if ( isset( $_GET['replytocom'] ) && $_GET['replytocom'] ) {
+ $reply_id = absint( $_GET['replytocom'] );
+ }
+
+ $order = $children = array();
+ $voting = class_exists( 'DevHub_User_Contributed_Notes_Voting' );
+
+ // Remove child notes and add the vote count order for parent notes.
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comments as $key => $comment ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $order[ $key ] = (int) DevHub_User_Contributed_Notes_Voting::count_votes( $comment->comment_ID, 'difference' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 0 === (int) $comment->comment_parent ) {
+ $vote_count = $voting ? (int) DevHub_User_Contributed_Notes_Voting::count_votes( $comment->comment_ID, 'difference' ) : 0;
+ $order[ $key ] = $vote_count;
+ } else {
+ unset( $comments[ $key ] );
+ $children[ $comment->comment_parent ][] = $comment;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $show_editor = false;
+
+ // Add children notes to their parents.
+ foreach ( $comments as $key => $comment ) {
+ $comments[ $key ]->child_notes = array();
+ $comments[ $key ]->show_editor = false;
+
+ if ( array_key_exists( $comment->comment_ID, $children ) ) {
+ $comments[ $key ]->child_notes = array_reverse( $children[ $comment->comment_ID ] );
+ }
+
+ if ( ! $show_editor && ( $reply_id && ( $reply_id === (int) $comment->comment_ID ) ) ) {
+ // Show the editor when replying to this parent comment
+ $comments[ $key ]->show_editor = true;
+ $show_editor = true;
+ }
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // sort the posts by votes
</span><span class="cx" style="display: block; padding: 0 10px"> array_multisort( $order, SORT_DESC, $comments );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,98 +156,198 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! function_exists( 'wporg_developer_list_notes' ) ) :
+ /**
+ * List user contributed notes.
+ *
+ * @param array $comments Array with comment objects.
+ * @param array $args Comment display arguments.
+ */
+ function wporg_developer_list_notes( $comments, $args ) {
+ $is_user_logged_in = is_user_logged_in();
+ $can_user_post_note = DevHub\can_user_post_note( true, get_the_ID() );
+ $user_content = class_exists( 'DevHub_User_Submitted_Content' );
+ $display_editor = $is_user_logged_in && $can_user_post_note && $user_content;
+
+ foreach ( $comments as $comment ) {
+
+ $comment_id = $comment->comment_ID;
+
+ // Display parent comment.
+ wporg_developer_user_note( $comment, $args, 1 );
+
+ // Show or hide feedback notes.
+ $class = $comment->show_editor ? '' : ' hide-if-js';
+ echo "<section id='feedback-{$comment_id}' class='feedback{$class}'>\n";
+
+ // Display child comments.
+ if ( ! empty( $comment->child_notes ) ) {
+
+ echo "<h4 class='feedback-title'>Feedback</h4>\n";
+ echo "<ul class='children'>\n";
+ foreach ( $comment->child_notes as $child_note ) {
+ wporg_developer_user_note( $child_note, $args, 2, $comment->show_editor );
+ }
+ echo "</ul>\n";
+ }
+
+ // Add a feedback form for logged in users.
+ if ( $display_editor ) {
+ // Show or hide the editor depending if we're replying to a note.
+ $display = $comment->show_editor ? 'show' : 'hide';
+ echo DevHub_User_Submitted_Content::wp_editor_feedback( $comment, $display );
+ }
+ echo "</section><!-- .feedback -->\n";
+
+ // Feedback links to log in, add feedback or show feedback.
+ echo "<footer class='feedback-links' >\n";
+ if ( $can_user_post_note ) {
+ echo "EEE";
+ $feedback_link = trailingslashit( get_permalink() ) . "?replytocom={$comment_id}#feedback-editor-{$comment_id}";
+ $display = '';
+ $aria = '';
+ if ( ! $is_user_logged_in ) {
+ $class = 'login';
+ $feedback_text = __( 'Log in to add feedback', 'wporg' );
+ $feedback_link = 'https://login.wordpress.org/?redirect_to=' . urlencode( $feedback_link );
+ } else {
+ $class ='add';
+ $feedback_text = __( 'Add feedback to this note', 'wporg' );
+ $aria = '';//" aria-expanded='false' aria_controls='feedback-editor-{$comment_id}' aria-label='" . esc_attr( $feedback_text ) . "'";
+
+ // Hide 'add feedback' link if editor is displayed.
+ $display = $display_editor && $comment->show_editor ? ' style="display:none"' : '';
+ }
+ echo '<a class="feedback-' . $class . '" href="' . esc_url( $feedback_link ) . '"' . $display . $aria .' rel="nofollow">' . $feedback_text . '</a>';
+ }
+
+ // close parent list item
+ echo "</footer>\n</article><!-- .comment-body -->\n</li>\n";
+ }
+ }
+ endif;
+
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'wporg_developer_user_note' ) ) :
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Template for user contributed notes.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @param object $comment Comment object.
+ * @param array $args Arguments.
+ * @param int $depth Nested comment depth.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wporg_developer_user_note( $comment, $args, $depth ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['comment'] = $comment;
- $count = (int) DevHub_User_Contributed_Notes_Voting::count_votes( $comment->comment_ID, 'difference' );
- $curr_user_note = DevHub_User_Contributed_Notes_Voting::is_current_user_note( $comment->comment_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $GLOBALS['comment'] = $comment;
+ $GLOBALS['comment_depth'] = $depth;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $approved = ( 0 < (int) $comment->comment_approved ) ? true : false;
+ $is_parent = ( 0 === (int) $comment->comment_parent ) ? true : false;
+ $is_voting = class_exists( 'DevHub_User_Contributed_Notes_Voting' );
+ $count = $is_voting ? (int) DevHub_User_Contributed_Notes_Voting::count_votes( $comment->comment_ID, 'difference' ) : 0;
+ $curr_user_note = $is_voting ? (bool) DevHub_User_Contributed_Notes_Voting::is_current_user_note( $comment->comment_ID ) : false;
+
+ // Classes
</ins><span class="cx" style="display: block; padding: 0 10px"> $comment_class = array();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( -1 > $count ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_class[] = 'bad-note';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $curr_user_note ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_class[] = 'user-submitted-note';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( ! $approved ) {
+ $comment_class[] = 'user-note-moderated';
+ }
+
+ // This would all be moot if core passed the $comment context for 'get_comment_author_link' filter.
+ if ( $comment->user_id ) {
+ $commenter = get_user_by( 'id', $comment->user_id );
+ $url = 'https://profiles.wordpress.org/' . sanitize_key( $commenter->user_nicename ) . '/';
+ $author = get_the_author_meta( 'display_name', $comment->user_id );
+ } else {
+ $url = $comment->comment_author_url;
+ $author = $comment->comment_author;
+ }
+
+ $comment_author_link = $author;
+ if ( $url ) {
+ $comment_author_link = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
+ }
+
+ $date = sprintf( _x( '%1$s ago', '%1$s = human-readable time difference', 'wporg' ),
+ human_time_diff( get_comment_time( 'U' ),
+ current_time( 'timestamp' ) )
+ );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <li id="comment-<?php comment_ID(); ?>" data-comment-id="<?php echo $comment->comment_ID; ?>" <?php comment_class( implode( ' ', $comment_class ) ); ?>>
+ <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <li id="comment-<?php comment_ID(); ?>" <?php comment_class( implode( ' ', $comment_class ) ); ?>>
- <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( $is_parent ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <a href="#comment-content-<?php echo $comment->comment_ID; ?>" class="screen-reader-text"><?php _e( 'Skip to note content', 'wporg' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px"> <header class="comment-meta">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php DevHub_User_Contributed_Notes_Voting::show_voting(); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ <?php
+ if ( $is_voting ) {
+ DevHub_User_Contributed_Notes_Voting::show_voting();
+ }
+ ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="comment-author vcard">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="comment-author-attribution">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( 0 != $args['avatar_size'] ) {
- echo get_avatar( $comment, $args['avatar_size'] );
- } ?>
-
</del><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // This would all be moot if core passed the $comment context for 'get_comment_author_link' filter
- if ( $comment->user_id ) {
- $commenter = get_user_by( 'id', $comment->user_id );
- $url = 'https://profiles.wordpress.org/' . esc_attr( $commenter->user_nicename ) . '/';
- $author = get_the_author_meta( 'display_name', $comment->user_id );
- } else {
- $url = $comment->comment_author_url;
- $author = $comment->comment_author;
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 0 != $args['avatar_size'] ) {
+ echo get_avatar( $comment, $args['avatar_size'] );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_author_link = '';
- if ( $url ) {
- $comment_author_link = "<a href='$url' rel='external nofollow' class='url'>";
- }
- $comment_author_link .= $author;
- if ( $url ) {
- $comment_author_link .= '</a>';
- }
-
- printf( __( 'Contributed by %s', 'wporg' ), sprintf( '<cite class="fn">%s</cite>', $comment_author_link ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'Contributed by %s', 'wporg' ), sprintf( '<cite class="fn">%s</cite>', $comment_author_link ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> —
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <time datetime="<?php comment_time( 'c' ); ?>">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php
- printf( _x( '%1$s ago', '%1$s = human-readable time difference', 'wporg' ),
- human_time_diff( get_comment_time( 'U' ),
- current_time( 'timestamp' ) )
- );
- ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php echo $date; ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </time>
</span><span class="cx" style="display: block; padding: 0 10px"> </a>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php edit_comment_link( __( 'Edit', 'wporg' ), '<span class="edit-link">— ', '</span>' ); ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( ! $approved ) : ?>
+ — <span class="comment-awaiting-moderation"><?php _e( 'awaiting moderation', 'wporg' ); ?></span>
+ <?php endif; ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </header>
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- .comment-metadata -->
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php endif; ?>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="comment-content" id="comment-content-<?php echo $comment->comment_ID; ?>">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php comment_text(); ?>
- </div>
- <!-- .comment-content -->
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+ if ( $is_parent ) {
+ comment_text();
+ } else {
+ $text = get_comment_text() . ' — ';
+ $text .= sprintf( __( 'By %s', 'wporg' ), sprintf( '<cite class="fn">%s</cite>', $comment_author_link ) ) . ' — ';
+ $text .= ' <a href="'. esc_url( get_comment_link( $comment->comment_ID ) ) . '">';
+ $text .= '<time datetime="' . get_comment_time( 'c' ) . '">' . $date . '</time></a>';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( '0' == $comment->comment_approved ) : ?>
- <footer class="comment-footer">
- <p class="comment-awaiting-moderation"><?php _e( 'Your note is awaiting moderation.', 'wporg' ); ?></p>
- </footer>
- <!-- .comment-footer -->
- <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) {
+ $text .= ' — <a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) .'">';
+ $text .= __( 'Edit', 'wporg' ) . '</a>';
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php
- comment_reply_link( array_merge( $args, array(
- 'add_below' => 'div-comment',
- 'depth' => $depth,
- 'max_depth' => $args['max_depth'],
- 'before' => '<div class="reply">',
- 'after' => '</div>',
- ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $approved ) {
+ $text .= ' — <span class="comment-awaiting-moderation">' . __( 'awaiting moderation', 'wporg' ) . '</span>';
+ }
+
+ echo apply_filters( 'comment_text', $text );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </article><!-- .comment-body -->
- <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ </div><!-- .comment-content -->
+
+ <?php if ( ! $is_parent ) : ?>
+ </article>
+ </li>
+ <?php endif; ?>
+ <?php
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> endif; // ends check for wporg_developer_user_note()
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperincusercontentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php 2018-03-22 04:05:08 UTC (rev 6909)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,6 +40,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Remove reply to link
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'comment_reply_link', '__return_empty_string' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Remove cancel reply link
+ add_filter( 'cancel_comment_reply_link', '__return_empty_string' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Disable smilie conversion
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'comment_text', 'convert_smilies', 20 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -58,6 +61,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Tweak code contained in shortcode
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'syntaxhighlighter_precode', array( __CLASS__, 'syntaxhighlighter_precode' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Allowed HTML for a new child comment
+ add_filter( 'preprocess_comment', array( __CLASS__, 'comment_new_allowed_html' ) );
+
+ // Allowed HTML for an edited child comment (There is no decent hook to filter child comments only)
+ add_action( 'edit_comment', array( __CLASS__, 'comment_edit_allowed_html' ) );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,6 +88,74 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Updates edited child comments with allowed HTML.
+ *
+ * Allowed html is <strong>, <em>, <code> and <a>.
+ *
+ * @param int $comment_ID Comment ID.
+ */
+ public static function comment_edit_allowed_html( $comment_ID ) {
+
+ // Get the edited comment.
+ $comment = get_comment( $comment_ID, ARRAY_A );
+ if ( ! $comment ) {
+ return;
+ }
+
+ if ( ( 0 === (int) $comment['comment_parent'] ) || empty( $comment['comment_content'] ) ) {
+ return;
+ }
+
+ $content = $comment['comment_content'];
+ $data = self::comment_new_allowed_html( $comment );
+
+ if ( $data['comment_content'] !== $content ) {
+ $commentarr = array(
+ 'comment_ID' => $data['comment_ID'],
+ 'comment_content' => $data['comment_content']
+ );
+
+ // Update comment content.
+ wp_update_comment( $commentarr );
+ }
+ }
+
+ /**
+ * Filter new child comments content with allowed HTML.
+ *
+ * Allowed html is <strong>, <em>, <code> and <a>.
+ *
+ * @param array $commentdata Array with comment data.
+ * @return array Array with filtered comment data.
+ */
+ public static function comment_new_allowed_html( $commentdata ) {
+ $comment_parent = isset( $commentdata['comment_parent'] ) ? absint( $commentdata['comment_parent'] ) : 0;
+ $comment_content = isset( $commentdata['comment_content'] ) ? trim( $commentdata['comment_content'] ) : '';
+
+ if ( ( $comment_parent === 0 ) || ! $comment_content ) {
+ return $commentdata;
+ }
+
+ $allowed_html = array(
+ 'a' => array(
+ 'href' => true,
+ 'rel' => true,
+ 'target' => true,
+ ),
+ 'em' => array(),
+ 'strong' => array(),
+ 'code' => array(),
+ );
+
+ $allowed_protocols = array( 'http', 'https' );
+
+ $comment_content = wp_kses( $comment_content, $allowed_html, $allowed_protocols );
+ $commentdata['comment_content'] = preg_replace( '/\r?\n|\r/', '', $comment_content );
+
+ return $commentdata;
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Enqueues scripts and styles.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function scripts_and_styles() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,10 +164,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_style( 'syntaxhighlighter-core' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_style( 'syntaxhighlighter-theme-default' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( 'quicktags' ), '20170404', true );
- if ( get_option( 'thread_comments' ) ) {
- wp_enqueue_script( 'comment-reply' );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( 'jquery', 'quicktags' ), '20170404', true );
+ wp_enqueue_script( 'wporg-developer-user-notes-feedback', get_template_directory_uri() . '/js/user-notes-feedback.js', array( 'jquery', 'quicktags' ), '20170404eee', true );
+ wp_localize_script( 'wporg-developer-user-notes-feedback', 'wporg_note_feedback', array(
+ 'show' => __( 'Show Feedback', 'wporg' ),
+ 'hide' => __( 'Hide Feedback', 'wporg' ),
+ ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,6 +233,65 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return ob_get_clean();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Capture an {@see wp_editor()} instance as the 'User Contributed Notes' feedback form.
+ *
+ * Uses output buffering to capture the editor instance.
+ *
+ * @return string HTML output for the wp_editor-ized feedback form.
+ */
+ public static function wp_editor_feedback( $comment, $display = 'show', $content = '' ) {
+
+ if ( ! ( isset( $comment->comment_ID ) && absint( $comment->comment_ID ) ) ) {
+ return '';
+ }
+
+ $comment_id = absint( $comment->comment_ID );
+
+ static $instance = 0;
+ $instance++;
+
+ $display = ( 'hide' === $display ) ? ' style="display: none;"' : '';
+ $title = __( 'Add feedback to this note', 'wporg' );
+ $form_type = '';
+ $button_text = __( 'Add Feedback', 'wporg' );
+
+ if ( $content ) {
+ $title = __( 'Edit feedback', 'wporg' );
+ $form_type = '-edit';
+ $button_text = __( 'Edit Feedback', 'wporg' );
+ }
+
+ $allowed_tags = '';
+ foreach ( array( '<strong>', '<em>', '<code>', '<a>' ) as $tag ) {
+ $allowed_tags .= '<code>' . htmlentities( $tag ) . '</code>, ';
+ }
+
+ ob_start();
+ echo "<div id='feedback-editor-{$comment_id}' class='feedback-editor'{$display}>\n";
+ echo "<p class='feedback-editor-title'>{$title}</p>\n";
+ echo '<form id="feedback-form-' . $instance . $form_type . '" class="feedback-form" method="post" action="' . site_url( '/wp-comments-post.php' ) . '" name="feedback-form-' . $instance ."\">\n";
+
+ wp_editor( '', 'feedback-' . $instance, array(
+ 'media_buttons' => false,
+ 'textarea_name' => 'comment',
+ 'textarea_rows' => 3,
+ 'quicktags' => array(
+ 'buttons' => 'strong,em'
+ ),
+ 'teeny' => true,
+ 'tinymce' => false,
+ ) );
+
+ echo '<p><strong>' . __( 'Note', 'wporg' ) . '</strong>: ' . __( 'No newlines allowed', 'wporg' ) . '. ';
+ printf( __( 'Allowed tags: %s', 'wporg' ), trim( $allowed_tags, ', ' ) ) . "</p>\n";
+ echo "<p><input id='submit-{$instance}' class='submit' type='submit' value='Add Feedback' name='submit-{$instance}'>\n";
+ echo "<input type='hidden' name='comment_post_ID' value='" . get_the_ID() . "' id='comment_post_ID-{$instance}' />\n";
+ echo "<input type='hidden' name='comment_parent' id='comment_parent-{$instance}' value='{$comment_id}' />\n";
+ echo "</p>\n</form>\n</div><!-- #feedback-editor-{$comment_id} -->\n";
+ return ob_get_clean();
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> } // DevHub_User_Submitted_Content
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> DevHub_User_Submitted_Content::init();
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperjsusernotesfeedbackjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes-feedback.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes-feedback.js (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes-feedback.js 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,204 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+( function( $ ) {
+
+ if ( undefined === wporg_note_feedback ) {
+ return;
+ }
+
+ var options = wporg_note_feedback;
+ var wpAdminBar = $('#page.admin-bar').length ? 32 : 0;
+ var feedbackToggle = $( '<a class="feedback-toggle" href="#">' + options.show + '</a>' );
+ var hash = window.location.hash;
+
+ // Check if the fragment identifier is a comment ID (e.g. #comment-63)
+ if ( !hash.match( /#comment\-[0-9]+$/ ) ) {
+ hash = '';
+ }
+
+ $( '.feedback-editor' ).each( function() {
+
+ // Hide hidden editor with 'hide-if-js' class.
+ if( 'none' === $(this).css('display') ) {
+ $( this ).show().addClass( 'hide-if-js' );
+ }
+
+ // Add quicktag 'inline code' button to editor.
+ var id = $( this ).find( 'textarea' ).attr( 'id' );
+ if ( id.length ) {
+ QTags.addButton( 'inline-code', 'inline code', '<code>', '</code>', '', '', '', id );
+ }
+ } );
+
+ // Loop through feedback notes
+ $( '.comment' ).each( function() {
+ var feedbackLinks = $( this ).find( '.feedback-links' );
+ var childComments = $( this ).find( 'ul.children' );
+
+ if ( childComments.length && feedbackLinks.length ) {
+ var feedback = $( this ).find( '.feedback' );
+ var toggle = feedbackToggle.clone();
+
+ toggle.attr( {
+ 'aria-expanded': 'false',
+ 'aria-controls': 'feedback-' + getCommentID( $(this) )
+ } );
+
+ // Set text to 'Hide Feedback' if feedback is displayed
+ if ( !feedback.hasClass( 'hide-if-js' ) ) {
+ toggle.text( options.hide );
+ }
+
+ feedbackLinks.find( '.feedback-add' ).show();
+ feedbackLinks.append( toggle );
+ }
+
+ if ( feedbackLinks.length ) {
+ // Move feedback links before feedback.
+ var clonedElements = feedbackLinks.clone().children();
+ var feedbackLinksTop = $( '<div class="feedback-links"></div>' ).append( clonedElements );
+ $( this ).find( '.feedback' ).first().before( feedbackLinksTop );
+ feedbackLinks.addClass( 'bottom hide-if-js' );
+ }
+ } );
+
+ // Returns comment ID from data attribute.
+ function getCommentID( el ) {
+ return $(el).is("[data-comment-id]") ? el.data( 'comment-id' ) : 0;
+ }
+
+ // Removes added elements
+ function resetComment( el ) {
+
+ var children = el.find( 'ul.children' );
+ if ( !children.length ) {
+ el.find( '.feedback-toggle' ).remove();
+ }
+
+ el.find( '.feedback-links.bottom' ).addClass( 'hide-if-js' );
+ }
+
+ // Show hidden child comments if the fragment identifier is a comment ID (e.g. #comment-63).
+ $( document ).ready( function() {
+
+ var childComments = $( '.comment' ).find( 'ul.children' );
+
+ if ( !( hash.length && childComments.length ) ) {
+ return;
+ }
+
+ var hashComment = childComments.find( hash ).first();
+ if ( hashComment.length ) {
+ // Child comment exists.
+
+ var parent = hashComment.closest( '.comment.depth-1' );
+ if ( parent.find( '.feedback' ).hasClass( 'hide-if-js' ) ) {
+ // Show child comments.
+ parent.find( '.feedback-toggle' ).first().trigger( 'click' );
+ }
+
+ // Scroll to the child comment.
+ var pos = hashComment.offset();
+ $( 'html,body' ).animate( {
+ scrollTop: pos.top - wpAdminBar
+ }, 1 );
+ }
+ } );
+
+ // Show/Hide feedback toggle link.
+ $( document ).on( 'click', '.feedback-toggle', function( e ) {
+ e.preventDefault();
+
+ var parent = $( this ).closest( '.comment.depth-1' );
+ if ( !parent.length ) {
+ return;
+ }
+
+ resetComment( parent );
+ var feedback = parent.find( '.feedback' );
+ var toggleLinks = parent.find( '.feedback-toggle' );
+
+ if ( feedback.hasClass( 'hide-if-js' ) ) {
+ // Feedback is hidden.
+
+ // Show feedback.
+ toggleLinks.text( options.hide );
+ feedback.removeClass( 'hide-if-js' );
+ toggleLinks.attr( 'aria-expanded', 'true' );
+
+ // Go to the clicked feedback toggle link.
+ var pos = $( this ).offset();
+ $( 'html,body' ).animate( {
+ scrollTop: pos.top - wpAdminBar
+ }, 1000 );
+
+ // Add feedback links at the bottom if there are over 3 feedback notes.
+ var children = parent.find( 'ul.children > li' );
+ if ( 3 < children.length ) {
+ var feedbackLinks = parent.find( '.feedback-links.bottom' );
+ feedbackLinks.removeClass( 'hide-if-js' );
+ }
+
+ } else {
+ // Hide feedback.
+ toggleLinks.text( options.show );
+ feedback.addClass( 'hide-if-js' );
+ toggleLinks.attr( 'aria-expanded', 'false' );
+
+ // Hide editor.
+ var editor = feedback.find( '.feedback-editor' );
+ editor.addClass( 'hide-if-js' );
+
+ parent.find( '.feedback-add' ).attr( 'aria-expanded', 'false' );
+ }
+ } );
+
+ // Show editor when the add feedback link is clicked.
+ $( document ).on( 'click', '.feedback-add', function( e ) {
+ e.preventDefault();
+
+ var parent = $( this ).closest( '.comment.depth-1' );
+ if ( !parent.length ) {
+ return;
+ }
+
+ resetComment( parent );
+
+ var feedback = parent.find( '.feedback' );
+ var children = parent.find( 'ul.children' );
+ var feedbackLinks = parent.find( '.feedback-add' );
+
+ // Show feedback.
+ feedback.removeClass( 'hide-if-js' );
+ feedbackLinks.attr( 'aria-expanded', 'true' );
+
+ // Show the feedback editor.
+ var editor = feedback.find( '.feedback-editor' );
+ editor.removeClass( 'hide-if-js' );
+
+ // Change the toggle link text to 'Hide Feedback'.
+ var toggleLinks = parent.find( '.feedback-toggle' );
+ if ( toggleLinks.length ) {
+ toggleLinks.attr( 'aria-expanded', 'true' );
+ toggleLinks.text( options.hide );
+ }
+
+ // If there are no child comments add a 'Hide Feedback' link.
+ if ( !children.length ) {
+ var hide = feedbackToggle.clone();
+ hide.text( options.hide );
+ hide.attr( {
+ 'aria-expanded': 'true',
+ 'aria-controls': 'feedback-' + getCommentID( parent )
+ } );
+ parent.find( '.feedback-links' ).append( hide );
+ }
+
+ // Go to the feedback editor and give it focus.
+ var pos = editor.offset();
+ $( 'html,body' ).animate( {
+ scrollTop: pos.top - wpAdminBar
+ }, 1000, function() {
+ editor.find( 'textarea' ).focus();
+ } );
+ } );
+
+} )( jQuery );
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperjsusernotesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes.js 2018-03-22 04:05:08 UTC (rev 6909)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes.js 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,14 +13,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function showCommentForm() {
</span><span class="cx" style="display: block; padding: 0 10px"> $( '#respond' ).show();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '#add-user-note').hide();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '#add-user-note' ).hide();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var target = $( '#commentform' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var wpAdminBar = $( '#page.admin-bar' ).length ? 32 : 0;
+ var target = $( '#commentform #add-note-or-feedback' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( target.length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> var pos = target.offset();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $( 'html,body' ).animate( {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- scrollTop: pos.top
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ scrollTop: pos.top - wpAdminBar
</ins><span class="cx" style="display: block; padding: 0 10px"> }, 1000 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $('.wp-editor-area').focus();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,9 +40,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add php and js buttons to QuickTags.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- QTags.addButton( 'php', 'php', '[php]', '[/php]' );
- QTags.addButton( 'js', 'js', '[js]', '[/js]' );
- QTags.addButton( 'inline-code', 'inline code', '<code>', '</code>' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ QTags.addButton( 'php', 'php', '[php]', '[/php]', '', '', '', 'comment' );
+ QTags.addButton( 'js', 'js', '[js]', '[/js]', '', '', '', 'comment' );
+ QTags.addButton( 'inline-code', 'inline code', '<code>', '</code>', '', '', '', 'comment' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Override tab within user notes textarea to actually insert a tab character.
</span><span class="cx" style="display: block; padding: 0 10px"> // Copied from code within core's wp-admin/js/common.js.
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperscssmainscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss 2018-03-22 04:05:08 UTC (rev 6909)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1137,6 +1137,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> opacity: 1;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .comment-awaiting-moderation {
+ background-color: #fff8e5;
+ padding: .2em .5em;
+ border-radius: 3px;
+ border: 1px solid #ffb900;
+ }
+
+ .depth-2 .comment-awaiting-moderation {
+ display: inline-block;
+ margin: 2px 0;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .comment-list,
</span><span class="cx" style="display: block; padding: 0 10px"> .comment-list ol {
</span><span class="cx" style="display: block; padding: 0 10px"> list-style: none;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1146,23 +1158,76 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .comment-list li,
</span><span class="cx" style="display: block; padding: 0 10px"> #comment-preview {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- margin-top: 2.5rem;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ margin-top: 3rem;
</ins><span class="cx" style="display: block; padding: 0 10px"> background: #fff;
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: auto;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- border: 1px solid #dfdfdf;
- border-radius: 0 2px 2px 2px;
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> article {
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: auto;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .comment-list li.depth-1,
+ #comment-preview {
+ border: 1px solid #dfdfdf;
+ border-radius: 2px;
+ }
+
+ // Feedback
+ .comment-list li.depth-2 {
+ border-top: 1px solid #dfdfdf;
+ padding: 0;
+ margin: 0;
+
+ .comment-content {
+ padding: .9em 0;
+ }
+ .comment-content p {
+ margin-bottom: 0;
+ font-size: .9em;
+ }
+ }
+
+ .comment ul.children {
+ margin: 0 0 1.5em 0;
+ border-bottom: 1px solid #dfdfdf;
+ }
+
+ .feedback {
+ width: 90%;
+ float: right;
+ margin-right: 1.5rem;
+ }
+
+ .feedback-links {
+ margin: 0 1.5rem 1em 1.5rem;
+ font-size: 0.9em;
+ clear: both;
+ }
+
+ .feedback-editor-title,
+ .feedback-title {
+ font-size: 1.8rem;
+ font-weight: 300;
+ line-height: 2.2rem;
+ margin-bottom: 1em;
+ }
+
+ .feedback-toggle {
+ margin: 0 0 0 1.5rem;
+ display: inline-block;
+ }
+
+ #wp-feedback-wrap {
+ padding-bottom: 1em;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> #comment-preview,
</span><span class="cx" style="display: block; padding: 0 10px"> .js & .comment-form-comment {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-top: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> border: 1px solid #ccc;
</span><span class="cx" style="display: block; padding: 0 10px"> border-radius: 0 3px 3px 3px;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- clear:both;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ clear: both;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> #comment-preview.tab-section-selected {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1225,21 +1290,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 2rem 1.5rem .5rem;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- .comment-footer {
- margin: 0 1em;
- padding: 0 0 1em 0;
- position: relative;
- overflow: auto;
-
- a {
- float: right;
- }
-
- p {
- margin-bottom: 0;
- }
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> .comment-content ol {
</span><span class="cx" style="display: block; padding: 0 10px"> list-style: decimal inside;
</span><span class="cx" style="display: block; padding: 0 10px"> margin: 0 0 1.5em 0;
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperstylesheetsmaincss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css 2018-03-22 04:05:08 UTC (rev 6909)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css 2018-03-23 21:59:23 UTC (rev 6910)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1514,6 +1514,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> opacity: 1;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.devhub-wrap .single-wp-parser-function .comment-awaiting-moderation, .devhub-wrap .single-wp-parser-method .comment-awaiting-moderation, .devhub-wrap .single-wp-parser-hook .comment-awaiting-moderation, .devhub-wrap .single-wp-parser-class .comment-awaiting-moderation {
+ background-color: #fff8e5;
+ padding: .2em .5em;
+ border-radius: 3px;
+ border: 1px solid #ffb900;
+}
+
+.devhub-wrap .single-wp-parser-function .depth-2 .comment-awaiting-moderation, .devhub-wrap .single-wp-parser-method .depth-2 .comment-awaiting-moderation, .devhub-wrap .single-wp-parser-hook .depth-2 .comment-awaiting-moderation, .devhub-wrap .single-wp-parser-class .depth-2 .comment-awaiting-moderation {
+ display: inline-block;
+ margin: 2px 0;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-function .comment-list,
</span><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-function .comment-list ol, .devhub-wrap .single-wp-parser-method .comment-list,
</span><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-method .comment-list ol, .devhub-wrap .single-wp-parser-hook .comment-list,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1529,11 +1541,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-method #comment-preview, .devhub-wrap .single-wp-parser-hook .comment-list li,
</span><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-hook #comment-preview, .devhub-wrap .single-wp-parser-class .comment-list li,
</span><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-class #comment-preview {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- margin-top: 2.5rem;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ margin-top: 3rem;
</ins><span class="cx" style="display: block; padding: 0 10px"> background: #fff;
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: auto;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- border: 1px solid #dfdfdf;
- border-radius: 0 2px 2px 2px;
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-function .comment-list li article,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1544,6 +1554,67 @@
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: auto;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.devhub-wrap .single-wp-parser-function .comment-list li.depth-1,
+.devhub-wrap .single-wp-parser-function #comment-preview, .devhub-wrap .single-wp-parser-method .comment-list li.depth-1,
+.devhub-wrap .single-wp-parser-method #comment-preview, .devhub-wrap .single-wp-parser-hook .comment-list li.depth-1,
+.devhub-wrap .single-wp-parser-hook #comment-preview, .devhub-wrap .single-wp-parser-class .comment-list li.depth-1,
+.devhub-wrap .single-wp-parser-class #comment-preview {
+ border: 1px solid #dfdfdf;
+ border-radius: 2px;
+}
+
+.devhub-wrap .single-wp-parser-function .comment-list li.depth-2, .devhub-wrap .single-wp-parser-method .comment-list li.depth-2, .devhub-wrap .single-wp-parser-hook .comment-list li.depth-2, .devhub-wrap .single-wp-parser-class .comment-list li.depth-2 {
+ border-top: 1px solid #dfdfdf;
+ padding: 0;
+ margin: 0;
+}
+
+.devhub-wrap .single-wp-parser-function .comment-list li.depth-2 .comment-content, .devhub-wrap .single-wp-parser-method .comment-list li.depth-2 .comment-content, .devhub-wrap .single-wp-parser-hook .comment-list li.depth-2 .comment-content, .devhub-wrap .single-wp-parser-class .comment-list li.depth-2 .comment-content {
+ padding: .9em 0;
+}
+
+.devhub-wrap .single-wp-parser-function .comment-list li.depth-2 .comment-content p, .devhub-wrap .single-wp-parser-method .comment-list li.depth-2 .comment-content p, .devhub-wrap .single-wp-parser-hook .comment-list li.depth-2 .comment-content p, .devhub-wrap .single-wp-parser-class .comment-list li.depth-2 .comment-content p {
+ margin-bottom: 0;
+ font-size: .9em;
+}
+
+.devhub-wrap .single-wp-parser-function .comment ul.children, .devhub-wrap .single-wp-parser-method .comment ul.children, .devhub-wrap .single-wp-parser-hook .comment ul.children, .devhub-wrap .single-wp-parser-class .comment ul.children {
+ margin: 0 0 1.5em 0;
+ border-bottom: 1px solid #dfdfdf;
+}
+
+.devhub-wrap .single-wp-parser-function .feedback, .devhub-wrap .single-wp-parser-method .feedback, .devhub-wrap .single-wp-parser-hook .feedback, .devhub-wrap .single-wp-parser-class .feedback {
+ width: 90%;
+ float: right;
+ margin-right: 1.5rem;
+}
+
+.devhub-wrap .single-wp-parser-function .feedback-links, .devhub-wrap .single-wp-parser-method .feedback-links, .devhub-wrap .single-wp-parser-hook .feedback-links, .devhub-wrap .single-wp-parser-class .feedback-links {
+ margin: 0 1.5rem 1em 1.5rem;
+ font-size: 0.9em;
+ clear: both;
+}
+
+.devhub-wrap .single-wp-parser-function .feedback-editor-title,
+.devhub-wrap .single-wp-parser-function .feedback-title, .devhub-wrap .single-wp-parser-method .feedback-editor-title,
+.devhub-wrap .single-wp-parser-method .feedback-title, .devhub-wrap .single-wp-parser-hook .feedback-editor-title,
+.devhub-wrap .single-wp-parser-hook .feedback-title, .devhub-wrap .single-wp-parser-class .feedback-editor-title,
+.devhub-wrap .single-wp-parser-class .feedback-title {
+ font-size: 1.8rem;
+ font-weight: 300;
+ line-height: 2.2rem;
+ margin-bottom: 1em;
+}
+
+.devhub-wrap .single-wp-parser-function .feedback-toggle, .devhub-wrap .single-wp-parser-method .feedback-toggle, .devhub-wrap .single-wp-parser-hook .feedback-toggle, .devhub-wrap .single-wp-parser-class .feedback-toggle {
+ margin: 0 0 0 1.5rem;
+ display: inline-block;
+}
+
+.devhub-wrap .single-wp-parser-function #wp-feedback-wrap, .devhub-wrap .single-wp-parser-method #wp-feedback-wrap, .devhub-wrap .single-wp-parser-hook #wp-feedback-wrap, .devhub-wrap .single-wp-parser-class #wp-feedback-wrap {
+ padding-bottom: 1em;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-function #comment-preview,
</span><span class="cx" style="display: block; padding: 0 10px"> .js .devhub-wrap .single-wp-parser-function .comment-form-comment, .devhub-wrap .single-wp-parser-method #comment-preview,
</span><span class="cx" style="display: block; padding: 0 10px"> .js .devhub-wrap .single-wp-parser-method .comment-form-comment, .devhub-wrap .single-wp-parser-hook #comment-preview,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1608,21 +1679,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 2rem 1.5rem .5rem;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.devhub-wrap .single-wp-parser-function .comment-footer, .devhub-wrap .single-wp-parser-method .comment-footer, .devhub-wrap .single-wp-parser-hook .comment-footer, .devhub-wrap .single-wp-parser-class .comment-footer {
- margin: 0 1em;
- padding: 0 0 1em 0;
- position: relative;
- overflow: auto;
-}
-
-.devhub-wrap .single-wp-parser-function .comment-footer a, .devhub-wrap .single-wp-parser-method .comment-footer a, .devhub-wrap .single-wp-parser-hook .comment-footer a, .devhub-wrap .single-wp-parser-class .comment-footer a {
- float: right;
-}
-
-.devhub-wrap .single-wp-parser-function .comment-footer p, .devhub-wrap .single-wp-parser-method .comment-footer p, .devhub-wrap .single-wp-parser-hook .comment-footer p, .devhub-wrap .single-wp-parser-class .comment-footer p {
- margin-bottom: 0;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> .devhub-wrap .single-wp-parser-function .comment-content ol, .devhub-wrap .single-wp-parser-method .comment-content ol, .devhub-wrap .single-wp-parser-hook .comment-content ol, .devhub-wrap .single-wp-parser-class .comment-content ol {
</span><span class="cx" style="display: block; padding: 0 10px"> list-style: decimal inside;
</span><span class="cx" style="display: block; padding: 0 10px"> margin: 0 0 1.5em 0;
</span></span></pre>
</div>
</div>
</body>
</html>