Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #26886, comment 39


Ignore:
Timestamp:
05/27/2019 09:51:43 PM (6 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26886, comment 39

    initial v1  
    44Yeah, that's a good optimization (although not sure how often it gets used). However this should not happen when the query parameters form an array, like in this case. Perhaps you should look at the param "names" and if more than one contain `[` and `]` just leave the query string as-is :)
    55
     6In PHP this should be as simple as:
     7{{{
     8if ( substr_count( $query_string, ']=' ) < 2 ) {
     9    // sort
     10}
     11}}}
     12
    613Assuming the patch from https://core.trac.wordpress.org/attachment/ticket/45346/45346.diff works well. Going to commit it and close this ticket with it too. Please feel free to reopen with more info and examples if it doesn't fix the bug(s) reported here.