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
|
b
|
function _remove_theme_support( $feature ) { |
2785 | 2785 | * @param mixed ...$args Optional extra arguments to be checked against certain features. |
2786 | 2786 | * @return bool True if the current theme supports the feature, false otherwise. |
2787 | 2787 | */ |
2788 | | function current_theme_supports( $feature ) { |
| 2788 | function current_theme_supports( $feature, ...$args ) { |
2789 | 2789 | global $_wp_theme_features; |
2790 | 2790 | |
2791 | 2791 | if ( 'custom-header-uploads' == $feature ) { |
… |
… |
function current_theme_supports( $feature ) { |
2801 | 2801 | return true; |
2802 | 2802 | } |
2803 | 2803 | |
2804 | | $args = array_slice( func_get_args(), 1 ); |
2805 | | |
2806 | 2804 | switch ( $feature ) { |
2807 | 2805 | case 'post-thumbnails': |
2808 | 2806 | // post-thumbnails can be registered for only certain content/post types by passing |