Changeset 988 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php
- Timestamp:
- 11/17/2014 11:23:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php
r868 r988 67 67 wp_enqueue_style( 'syntaxhighlighter-theme-default' ); 68 68 69 wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( ), '20140912', true );69 wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( 'quicktags' ), '20140912', true ); 70 70 if ( get_option( 'thread_comments' ) ) { 71 71 wp_enqueue_script( 'comment-reply' ); … … 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,ul,ol,li,wporg_php,js' 127 ), 128 'teeny' => true, 129 'tinymce' => false, 130 ) ); 131 echo '</p>'; 132 return ob_get_clean(); 133 } 134 135 public static function mce_buttons( $buttons ) { 136 $buttons = array_merge( $buttons, array( 'wporg_php' ) ); 137 return $buttons; 138 } 139 140 public static function mce_plugins( $plugins ) { 141 $plugins['wporg_php'] = get_stylesheet_directory_uri() . '/js/user-notes.js'; 142 return $plugins; 143 } 111 144 } // DevHub_User_Submitted_Content 112 145
Note: See TracChangeset
for help on using the changeset viewer.