Permalink from notification mail directly accesses comment
-
Hi,
first of all, the search in here doesn’t work atm and just says “Search
Loading”. If you want to make people search similar posts before submitting another ticket, make that thing work.Now, being a former blog.de member, I miss permalinks in comment notification mails that directly show the comment, not just the related article. This can be included in the dirtiest possible way by editing wp-includes/pluggable.php:
$notify_message .= get_permalink($comment->comment_post_ID) . “#comments\r\n\r\n”;
-> change to
$notify_message .= get_permalink($comment->comment_post_ID) . “?replytocom={$comment->comment_ID}#respond\r\n\r\n”;
and adding
<script>
document.addEventListener(“DOMContentLoaded”, function(event) {
<?php
if (isset($_GET[‘replytocom’])) {
$reply_id = $_GET[‘replytocom’];
if (is_numeric($reply_id)) {
echo “addComment.moveForm(‘comment-$reply_id’, ‘$reply_id’, ‘respond’, ”)”;
}
}to the header.php of the theme. I guess there are nicer ways to do that, but you guys are more familiar with the spaghetti codebase of WordPress. I don’t know if this can be added via plugins in a sensible way, but it looks like a basic yet valuable feature to me that could be added to WordPress itself.
- The topic ‘Permalink from notification mail directly accesses comment’ is closed to new replies.