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
|
b
|
function _custom_logo_header_styles() { |
| 2665 | 2665 | * @param mixed ...$args Optional extra arguments to be checked against certain features. |
| 2666 | 2666 | * @return mixed The array of extra arguments or the value for the registered feature. |
| 2667 | 2667 | */ |
| 2668 | | function get_theme_support( $feature ) { |
| | 2668 | function get_theme_support( $feature, ...$args ) { |
| 2669 | 2669 | global $_wp_theme_features; |
| 2670 | 2670 | if ( ! isset( $_wp_theme_features[ $feature ] ) ) { |
| 2671 | 2671 | return false; |
| … |
… |
function get_theme_support( $feature ) { |
| 2675 | 2675 | return $_wp_theme_features[ $feature ]; |
| 2676 | 2676 | } |
| 2677 | 2677 | |
| 2678 | | $args = array_slice( func_get_args(), 1 ); |
| 2679 | 2678 | switch ( $feature ) { |
| 2680 | 2679 | case 'custom-logo': |
| 2681 | 2680 | case 'custom-header': |