Validate::sanitize_array_remove_empty( null|array $value = null )

Description #

Remove empty array items.

Parameters #

  • $value
    null | array (Optional) Array to sanitize. Default value: null

Source #

File: lib/class-validate.php

	public static function sanitize_array_remove_empty( $value = null ) {
		if ( null !== $value && is_array( $value ) ) {
			return array_filter( $value );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment