Make WordPress Core


Ignore:
Timestamp:
08/26/2021 12:57:08 PM (5 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Use static closures when not using $this.

When a closure does not use $this, it can be made static for improved performance.

Static closures are supported in PHP since PHP 5.4. ​

Props jrf, hellofromTonya, swissspidy, SergeyBiryukov.
See #53359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-privacy.php

    r50631 r51657  
    2121add_filter(
    2222        'admin_body_class',
    23         function( $body_class ) {
     23        static function( $body_class ) {
    2424                $body_class .= ' privacy-settings ';
    2525
Note: See TracChangeset for help on using the changeset viewer.