You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes: Centralize internal comment types via gutenberg_get_internal_comment_types().
Mirrors the change being proposed for core in
WordPress/wordpress-develop#10930. Introduces a
single helper that returns the list of internal comment types ('note',
'reaction'), filterable so future additions only need to update one place.
Apply it across all the existing 'note'/'reaction' guards in the 7.1
compat layer:
* gutenberg_update_get_avatar_comment_type_7_1() — avatar-eligible types.
* gutenberg_exclude_block_comments_from_admin_7_1() — admin query exclude.
* gutenberg_filter_comment_count_query_exclude_block_comments_7_1() —
pending-count SQL guard.
* gutenberg_hide_note_from_comment_list_table_7_1() — list table args.
* gutenberg_exclude_notes_from_comment_count_7_1() — approved-count SQL.
* Gutenberg_REST_Comment_Controller_7_1::is_note_or_reaction() — REST
controller's per-request type check (used by permissions, prepare,
validation, and links).
Props westonruter for the suggestion to centralize this list.
0 commit comments