[wp-trac] [WordPress Trac] #56841: WordPress pagination broken after updating to 6.0

WordPress Trac noreply at wordpress.org
Sat Nov 18 01:52:51 UTC 2023


#56841: WordPress pagination broken after updating to 6.0
--------------------------+-------------------------------
 Reporter:  wpfed         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  6.5
Component:  Query         |     Version:  6.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  coding-standards
--------------------------+-------------------------------

Comment (by ironprogrammer):

 Thanks for the PR, @wpfed! This effectively reverts things to before
 [52973].

 However, because both [52973] and the follow-up [52977] were updates to
 improve readability of the code, could there be a compromise here? Such
 as:

 {{{#!php
 // Remove leading/trailing whitespace while avoiding trim().
 $this->request =
         "{$this->sql_clauses['select']}
          {$this->sql_clauses['from']}
          ...
          {$this->sql_clauses['limits']}";

 // ALTERNATIVE: Concat and remove extraneous `\n` and `\t` introduced by
 [52977].
 $this->request =
         "{$this->sql_clauses['select']} " .
         "{$this->sql_clauses['from']} " .
         ...
         "{$this->sql_clauses['limits']}";

 }}}

 There is some precedence for multiline string concatenation in a few
 places, e.g.:
 - [https://github.com/WordPress/wordpress-
 develop/blob/4e4fdcb94910fb4cd21d17658431c28e06e7e19c/src/wp-includes
 /html-api/class-wp-html-tag-processor.php#L2037 wp-includes/html-api
 /class-wp-html-tag-processor.php]
 - [https://github.com/WordPress/wordpress-
 develop/blob/ff96003a0f91394d8e0f37643a5c96aaad42299b/src/wp-
 includes/formatting.php#L631 wp-includes/formatting.php]
 - [https://github.com/WordPress/wordpress-
 develop/blob/1077af7544b87cb49fb8499f5c2aead0f8211275/src/wp-
 includes/shortcodes.php#L338 wp-includes/shortcodes.php]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56841#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list