从内部调用链接comment_form()
(/wp包括/comment-template.php第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>\',
和用途
wp_login_url()
(/wp包括/general-template.php第224行+,返回时使用过滤器:
return apply_filters(\'login_url\', $login_url, $redirect);
您可以向函数中添加筛选函数。php的主题,影响链接;示例:
add_filter( \'link_url\', \'wpse_71100_linkchanger\');
function wpse_71100_linkchanger( $link ) {
/*whatever you need to do with the link*/
return $link;
}