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/src/wp-includes/theme.php
+++ b/src/wp-includes/theme.php
@@ -2355,13 +2355,11 @@ function get_theme_starter_content() {
  * @param mixed  ...$args Optional extra arguments to pass along with certain features.
  * @return void|bool False on failure, void otherwise.
  */
-function add_theme_support( $feature ) {
+function add_theme_support( $feature, ...$args ) {
 	global $_wp_theme_features;
 
-	if ( func_num_args() == 1 ) {
+	if ( func_num_args() === 1 ) {
 		$args = true;
-	} else {
-		$args = array_slice( func_get_args(), 1 );
 	}
 
 	switch ( $feature ) {
-- 
2.21.0.windows.1

