admin管理员组文章数量:1313283
Right now there is a link and I am using a plugin for a modal box and I would like to change the link in the code.
Where is the html and php file with the code located?
I have looked in my theme files, but comments.php do not contain the code I need to change.
Can I hack it via functions.php hook?
Right now there is a link and I am using a plugin for a modal box and I would like to change the link in the code.
Where is the html and php file with the code located?
I have looked in my theme files, but comments.php do not contain the code I need to change.
Can I hack it via functions.php hook?
Share Improve this question asked Oct 31, 2012 at 17:49 DerfderDerfder 2,08212 gold badges34 silver badges57 bronze badges1 Answer
Reset to default 3the link is called from within comment_form()
(/wp-includes/comment-template.php line 1539) :
'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
and uses wp_login_url()
(/wp-includes/general-template.php lines 224+) which uses a filter on its return:
return apply_filters('login_url', $login_url, $redirect);
you might be able to add a filter function to functions.php of your theme, to influence the link; example:
add_filter( 'link_url', 'wpse_71100_linkchanger');
function wpse_71100_linkchanger( $link ) {
/*whatever you need to do with the link*/
return $link;
}
本文标签: How can I change the link in comment form quotLog in to post a commentquot
版权声明:本文标题:How can I change the link in comment form "Log in to post a comment"? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741943141a2406259.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论