函数原型:
复制代码get_next_comments_link( string $label = '', int $max_page ): string|void //$label,链接文本的标签。默认值:“”。 //$max_page,最大页面。
- 1
- 2
- 3
- 4
函数源码:
复制代码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 )
);
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
标签: get_next_comments_link, wordpress评论
上面是“wordpress如何获取下个评论的链接”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_4850.html
workflows工作流
一架受损严重的宇宙飞船内有一只猫
一位宇航员做在一只乌龟上在星空中游走
池塘边的大熊猫ComfyUI工作流
一只漂亮的孔雀的尾巴完全由披萨制成ComfyUI工作流
一只可爱的飞鸟ComfyUI工作流
一张皮卡丘向观众眨眼的逼真照片ComfyUI工作流
一张由表情符号组成的照片ComfyUI工作流
一幅3D农场游戏画面ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!