improved widget text filtering flow and moved WPML compatibility code to proper class