Support » Plugins » Hacks » Wrap cancel-comment-reply-link in div

  • I am using the simplified comment code for WP 3 for a theme I’m building, but I would like to wrap the cancel-comment-reply-link in a div so I can change it’s appearance further. Is there anyway to do this?

    Here is the code from my comments.php

    [code moderated – please use the pastebin – the forum limit for direct posting of code is ten lines]

Viewing 1 replies (of 1 total)
  • You don’t have to turn it into a div, you can just change the link to a block level element. Or if you want FULL control, just apply a filter to the comment link.

    From wp-includes/comment-template.php

    function get_cancel_comment_reply_link($text = '') {
          if ( empty($text) )
              $text = __('Click here to cancel reply.');
          $style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
          $link = esc_html( remove_query_arg('replytocom') ) . '#respond';
          return apply_filters('cancel_comment_reply_link', '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>', $link, $text);

Viewing 1 replies (of 1 total)
  • The topic ‘Wrap cancel-comment-reply-link in div’ is closed to new replies.