Make WordPress Core


Ignore:
Timestamp:
09/12/2023 03:21:02 PM (3 years 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/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php

    r56547 r56559  
    154154                                        'section'         => 'colors',
    155155                                        'priority'        => 100,
    156                                         'active_callback' => static function() {
     156                                        'active_callback' => static function () {
    157157                                                return 127 >= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
    158158                                        },
     
    166166                                'capability'        => 'edit_theme_options',
    167167                                'default'           => false,
    168                                 'sanitize_callback' => static function( $value ) {
     168                                'sanitize_callback' => static function ( $value ) {
    169169                                        return (bool) $value;
    170170                                },
     
    189189                                'priority'        => 110,
    190190                                'description'     => $description,
    191                                 'active_callback' => static function( $value ) {
     191                                'active_callback' => static function ( $value ) {
    192192                                        return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
    193193                                },
     
    201201                                'selector'            => '#dark-mode-toggler',
    202202                                'container_inclusive' => true,
    203                                 'render_callback'     => function() {
     203                                'render_callback'     => function () {
    204204                                        $attrs = ( $this->switch_should_render() ) ? array() : array( 'style' => 'display:none;' );
    205205                                        $this->the_html( $attrs );
Note: See TracChangeset for help on using the changeset viewer.