From 0f52e6a8768ecf15d4b57455e75a0635c4ffc0d3 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sat, 10 Oct 2020 20:57:01 -0500 Subject: [PATCH] feat: add sanitizedPreviously() to Utils build: [skip-ci] --- composer.json | 2 +- src/Utils.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 807596e..e5ba3f3 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Utilities that make reading and writing PHP code more convenient and enjoyable", "type": "library", "license": "GPL-v2-or-later", - "version": "1.1.1", + "version": "1.1.2", "authors": [ { "name": "Elegant Themes", diff --git a/src/Utils.php b/src/Utils.php index ef3e3ff..74cc2cc 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -490,6 +490,19 @@ public function escArray( $values, $escaping_function = 'esc_html' ) { return $result; } + /** + * Pass-through function for acknowledging a previously sanitized value + * + * @since 1.1.2 + * + * @param mixed $value Value that has already been sanitized during the current request + * + * @return mixed + */ + public function sanitizedPreviously( $value ) { + return $value; + } + /** * Whether or not a string starts with a substring. *