From 0b5fc183d0b8ad1ac035ac29150eb1972c0aca3d Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 11 Jul 2019 12:06:41 +0200
Subject: [PATCH] Simplify & modernize add_theme_support()
---
src/wp-includes/theme.php | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index ccfa13974a..618861387a 100644
a
|
b
|
function get_theme_starter_content() { |
2355 | 2355 | * @param mixed ...$args Optional extra arguments to pass along with certain features. |
2356 | 2356 | * @return void|bool False on failure, void otherwise. |
2357 | 2357 | */ |
2358 | | function add_theme_support( $feature ) { |
| 2358 | function add_theme_support( $feature, ...$args ) { |
2359 | 2359 | global $_wp_theme_features; |
2360 | 2360 | |
2361 | | if ( func_num_args() == 1 ) { |
| 2361 | if ( func_num_args() === 1 ) { |
2362 | 2362 | $args = true; |
2363 | | } else { |
2364 | | $args = array_slice( func_get_args(), 1 ); |
2365 | 2363 | } |
2366 | 2364 | |
2367 | 2365 | switch ( $feature ) { |