comment_flood_filter

過濾鉤子
apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment )
引數
  • (bool) $bool Whether a comment flood is occurring. Default false.
    Required:
  • (int) $time_lastcomment Timestamp of when the last comment was posted.
    Required:
  • (int) $time_newcomment Timestamp of when the new comment was posted.
    Required:
定義位置
相關勾子
comment_flood_triggercomment_form_aftercomment_flood_messagecomment_form_fieldscomment_form_logged_in_after
相關方法
comment_footer_diecomment_id_fieldscomment_formcomment_datecheck_comment_flood_dbcurrent_filter
引入
2.1.0
棄用
-

comment_flood_filter: 這是一個過濾鉤子,在進行評論氾濫檢查時被執行。該鉤子被傳遞一個布林值,表示評論氾濫檢查是否失敗,並且它被期望返回一個布林值。這個鉤子的目的是允許外掛或主題修改評論氾濫檢查的結果。

過濾評論的泛濫狀態。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );
$flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );
$flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );

常見問題

FAQs
檢視更多 >