WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #7423


Ignore:
Timestamp:
07/28/08 21:50:34 (7 years ago)
Author:
markjaquith
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7423

    • Property Summary changed from in WP_Query, sanitization breaks usage of multiple post_type or post_status values to in WP_Query, sanitization breaks usage of multiple post_status values
  • Ticket #7423 – Description

    initial v1  
    1 I was trying to get WP_Query to give me all draft OR future posts by other authors, but found that it would not accept comma-separated post_status values.  Turns out we're using {{{sanitize_user()}}} on the query values of post_type and post_status which breaks that functionality.  We need to allow commas so that WP_Query can process {{{post_status=draft,future}}} 
     1I was trying to get WP_Query to give me all draft OR future posts by other authors, but found that it would not accept comma-separated post_status values.  Turns out we're using {{{sanitize_user()}}} on the query values of post_status which breaks that functionality.  We need to allow commas so that WP_Query can process {{{post_status=draft,future}}} 
    22 
    33Switching that {{{sanitize_user()}}} line to a {{{[^a-z0-9,_-] preg_replace()}}} sanitization line allowed my WP_Query call to work as intended. 
     4 
     5We're also doing that sanitization on post_type, but it doesn't look like the functionality to accept multiple post_type values is there (and it's certainly less useful than accepting multiple post_statuses).