From 5315e939508e558d91be88be87af285ad6150d54 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 11 Jul 2019 12:09:24 +0200
Subject: [PATCH] Simplify & modernize get_theme_support()

---
 src/wp-includes/theme.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index 618861387a..2bc005f936 100644
--- a/src/wp-includes/theme.php
+++ b/src/wp-includes/theme.php
@@ -2665,7 +2665,7 @@ function _custom_logo_header_styles() {
  * @param mixed  ...$args Optional extra arguments to be checked against certain features.
  * @return mixed The array of extra arguments or the value for the registered feature.
  */
-function get_theme_support( $feature ) {
+function get_theme_support( $feature, ...$args ) {
 	global $_wp_theme_features;
 	if ( ! isset( $_wp_theme_features[ $feature ] ) ) {
 		return false;
@@ -2675,7 +2675,6 @@ function get_theme_support( $feature ) {
 		return $_wp_theme_features[ $feature ];
 	}
 
-	$args = array_slice( func_get_args(), 1 );
 	switch ( $feature ) {
 		case 'custom-logo':
 		case 'custom-header':
-- 
2.21.0.windows.1

