From a5f94d090ddcf26c1761eae5df335633eb58bf13 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Fri, 12 Jul 2019 06:09:18 +0200
Subject: [PATCH] Simplify & modernize functions in wp-includes/deprecated.php
While these functions are deprecated, they can still get a minor performance boost in case they are being called.
---
src/wp-includes/deprecated.php | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
index 677a9b5d44..ce12741fcc 100644
|
a
|
b
|
function _nc( $single, $plural, $number, $domain = 'default' ) { |
| 1792 | 1792 | * @deprecated 2.8.0 Use _n() |
| 1793 | 1793 | * @see _n() |
| 1794 | 1794 | */ |
| 1795 | | function __ngettext() { |
| | 1795 | function __ngettext( ...$args ) { |
| 1796 | 1796 | _deprecated_function( __FUNCTION__, '2.8.0', '_n()' ); |
| 1797 | | $args = func_get_args(); |
| 1798 | | return call_user_func_array('_n', $args); |
| | 1797 | return _n( ...$args ); |
| 1799 | 1798 | } |
| 1800 | 1799 | |
| 1801 | 1800 | /** |
| … |
… |
function __ngettext() { |
| 1805 | 1804 | * @deprecated 2.8.0 Use _n_noop() |
| 1806 | 1805 | * @see _n_noop() |
| 1807 | 1806 | */ |
| 1808 | | function __ngettext_noop() { |
| | 1807 | function __ngettext_noop( ...$args ) { |
| 1809 | 1808 | _deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' ); |
| 1810 | | $args = func_get_args(); |
| 1811 | | return call_user_func_array('_n_noop', $args); |
| | 1809 | return _n_noop( ...$args ); |
| 1812 | 1810 | |
| 1813 | 1811 | } |
| 1814 | 1812 | |