Make WordPress Core

Changeset 42429


Ignore:
Timestamp:
01/08/2018 10:35:13 AM (6 years ago)
Author:
pento
Message:

Formatting: Fix capital_P_dangit() not capital P-ing, dangit.

Unfortunately, in my overzealous desire to fix all the un-capitalised Ps, [42343] capitalled some Ps that intentionally should not be capitals.

This commit fixes the incorrectly capitalling of Ps, as well as including unit tests and PHPCS instructions to ensure we never capitulate to capitalisationing them again.

Props superdav42.
Fixes #43040.
Fixes #43041.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r42343 r42429  
    50785078}
    50795079
    5080 /**
    5081  * Forever eliminate "WordPress" from the planet (or at least the little bit we can influence).
     5080// phpcs:disable WordPress.WP.CapitalPDangit.Misspelled, WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid -- 8-)
     5081/**
     5082 * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
    50825083 *
    50835084 * Violating our coding standards for a good function name.
     
    50945095    $current_filter = current_filter();
    50955096    if ( 'the_title' === $current_filter || 'wp_title' === $current_filter ) {
    5096         return str_replace( 'WordPress', 'WordPress', $text );
     5097        return str_replace( 'Wordpress', 'WordPress', $text );
    50975098    }
    50985099    // Still here? Use the more judicious replacement
     
    51075108    );
    51085109}
     5110// phpcs:enable
    51095111
    51105112/**
Note: See TracChangeset for help on using the changeset viewer.