i’m trying to do many checks and i found out if i use the short if statement i would produce a shorter code and it would reduce my script by about 100 line
if (($options['vss_check'] == 'all' ?
check_facebook() && check_plusone() :
($options['vss_check'] == 'fbonly' ?
check_facebook() :
($options['vss_check'] == 'poonly' ?
check_plusone()
)
)
) &&!is_null( $content ) &&!is_feed() ) {
however i get a syntax error ‘unexpected )’ on that line
what did i do wrong ?
thank you
You should avoid this, because it makes your code much harder to read and to debug.
Your error is where you have
It is missing the
:and the value if the condition is false.