If you do not use break; in its case, execution simply falls into the following case. You can take advantage of this by adding each of your cases together, for example:
switch(get_option('my_template')) { case 'test1': case 'test2': return 850; break; default: return 950; }
Since in the case of "test1" there is no break; when execution ends in this case (that is, immediately, since there is no logic in it), then the control will fall into the "test2" register, which will end in its break statement.
In this case, break is not even required for these cases, since the return will take care of exiting switch by itself.
AgentConundrum
source share