diff --git a/includes/sp-formatting-functions.php b/includes/sp-formatting-functions.php index 480024bf..7646dc81 100644 --- a/includes/sp-formatting-functions.php +++ b/includes/sp-formatting-functions.php @@ -74,6 +74,17 @@ function sp_filter_positive( $var = 0 ) { return $var > 0; } +/** + * Array filter returns non-empty array values. + * + * @access public + * @param str $var + * @return bool + */ +function sp_filter_non_empty( $var = '' ) { + return strlen( $var ) > 0; +} + /** * let_to_num function. *