Quick Reply Templates Plugin and WordPress 2.8

Quick Reply Templates is a really useful WordPress plugin by Paul William that allows you to have a predefined comment reply template, such as <a href="#commend-id">@Name</a>, that will be filled out automatically when you reply to a comment within your WordPress Dashboard or Edit Comments page.

To make this plugin work also in WordPress 2.8 you have to replace:

add_action( "admin_footer", 'pw_quick_reply_template_comment_script', 100);

with this:

global $wp_version;
if (version_compare($wp_version, '2.7.1',  '>')) {
	add_action('admin_footer-index.php', 'pw_quick_reply_template_comment_script');
	add_action('admin_footer-edit-comments.php', 'pw_quick_reply_template_comment_script');
} else {
	add_action('admin_footer', 'pw_quick_reply_template_comment_script', 100);

because the admin_footer action has been moved above the new admin_print_footer_scripts call in /wp-admin/admin-footer.php in WordPress 2.8. However, the Javascript magic of this plugin must be called after the built-in commentReply function has been defined.

Leave a Reply