Changeset 8877
- Timestamp:
- 09/12/2008 09:19:40 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r8876 r8877 868 868 } 869 869 870 function cancel_comment_reply_link($text = '', $respond_id = 'respond' ) {870 function cancel_comment_reply_link($text = '', $respond_id = 'respond', $respond_root = 'content') { 871 871 if ( empty($text) ) 872 872 $text = __('Click here to cancel reply.'); 873 echo '<a href="#" onclick="cancelCommentReply(\'' . $respond_id . '\' ); return false;">' . $text . '</a>';873 echo '<a href="#" onclick="cancelCommentReply(\'' . $respond_id . '\', \'' . $respond_root . '\'); return false;">' . $text . '</a>'; 874 874 } 875 875 -
trunk/wp-includes/js/comment-reply.js
r8869 r8877 20 20 } 21 21 22 function cancelCommentReply( ) {23 var addComment = document.getElementById( "respond");22 function cancelCommentReply(respondId, respondRoot) { 23 var addComment = document.getElementById(respondId); 24 24 var reRootElement = document.getElementById("cancel-comment-reply"); 25 25 reRootElement.style.display = "none"; 26 var content = document.getElementById("content-main"); 27 if( !content ) 28 content = document.getElementById("content"); 26 var content = document.getElementById(respondRoot); 29 27 if( content ) { 30 28 addComment.parentNode.removeChild(addComment);
Note: See TracChangeset
for help on using the changeset viewer.