-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add Discussion Field with trackbacks and comment status aggregated on Post/Page Quick Edit #71949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Discussion Field with trackbacks and comment status aggregated on Post/Page Quick Edit #71949
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +325 B (+0.02%) Total Size: 1.95 MB
ℹ️ View Unchanged
|
| id: 'discussion', | ||
| label: __( 'Discussion' ), | ||
| children: [ 'comment_status', 'ping_status' ], | ||
| summary: 'discussion', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if "summary" should be needed here at all, since it can just use the "id". cc @oandregal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can have multiple summary fields, so being able to specify summary is nice, but yes maybe we can automatically use the field with id discussion as a summary in case it exists.
| const discussionField: Field< BasePost > = { | ||
| id: 'discussion', | ||
| label: __( 'Discussion' ), | ||
| type: 'text', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#72201 makes this field not filterable to prevent this from happening:
This PR adds a new "Discussion" field to the page quick edit interface that groups both comment status (already existing) and trackbacks/pingbacks settings (new field). The field provides a unified interface for managing discussion-related settings following the same UI we have on the post editor.
It takes advantage of the new combined fields summary functionality added in #71614.
Screenshot
This implementation adds:
Field Architecture
Key Components
New Fields:
discussionField- Composite field with custom render logicpingStatusField- Trackback/pingback field with checkbox interfaceEnhanced Components:
commentStatusFieldlabel from "Discussion" to "Comments"Registration Strategy
comment_status,ping_status) registered globally for table displayTesting
Manual Testing
Quick Edit Functionality:
add_post_type_support('page', 'trackbacks'); add_post_type_support('page', 'comments');Table Display:
Field States: