#24826 closed enhancement (fixed)
Add __construct function to the "WP_Comment_Query" Class
Reported by: | ramiy | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Comments | Keywords: | has-patch commit 4.2-beta |
Focuses: | Cc: |
Description
Add PHP5 construct function to the comments query class, just like we have constructor functions on WP_Query and WP_User_Query classes.
Attachments (5)
Change History (24)
#2
@
11 years ago
- Cc weston@… added
- Keywords has-patch added; needs-patch removed
- Severity changed from major to normal
- Version changed from 3.1 to trunk
#4
@
10 years ago
- Keywords needs-refresh added; 2nd-opinion dev-feedback removed
- Milestone changed from Awaiting Review to Future Release
This does improve the class, but the patch currently explodes
#5
@
10 years ago
- Keywords needs-refresh removed
In 24826.diff merged core patch and unit test patch into one, and fixed conflicts.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#10
@
10 years ago
- Keywords commit added
- Owner set to boonebgorges
- Status changed from new to reviewing
@morganestes: Thanks for the refresh. We should probably update the @since
versions on WP_Comment_Query::get_comments()
and the new constructor to 4.2.0. Barring that, I think we can move this for commit consideration.
@boonebgorges: Any chance you could review this?
#11
@
10 years ago
Yes, I can review. I would only feel comfortable moving forward if I had some time to review the documentation and some backward compatibility issues. If this needs to be committed today to make 4.2.0, let's punt. If it can go in sometime in the next week, let's keep it in 4.2.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#13
@
10 years ago
- Keywords 4.2-beta added
- Owner changed from boonebgorges to DrewAPicture
- Status changed from reviewing to accepted
#14
@
10 years ago
- Owner changed from DrewAPicture to boonebgorges
- Status changed from accepted to assigned
Add
WP_Comment_Query::__construct()
for parity withWP_Query::__construct()
Also:
Add
WP_Comment_Query::get_comments()
for parity withWP_Query::get_posts()
Add
WP_Comment_Query::$comments
for parity withWP_Query::$posts
Declare
WP_Comment_Query::$query_vars
which was previously implicitAdd
parse_comment_query
action for parity withparse_query
in WP_Query.Relates to #15032
Patches are also on GitHub at:
https://github.com/x-team/WordPress/tree/24826
https://github.com/x-team/WordPress/commit/db6105cbaf60ca20501fafea29b0f8277ed03cd3
Passes unit tests for comment group; also added a new test for the changes to WP_Comment_Query (attached).