Make WordPress Core


Ignore:
Timestamp:
09/12/2023 03:21:02 PM (17 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Include one space after function keyword for closures.

Note: This is enforced by WPCS 3.0.0.

Reference: WPCS: PR #2328 Core: properly check formatting of function declaration statements.

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r56548 r56559  
    23582358        add_filter(
    23592359            'wp_content_img_tag',
    2360             static function( $filtered_image ) {
     2360            static function ( $filtered_image ) {
    23612361                return "<span>$filtered_image</span>";
    23622362            }
     
    23822382        add_filter(
    23832383            'wp_content_img_tag',
    2384             static function( $filtered_image ) {
     2384            static function ( $filtered_image ) {
    23852385                return "<span>$filtered_image</span>";
    23862386            }
     
    40214021        add_filter(
    40224022            'wp_get_attachment_image_attributes',
    4023             static function( $attr ) {
     4023            static function ( $attr ) {
    40244024                unset( $attr['srcset'], $attr['sizes'], $attr['decoding'] );
    40254025                return $attr;
     
    41554155        add_filter(
    41564156            'the_content',
    4157             static function() use ( &$image_within_content ) {
     4157            static function () use ( &$image_within_content ) {
    41584158                // Replace content with an image tag, i.e. the 'wp_get_attachment_image' context is used while running 'the_content' filter.
    41594159                $image_within_content = wp_get_attachment_image( self::$large_id, 'large', false );
     
    42224222        add_filter(
    42234223            'the_content',
    4224             static function( $content ) use ( &$result, $context ) {
     4224            static function ( $content ) use ( &$result, $context ) {
    42254225                $result = wp_get_loading_attr_default( $context );
    42264226                return $content;
     
    45244524        add_filter(
    45254525            'the_content',
    4526             function( $content ) use ( &$result, $context ) {
     4526            function ( $content ) use ( &$result, $context ) {
    45274527                $attr   = $this->get_width_height_for_high_priority();
    45284528                $result = wp_get_loading_optimization_attributes( 'img', $attr, $context );
     
    48064806        add_filter(
    48074807            'wp_get_attachment_image_context',
    4808             static function() {
     4808            static function () {
    48094809                return 'my_custom_context';
    48104810            }
     
    52095209        add_filter(
    52105210            'wp_min_priority_img_pixels',
    5211             static function( $res ) {
     5211            static function ( $res ) {
    52125212                return 2500; // 50*50=2500
    52135213            }
     
    52825282        add_filter(
    52835283            'wp_get_attachment_image_context',
    5284             static function( $context ) use ( &$last_context ) {
     5284            static function ( $context ) use ( &$last_context ) {
    52855285                $last_context = $context;
    52865286                return $context;
     
    53375337        add_filter(
    53385338            'wp_omit_loading_attr_threshold',
    5339             static function() use ( $threshold ) {
     5339            static function () use ( $threshold ) {
    53405340                return $threshold;
    53415341            }
Note: See TracChangeset for help on using the changeset viewer.