get_default_comment_status

過濾鉤子
apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type )
引數
  • (string) $status Default status for the given post type, either 'open' or 'closed'.
    Required:
  • (string) $post_type Post type. Default is `post`.
    Required:
  • (string) $comment_type Type of comment. Default is `comment`.
    Required:
定義位置
相關勾子
wp_set_comment_statustransition_comment_statuspost_date_column_statusget_avatar_comment_typesget_comment_text
相關方法
get_default_comment_statusget_comment_statuseswp_set_comment_statuswp_get_comment_statusget_default_block_editor_settingsget_comment_text
引入
4.3.0
棄用
-

get_default_comment_status 函式返回一個文章型別的預設評論狀態。它接收一個文章型別作為引數,並返回該文章型別的預設評論狀態,可以是”開放”或”關閉”。

過濾給定文章型別的預設評論狀態。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type );
return apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type );
return apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type );

常見問題

FAQs
檢視更多 >