函数原型:
get_next_comments_link( string $label = '', int $max_page ): string|void //$label,链接文本的标签。默认值:“”。 //$max_page,最大页面。
函数源码:
function get_next_comments_link( $label = '', $max_page = 0 ) { global $wp_query; if ( ! is_singular() ) { return; } $page = get_query_var( 'cpage' ); if ( ! $page ) { $page = 1; } $next_page = (int) $page + 1; if ( empty( $max_page ) ) { $max_page = $wp_query->max_num_comment_pages; } if ( empty( $max_page ) ) { $max_page = get_comment_pages_count(); } if ( $next_page > $max_page ) { return; } if ( empty( $label ) ) { $label = __( 'Newer Comments »' ); } $attr = apply_filters( 'next_comments_link_attributes', '' ); return sprintf( '<a href="%1$s" %2$s>%3$s</a>', esc_url( get_comments_pagenum_link( $next_page, $max_page ) ), $attr, preg_replace( '/&([^#])(?![a-z]{1,8};)/i', '&$1', $label ) ); }
上面是“wordpress如何获取下个评论的链接”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_4850.html
workflows工作流
一位美丽的女士在座机上讲话ComfyUI工作流
一位身穿金色铠甲的美丽女子守卫在寺庙外
一盒用五颜六色的食材烹制的热气腾腾的寿司
一只开屏的白色孔雀ComfyUI工作流
树枝上一只色彩斑斓的小鸟
一个破旧的工厂,一个骷髅雕像
一张皮卡丘向观众眨眼的逼真照片ComfyUI工作流
一棵树从鸟笼里长出来的梦幻般场景
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!