Making WordPress.org

Changeset 5595


Ignore:
Timestamp:
06/21/2017 10:26:50 PM (7 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Prevent 'Requests' and 'Translations' from being treated as inline class references.

Unlike other class names, 'Requests' and 'Translations' have a decent chance of being used as actual words and not just inline class references, so err on the side of caution. If a class reference is intended for these two class names, the @see notation should be used, e.g. {@see Requests}.

Fixes #2842.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php

    r5582 r5595  
    377377                    // Most class names start with an uppercase letter and have an underscore.
    378378                    // The exceptions are explicitly listed since future classes likely won't violate previous statement.
     379                    // Requests and Translations, due to their higher likelihood of use as a word and not as an inline class
     380                    //   reference, should be explicitly referenced, e.g. `{@see Requests}`.
    379381                    '~'
    380382                        . '(?<!/)'
     
    382384                        . '('                 // Primary match grouping
    383385                            . 'wpdb|wp_atom_server|wp_xmlrpc_server' // Exceptions that start with lowercase letter
    384                             . '|AtomFeed|AtomEntry|AtomParser|MagpieRSS|Requests|RSSCache|Translations|Walker' // Exceptions that lack an underscore
     386                            . '|AtomFeed|AtomEntry|AtomParser|MagpieRSS|RSSCache|Walker' // Exceptions that lack an underscore
    385387                            . '|_?[A-Z][a-zA-Z]+_\w+'                // Most start with (optional underscore, then) uppercase, has underscore
    386388                        . ')'                 // End primary match grouping
Note: See TracChangeset for help on using the changeset viewer.