Ticket #692: 692.diff
File 692.diff, 1.9 KB (added by , 10 years ago) |
---|
-
comments.php
58 58 <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note to contribute?', 'wporg' ); ?></a></p> 59 59 60 60 <?php comment_form( array( 61 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Add Note', 'noun', 'wporg' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',61 'comment_field' => DevHub_User_Submitted_Content::wp_editor_comments(), 62 62 'comment_notes_after' => '<p>' . 63 63 __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' ) . 64 64 '</p><p>' . -
inc/user-content.php
108 108 return str_replace( 'Wordpress', 'Wordpress', $code ); 109 109 } 110 110 111 /** 112 * Capture an {@see wp_editor()} instance as the 'User Contributed Notes' comment form. 113 * 114 * Uses output buffering to capture the editor instance for use with the {@see comments_form()}. 115 * 116 * @return string HTML output for the wp_editor-ized comment form. 117 */ 118 public static function wp_editor_comments() { 119 ob_start(); 120 echo '<p class="comment-form-comment"><label for="comment">' . _x( 'Add Note', 'noun', 'wporg' ) . '</label>'; 121 wp_editor( '', 'comment', array( 122 'media_buttons' => false, 123 'textarea_name' => 'comment', 124 'textarea_rows' => 8, 125 'quicktags' => array( 126 'buttons' => 'strong,em,link,ul,ol,li,code' 127 ), 128 'teeny' => true, 129 'tinymce' => false, 130 ) ); 131 echo '</p>'; 132 return ob_get_clean(); 133 } 134 111 135 } // DevHub_User_Submitted_Content 112 136 113 137 DevHub_User_Submitted_Content::init();