Use rich text editor in comments?

Solved it myself by loading tinymce in the header: wp_enqueue_script(‘tiny_mce’); This will include the TinyMCE javascript. Then simply use TinyMCE as you wish <script type=”text/javascript”> tinyMCE.init({ mode : “textareas”, theme : “advanced”, plugins : “autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template”, theme_advanced_buttons1 : “save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect”, theme_advanced_buttons2 : “cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor”, theme_advanced_buttons3 : “tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen”, theme_advanced_buttons4 : “insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage”, theme_advanced_toolbar_location : “top”, theme_advanced_toolbar_align : “left”, theme_advanced_statusbar_location : … Read more

Top Commenters: exclude admin

Extend the WHERE clause: WHERE comment_author_email != “” AND comment_author_email != “YOUR_MAIL_ADDRESS” AND comment_type = “” AND comment_approved = 1 ) If you want to exclude multiple email addresses, use the NOT IN operator and a comma separated list of strings: AND comment_author_email NOT IN ( “[email protected]”, “[email protected]” )

Disable Comments Feed

Something like this should work. function wpse45941_disable_feed( $comments ) { if( $comments ) { wp_die( ‘No feed available’ ); } } add_action(‘do_feed’, ‘wpse45941_disable_feed’,1 ); add_action(‘do_feed_rdf’, ‘wpse45941_disable_feed’,1 ); add_action(‘do_feed_rss’, ‘wpse45941_disable_feed’,1 ); add_action(‘do_feed_rss2’, ‘wpse45941_disable_feed’,1 ); add_action(‘do_feed_atom’, ‘wpse45941_disable_feed’,1 ); Note: I haven’t tested that at all, I just wrote it right into the answer box.

Change the HTML output of comments

Upon request, a bit more of inormation 🙂 The default html output of comment_form() is: <p class=”comment-form-author”><label for=”author”>Name</label> <span class=”required”>*</span><input id=”author” name=”author” type=”text” value=”” size=”30″ aria-required=’true’ /></p> <p class=”comment-form-email”><label for=”email”>Email</label> <span class=”required”>*</span><input id=”email” name=”email” type=”text” value=”” size=”30″ aria-required=’true’ /></p> <p class=”comment-form-url”><label for=”url”>Website</label><input id=”url” name=”url” type=”text” value=”” size=”30″ /></p> I would like to wrap all three … Read more

Comments number message in password protected post

The only hook to change that is gettext: add_action( ‘loop_start’, ‘wpse_77028_switch_filter’ ); add_action( ‘loop_end’, ‘wpse_77028_switch_filter’ ); /** * Turn comment text filter on or off depending on global $post object. * * @wp-hook loop_start * @wp-hook loop_end * @return void */ function wpse_77028_switch_filter() { $func=”loop_start” === current_filter() ? ‘add_filter’ : ‘remove_filter’; $func( ‘gettext’, ‘wpse_77028_comment_num_text’, 10, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)