Ok, so according to your if statement, there are 3 conditions in which this will be true:
1st condition: $context['in_maintenance'] && $context['user']['is_admin']
OR
2nd condition: !empty($context['user']['avatar'])
OR
3rd condition: !empty($context['open_mod_reports']) && $context['show_open_reports']
if this is the correct conditions, than yep, looks good. Just removed the ( and ) from around the !empty($context['user']['avatar']), which is not a big deal, just not needed in here:
if (($context['in_maintenance'] && $context['user']['is_admin']) || !empty($context['user']['avatar']) || (!empty($context['open_mod_reports']) && $context['show_open_reports']))
FYI: A few Basic PHP Operators, when working with if statements, that can be used:
AND: &&
OR: ||
Is Equal to: ==
Is Not Equal to: !=
Is Less than: <
Is Less than or equal to: <=
Is Greater than: >
Is Greater than or equal to: >=
Not: !
Also Shortie, if this is going to be a very long if statement, may be a better idea to set variables for each statement/condition, for example:
$statement1 = $context['in_maintenance'] && $context['user']['is_admin'] ? true : false;
$statement2 = !empty($context['open_mod_reports']) && $context['show_open_reports'] ? true : false;
// Than the if statement can change to this:
if ($statement1 || !empty($context['user']['avatar']) || $statement2)
So this approach makes it more manageable.
Cheers