get_page_of_comment

過濾鉤子
apply_filters( 'get_page_of_comment', (int)
引數
  • (int) $page Comment page.
    Required:
  • (array) $args { Arguments used to calculate pagination. These include arguments auto-detected by the function, based on query vars, system settings, etc. For pristine arguments passed to the function, see `$original_args`. @type string $type Type of comments to count. @type int $page Calculated current page. @type int $per_page Calculated number of comments per page. @type int $max_depth Maximum comment threading depth allowed. }
    Required:
  • (array) $original_args { Array of arguments passed to the function. Some or all of these may not be set. @type string $type Type of comments to count. @type int $page Current comment page. @type int $per_page Number of comments per page. @type int $max_depth Maximum comment threading depth allowed. }
    Required:
  • (int) $comment_ID ID of the comment.
    Required:
定義位置
相關勾子
get_page_of_comment_query_argsget_commentrest_pre_insert_commentrest_preprocess_commentedit_page_form
相關方法
get_page_of_commentget_commentget_commentsget_approved_commentsthe_commentget_date_from_gmt
引入
4.7.0
棄用
-

get_page_of_comment是一個WordPress的函式,用來確定一個評論出現在一個分頁的評論集中的哪一頁: 該函式接受一個評論ID作為引數,並返回評論出現的頁面編號。

過濾顯示註釋的計算頁面。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID );
return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID );
return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID );

常見問題

FAQs
檢視更多 >