[wp-trac] [WordPress Trac] #42140: Incorrect use of plural in class-wp-customize-themes-section.php

WordPress Trac noreply at wordpress.org
Tue Jul 15 19:28:41 UTC 2025


#42140: Incorrect use of plural in class-wp-customize-themes-section.php
-------------------------------------------------+-------------------------
 Reporter:  tobifjellner                         |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Customize                            |     Version:  4.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-        |     Focuses:  javascript
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:19 poena]:
 > Would
 [https://core.trac.wordpress.org/attachment/ticket/42140/42140.4.patch
 42140.4] work?
 > What I am attempting to do is use {{{{{ data.count }}}}} as the number
 inside the {{{_n()}}},
 > and move the {{{<span class="theme-count">}}} so that the complete text
 string is inside it,
 > removing the duplication.

 Unfortunately, `{{ data.count }}` will not work inside of a PHP function
 in this way.

 PHP renders the output server-side, while JavaScript renders it client-
 side, and the JavaScript cannot reach inside of the `<?php ?>` tags to
 influence what `_n()` accepts, which in this case is an integer and not a
 string.

 @SergeyBiryukov was also correct about the container text targeting the
 wrong element.

 I'll be attaching a refreshed patch imminently.

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


More information about the wp-trac mailing list