[wp-trac] [WordPress Trac] #55699: posts_join_request filter is broken

WordPress Trac noreply at wordpress.org
Tue May 10 09:30:03 UTC 2022

#55699: posts_join_request filter is broken
 Reporter:  5um17                                |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.0
Component:  Query                                |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests changes-    |     Focuses:
  requested                                      |
Changes (by peterwilsoncc):

 * keywords:  has-patch has-unit-tests commit dev-feedback => has-patch has-
     unit-tests changes-requested


 I'm concerned about [53370] and it needs additional work before it's ready
 to be merged in to the 6.0 branch.

 In the new code, `$clauses` undergoes four main definitions:

 1. The name of the MySQL sub-clauses
 2. The value of the MySQL sub-clauses
 3. The name of the MySQL sub-clauses
 4. The value of the MySQL sub-clauses

 It took me quite a long time to figure out what was happening as a result.

 As a defensive coding measure, two variables need to be used one for the
 names, one for the values of the clauses.

 I see in the original patch the suggestion was pieces and clauses. I think
 this is preferable to what is in trunk at the moment, despite the
 inconsistency with other query classes.

Ticket URL: <https://core.trac.wordpress.org/ticket/55699#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list