WidgetOptions / widget-options

Additional Widget options for better widget control. Available on
https://widget-options.com/
GNU General Public License v3.0
35 stars 16 forks source link

Bug when aply php logic in widget visibility #49

Open PeterOlvera opened 5 years ago

PeterOlvera commented 5 years ago

I'm trying aply php code for widget visibility, but when I use the following character "<" doesn't work. in the line 360 aproximately, the eval funtion don't understand this character and interpret that this character y an HTML entity.

Estoy intentando aplicar código PHP para cambiar la visibilidad de un widget, pero cuando introduzco el caracter "<", el plugin no funciona. He investigado y he visto que en la linea 360 aproximadamente, la función eval no funciona al interpretar este código como un elemento de HTML (la llave de abrir etiquetas).

Te dejo una posible solución a esto.

$display_logic="return (" . html_entity_decode($display_logic, ENT_COMPAT | ENT_HTML401 | ENT_QUOTES) . ");";