Hi Everyone!
I found a solution to not equal function [if qs="<qskey>!<qsvalue>"] … [/if]
On class-core.php change the whole condition_query_string function. This is around line 74. Change the whole function to this.
private function condition_query_string( $value, $match ) {
if( strstr( $value, ':' ) ){
list( $qs_key, $qs_value ) = explode( ':', $value );
$match = ( empty( $match ) ) ? 'exact' : $match;
# Check if GET value matches given value
if ( ! isset( $_GET[ $qs_key ] ) || false === $this->check_value( $_GET[ $qs_key ], $qs_value, $match ) )
return false;
return true;
}
elseif( strstr( $value, '!' ) ){
list( $qs_key, $qs_value ) = explode( '!', $value );
$match = ( empty( $match ) ) ? 'exact' : $match;
# Check if GET value doesn't match given value
if ( ! isset( $_GET[ $qs_key ] ) || false === $this->check_value( $_GET[ $qs_key ], $qs_value, $match ) )
return true;
return false;
}
else{
return false;
}
}
]]>
Would it be possible to get a condition added to test whether a user is logged in?
Thanks.
]]>I am wondering if this plugin can detect “additional” role assignments, or if it only detects the primary role. Thanks!
]]>Hi,
Are you using other logical operators than “equals”?
The “is not equal” operator would be very useful.
Thanks for this very useful plugin.
]]>Hi!
Would I be able to just look for the qs to exist?
Meaning any value?
like…
[if qs=”utm_source:*”]text[/if]
Thanks for a great little plugin ??
]]>