[wp-trac] [WordPress Trac] #49518: Consider adding domain-specific i18N filter hooks

WordPress Trac noreply at wordpress.org
Tue Jun 23 09:21:12 UTC 2020


#49518: Consider adding domain-specific i18N filter hooks
-------------------------------------------------+-------------------------
 Reporter:  geminilabs                           |       Owner:  whyisjake
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  5.5
Component:  I18N                                 |     Version:  5.3.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-dev-   |     Focuses:  coding-
  note 2nd-opinion                               |  standards
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 This introduces WPCS issues as is:
 {{{
 FILE: src\wp-includes\l10n.php
 ----------------------------------------------------------------------
 FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
 ----------------------------------------------------------------------
  198 | WARNING | Words in hook names should be separated using
      |         | underscores. Expected: 'gettext_' . $domain, but
      |         | found: 'gettext-' . $domain.
      |         |
 (WordPress.NamingConventions.ValidHookName.UseUnderscores)
  262 | WARNING | Words in hook names should be separated using
      |         | underscores. Expected: 'gettext_with_context_' .
      |         | $domain, but found: 'gettext_with_context-' .
      |         | $domain.
      |         |
 (WordPress.NamingConventions.ValidHookName.UseUnderscores)
  482 | WARNING | Words in hook names should be separated using
      |         | underscores. Expected: 'ngettext_' . $domain, but
      |         | found: 'ngettext-' . $domain.
      |         |
 (WordPress.NamingConventions.ValidHookName.UseUnderscores)
  538 | WARNING | Words in hook names should be separated using
      |         | underscores. Expected: 'ngettext_with_context_' .
      |         | $domain, but found: 'ngettext_with_context-' .
      |         | $domain.
      |         |
 (WordPress.NamingConventions.ValidHookName.UseUnderscores)
  694 | WARNING | Found: ==. Use strict comparisons (=== or !==).
      |         | (WordPress.PHP.StrictComparisons.LooseComparison)
 ----------------------------------------------------------------------
 }}}

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


More information about the wp-trac mailing list