We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usual use case for short ternary is reading ACF field values and setting default if value is not set. Now it is not allowed.
$value = get_field('ploo') ? get_field('ploo') : 'moi;
could be written like
$value = get_field('ploo') ?: 'moi;
To allow short ternaries disable this: WordPress.PHP.DisallowShortTernary.Found
The text was updated successfully, but these errors were encountered:
Where should I disable that ??
Sorry, something went wrong.
No branches or pull requests
Usual use case for short ternary is reading ACF field values and setting default if value is not set. Now it is not allowed.
$value = get_field('ploo') ? get_field('ploo') : 'moi;
could be written like
$value = get_field('ploo') ?: 'moi;
To allow short ternaries disable this: WordPress.PHP.DisallowShortTernary.Found
The text was updated successfully, but these errors were encountered: