[wp-trac] [WordPress Trac] #42397: % symbol don't work anymore in args of wp_query
WordPress Trac
noreply at wordpress.org
Wed Nov 1 22:29:02 UTC 2017
#42397: % symbol don't work anymore in args of wp_query
--------------------------+-------------------------
Reporter: pactivis132 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version: 4.8.3
Severity: normal | Resolution: worksforme
Keywords: | Focuses:
--------------------------+-------------------------
Changes (by Otto42):
* status: new => closed
* resolution: => worksforme
* milestone: Awaiting Review =>
Comment:
WordPress core does not support, and has never supported, meta_key's that
contain wildcards because WordPress always uses an = comparison for the
meta_key, never a LIKE comparison.
It is true that some users use plugins or other custom code to convert
that = into a LIKE for those % cases. The change to the way queries work
in 4.8.3 will probably break that existing code. This cannot be avoided.
The plugin or custom code will need to be changed to accommodate this.
Note that plugins or custom code that uses the "query" filter can see the
full SQL string, as it will run, without the new changes in 4.8.3. This
will include the percent signs as previously. Code that uses this filter
will be unaffected and continue to work correctly. Code that used other
filters will not see % signs in their filter input any longer, and should
be modified to not be looking for the % sign specifically.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42397#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list