Taking their first request they are asking you to use a format like this (a ? b : c) ? d : e
in this
( ( 'all' === $key && empty( $current ) ) ) ? 'class="current"' : ( $current == $key ) ? 'class="current"' : ''
breaking it down into their terminaology in this case:
a is ( 'all' === $key && empty( $current ) )
- there was an unneeded pair of brackets here, I've removed them as we've got enough problems sorting out brackets as it is
b is 'class="current"'
c is ( $current == $key )
d is 'class="current"'
e is ''
what they are saying is that they want you to make it plain what is going to be tested for the second ? by putting the condition and result of the first in parentheses
The first is: (a ? b : c)
which becomes ( ( 'all' === $key && empty( $current ) ) ? 'class="current"' : ( $current == $key ) )
So they ask that you use:
( ( 'all' === $key && empty( $current ) ) ? 'class="current"' : ( $current == $key ) ) ? 'class="current"' : ''
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…