wp_get_current_commenter

過濾鉤子
apply_filters( 'wp_get_current_commenter', compact( 'comment_author', 'comment_author_email', 'comment_author_url' )
引數
  • (array) $comment_author_data { An array of current commenter variables. @type string $comment_author The name of the current commenter, or an empty string. @type string $comment_author_email The email address of the current commenter, or an empty string. @type string $comment_author_url The URL address of the current commenter, or an empty string. }
    Required:
定義位置
相關勾子
wp_count_commentsset_current_userget_commentwp_insert_commentrest_comment_query
相關方法
wp_get_current_commenterwp_get_current_user_wp_get_current_userwp_set_current_userwp_count_commentsget_current_screen
引入
3.1.0
棄用
-

wp_get_current_commenter:此函式用於檢索當前評論者的姓名、電子郵件和 URL。此資訊在預填寫評論表單時非常有用,因為它可以通過記住他們之前評論中的資訊來節省使用者時間。

過濾當前評論者的姓名、電子郵件和網址。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'wp_get_current_commenter', compact( 'comment_author', 'comment_author_email', 'comment_author_url' ) );
return apply_filters( 'wp_get_current_commenter', compact( 'comment_author', 'comment_author_email', 'comment_author_url' ) );
return apply_filters( 'wp_get_current_commenter', compact( 'comment_author', 'comment_author_email', 'comment_author_url' ) );

常見問題

FAQs
檢視更多 >