PATH:
home
/
centosnipponia
/
public_html
/
nipponiacar
/
wp-content
/
plugins
/
google-site-kit
/
includes
/
Core
/
Util
<?php /** * Class Google\Site_Kit\Core\Util\Sanitize * * @package Google\Site_Kit\Core\Util * @copyright 2023 Google LLC * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link https://sitekit.withgoogle.com */ namespace Google\Site_Kit\Core\Util; /** * Utility class for sanitizing data. * * @since 1.93.0 * @access private * @ignore */ class Sanitize { /** * Filters empty or non-string elements from a given array. * * @since 1.93.0 * * @param array $elements Array to check. * @return array Empty array or a filtered array containing only non-empty strings. */ public static function sanitize_string_list( $elements = array() ) { if ( ! is_array( $elements ) ) { $elements = array( $elements ); } if ( empty( $elements ) ) { return array(); } $filtered_elements = array_filter( $elements, function ( $element ) { return is_string( $element ) && ! empty( $element ); } ); // Avoid index gaps for filtered values. return array_values( $filtered_elements ); } }
[+]
..
[-] Activation_Flag.php
[edit]
[-] Activation_Notice.php
[edit]
[-] Auto_Updates.php
[edit]
[-] BC_Functions.php
[edit]
[-] Block_Support.php
[edit]
[-] Collection_Key_Cap_Filter.php
[edit]
[-] Date.php
[edit]
[-] Developer_Plugin_Installer.php
[edit]
[-] Entity_Factory.php
[edit]
[-] Entity.php
[edit]
[-] Exit_Handler.php
[edit]
[-] Feature_Flags.php
[edit]
[-] Google_Icon.php
[edit]
[-] Google_URL_Matcher_Trait.php
[edit]
[-] Google_URL_Normalizer.php
[edit]
[-] Health_Checks.php
[edit]
[-] Input.php
[edit]
[-] Method_Proxy_Trait.php
[edit]
[-] Migrate_Legacy_Keys.php
[edit]
[-] Migration_1_123_0.php
[edit]
[-] Migration_1_129_0.php
[edit]
[-] Migration_1_150_0.php
[edit]
[-] Migration_1_163_0.php
[edit]
[-] Migration_1_177_0.php
[edit]
[-] Migration_1_3_0.php
[edit]
[-] Migration_1_8_1.php
[edit]
[-] Plugin_Status.php
[edit]
[-] Requires_Javascript_Trait.php
[edit]
[-] Reset_Persistent.php
[edit]
[-] Reset.php
[edit]
[-] REST_Entity_Search_Controller.php
[edit]
[-] Sanitize.php
[edit]
[-] Scopes.php
[edit]
[-] Sort.php
[edit]
[-] Synthetic_WP_Query.php
[edit]
[-] Uninstallation.php
[edit]
[-] URL.php
[edit]
[-] WP_Context_Switcher_Trait.php
[edit]
[-] WP_Query_Factory.php
[edit]
[-] .htaccess.disabled
[edit]