Headlines: Add back-compat to the 'selected' detection

In the previous versions, the terms are stored as a string or int
instead of an array. So in_array should be used in these cases.