WordPress.org

Make WordPress Core

Ticket #47678: 47678-WP_Customize_Manager-import_theme_starter_.patch

File 47678-WP_Customize_Manager-import_theme_starter_.patch, 1.0 KB (added by jrf, 11 months ago)

Modernize WP_Customize_Manager::import_theme_starter_content()

  • src/wp-includes/class-wp-customize-manager.php

    From 17d37b8356e79b46a2b20a1b722ee9073ba66e9c Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Fri, 19 Jul 2019 16:14:32 +0200
    Subject: [PATCH] Modernize
     WP_Customize_Manager::import_theme_starter_content()
    
    ---
     src/wp-includes/class-wp-customize-manager.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
    index be369a1cb3..185eeca0c9 100644
    a b final class WP_Customize_Manager { 
    12291229                                        $widget_numbers = array_keys( $settings );
    12301230                                        if ( count( $widget_numbers ) > 0 ) {
    12311231                                                $widget_numbers[]               = 1;
    1232                                                 $max_widget_numbers[ $id_base ] = call_user_func_array( 'max', $widget_numbers );
     1232                                                $max_widget_numbers[ $id_base ] = max( ...$widget_numbers );
    12331233                                        } else {
    12341234                                                $max_widget_numbers[ $id_base ] = 1;
    12351235                                        }