Opened 2 years ago
Last modified 2 months ago
#55922 new enhancement
Update wp_list_comments type parameter to allow array or string
Reported by: | dshanske | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Comments | Keywords: | has-patch |
Focuses: | Cc: |
Description
Right now, the options here are all, or a specific comment type. This should allow for multiple comment types as allowed in WP_Comment_Query
Change History (1)
This ticket was mentioned in PR #7054 on WordPress/wordpress-develop by @debarghyabanerjee.
2 months ago
#1
- Keywords has-patch added; needs-patch removed
Note: See
TracTickets for help on using
tickets.
Trac Ticket: Core-55922
## Problem
## Solution
## Changes Made
Code Enhancement
: Updated the wp_list_comments function to accept both arrays and strings for the type parameter.Backend Implementation
: Enhanced comment query handling to accommodate arrays and strings passed to the type parameter.## Impact
Enhanced Flexibility
: Developers can now specify comment types using either an array of types or a single type string in the wp_list_comments function.Improved Query Capabilities
: Facilitates querying multiple comment types simultaneously, leveraging the capabilities of WP_Comment_Query.Expanded Usage Scenarios
: Supports a wider range of use cases where querying comments from multiple types is required within a single function call.Backward Compatibility
: Ensures compatibility with existing usage of the wp_list_comments function by retaining support for single type string parameter.