comments_per_page

過濾鉤子
apply_filters( 'comments_per_page', $comments_per_page, $comment_status )
引數
  • (int) $comments_per_page The number of comments to list per page.
    Required:
  • (string) $comment_status The comment status name. Default 'All'.
    Required:
定義位置
相關勾子
comments_templatecomments_opencomment_save_prepre_comment_user_agentedit_tags_per_page
相關方法
comments_templateadd_comments_pagecomments_opencomment_datecomments_rsscomment_footer_die
引入
2.6.0
棄用
-

comments_per_page: 這個函式返回在評論列表表中每頁顯示的評論數量。預設情況下,這個函式返回comments_per_page選項的值,但是你可以使用comments_per_page過濾器來修改顯示的評論數。

過濾評論列表表中每頁列出的評論數量。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );

常見問題

FAQs
檢視更多 >