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

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

diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index 2bc005f936..ba7a6f93ba 100644
--- a/src/wp-includes/theme.php
+++ b/src/wp-includes/theme.php
@@ -2785,7 +2785,7 @@ function _remove_theme_support( $feature ) {
  * @param mixed  ...$args Optional extra arguments to be checked against certain features.
  * @return bool True if the current theme supports the feature, false otherwise.
  */
-function current_theme_supports( $feature ) {
+function current_theme_supports( $feature, ...$args ) {
 	global $_wp_theme_features;
 
 	if ( 'custom-header-uploads' == $feature ) {
@@ -2801,8 +2801,6 @@ function current_theme_supports( $feature ) {
 		return true;
 	}
 
-	$args = array_slice( func_get_args(), 1 );
-
 	switch ( $feature ) {
 		case 'post-thumbnails':
 			// post-thumbnails can be registered for only certain content/post types by passing
-- 
2.21.0.windows.1

