another attempt at fixing unexpected T_function in plugin