[wp-trac] [WordPress Trac] #35601: WP_Query: comment_status and ping_status
WordPress Trac
noreply at wordpress.org
Mon Jan 25 21:47:49 UTC 2016
#35601: WP_Query: comment_status and ping_status
-------------------------------------------------+-------------------------
Reporter: birgire | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future
Component: Query | Release
Severity: normal | Version: 4.4
Keywords: needs-patch needs-unit-tests good- | Resolution:
first-bug | Focuses:
-------------------------------------------------+-------------------------
Comment (by birgire):
In the wp-admin we can e.g. modify the comment/ping status for each post,
through the following checkboxes:
[x] Allow comments.
[x] Allow trackbacks and pingbacks on this page.
These values are saved as {{{'open'}}} or {{{'closed'}}} into the
{{{comment_status}}}, {{{ping_status}}} table fields.
I attached the 35601.diff patch as a starting point.
It's assumes there are only {{{'open'}}} and {{{'closed'}}} values for
{{{comment_status}}} and {{{ping_status}}}.
So the next question that comes to mind, is what would we want to allow as
possible parameter values:
- only allow these two values {{{'open'}}} and {{{'closed'}}} ?
- or allow custom values?
- force lowercase?
- force a #char limit? The fields are both {{{varchar(20)}}} so for
custom values, there would be no point in searching for strings longer
than that.
- what kind of sanitazion would we want: {{{sanitize_key()}}},
{{{sanitize_title_for_query()}}}, ... ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35601#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list