[wp-trac] [WordPress Trac] #9864: Performance issues with large number of pages

WordPress Trac noreply at wordpress.org
Wed Feb 26 09:33:22 UTC 2014


#9864: Performance issues with large number of pages
--------------------------------+------------------------------------------
 Reporter:  pp19dd              |       Owner:
     Type:  defect (bug)        |      Status:  assigned
 Priority:  normal              |   Milestone:  3.9
Component:  Posts, Post Types   |     Version:  2.7.1
 Severity:  normal              |  Resolution:
 Keywords:  2nd-opinion has-    |     Focuses:  performance, administration
  patch                         |
--------------------------------+------------------------------------------

Comment (by SergeyBiryukov):

 Haven't tested [attachment:9864.diff] yet, but it has some i18n issues.

 {{{
 /* translators: 1: post_title */
 'id'    => $page->{$field},
 'label' => sprintf( __('%1$s'), $page->post_title ),
 'value' => sprintf( __('%1$s'), $page->post_title )
 }}}

 Dynamic strings like these are not localizable, as they cannot be
 extracted by gettext:
 http://ottopress.com/2012/internationalization-youre-probably-doing-it-
 wrong/

 Why would we need to translate a post title?

 We do, however need to use `esc_attr__()` instead of just `esc_attr()`
 here.

 {{{
 $output = "<input name='{$name}' type='text' ... title='" . esc_attr(
 'Page Title' ) . "' ... />\n";
 }}}

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


More information about the wp-trac mailing list