Allow conditionals without parentheses

This commit is contained in:
Brian Miyaji
2018-03-01 00:33:43 +11:00
parent 180899d232
commit 72653c7043

View File

@@ -76,7 +76,7 @@ if ( ! class_exists( 'SportsPress_Conditional_Equations' ) ) :
$equation = str_replace( ' ', '', $equation );
// Find all parentheses with conditional operators
$re = '/\(([^[\(|\)]*[<=>][^[\(|\)]*)\)/';
$re = '/([^[\(|\)]*[<=>][^[\(|\)]*)/';
if ( preg_match_all( $re, $equation, $matches ) ) {
foreach ( $matches[1] as $match ) {