Skip to content

Commit f04c7dc

Browse files
authored
Update prepend.inc add human logic function
1 parent 378a36e commit f04c7dc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

include/prepend.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,11 @@ function google_cse(): void {
121121

122122
echo $cse_snippet;
123123
}
124+
// Human bool function
125+
if(!function_exists('bool'))
126+
{
127+
function bool($logic_parametr): bool
128+
{
129+
return (is_scalar(logic_parametr)) ? filter_var(logic_parametr ?? 0, FILTER_VALIDATE_BOOLEAN) : false;
130+
}
131+
}

0 commit comments

Comments
 (0)