public

Use AddQuicktag on Quickedit of comments

  • Download Gist
addquicktag_quickedit_comment.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<?php
/**
* Plugin Name: Use AddQuicktag on Quickedit of comments
* Plugin URI: http://bueltge.de/
* Description: Add the quicktags fomr AddQuicktag plugin to the editor of Quickedit on comments
* Author: Frank Bültge
* Version: 0.0.1
* Licence: GPLv3
* Author URI: http://bueltge.de
*/
 
// This file is not called from WordPress. We don't like that.
if ( ! function_exists( 'add_filter' ) ) {
echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
exit;
}
 
if ( ! function_exists( 'my_addquicktag_post_types' ) ) {
 
// add custom function to filter hook 'addquicktag_post_types'
add_filter( 'addquicktag_post_types', 'my_addquicktag_post_types' );
 
/**
* Return array $post_types with custom post types strings
*
* @param $post_type Array
* @return $post_type Array
*/
function my_addquicktag_post_types( $post_types ) {
 
$post_types[] = 'edit-comments';
 
return $post_types;
}
 
add_filter( 'addquicktag_pages', 'my_addquicktag_pages' );
/**
* Return array $page with custom page strings
*
* @param $page Array
* @return $page Array
*/
function my_addquicktag_pages( $page ) {
$page[] = 'edit-comments.php';
return $page;
}
 
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.