Additional info by the OP
It seems that the OP “forgot” to tell, that he uses the following plugin:
<?php
/*
Plugin Name: Remove Links in Comments
Plugin URI: http://www.stefannilsson.com/remove-links-in-comments/
Description: Deactivate hyperlinks in comments.
*/
function remove_links($string = '') {
$link_pattern = "/<a[^>]*>(.*)<\/a>/iU";
$string = preg_replace($link_pattern, "$1", $string);
return $string;
}
add_filter('comment_text', 'remove_links');
The modified plugin
To make this work, we have to modify it slightly:
<?php
! defined( 'ABSPATH' ) AND exit;
/* Plugin Name: (#66166) »kaiser« Extend allowed HTML Tags for Admin <strong>only</strong> */
function wpse66166_extend_allowed_tags( $post_id )
{
global $allowed_tags;
// For Admin users only
if (
! current_user_can( 'manage_options' )
OR is_admin()
)
return add_filter( 'comment_text', 'wpse66166_remove_links' );
if ( ! is_array( $allowed_tags ) )
return;
return $GLOBALS['allowed_tags'] = array_merge(
$allowed_tags
,array( 'a' => array( 'href' => 'title' ) )
);
}
add_action( 'comment_form', 'wpse66166_extend_allowed_tags' );
function wpse66166_remove_links( $comment )
{
return preg_replace(
"/<a[^>]*>(.*)<\/a>/iU"
"$1"
,$comment
);
}