mennolui / wp-foyer

Foyer - a free Digital Signage plugin for WordPress. Perfect for theaters, music venues, cinemas and festivals.
GNU General Public License v3.0
49 stars 22 forks source link

Dynamic user content / shortcodes will only work for first 5 minutes #29

Open mennolui opened 5 years ago

mennolui commented 5 years ago

Javascripts that are initialized at page load will work inside their slide at first, but will no longer work after 5 minutes.

Every 5 minutes new HTML is loaded. Because $(document).ready() is only invoked once, at page load of the display, some Javascripts for newly loaded HTML will not start. Especially Javascripts unknown to Foyer, used by user content such as shortcodes.

Also, any inline Javascript that is output by shortcodes is stripped while loading new HTML (using jQuery). And even if it would not be stripped while loading it would not be run.

Possible solutions:

WatskeBart commented 4 years ago

Where do I need to implement the jQuery hack to test if it works?

Is it also possible to turn off the 5 minute refresh completely?

WatskeBart commented 4 years ago

My workaround can be found a the foyer support forum: https://wordpress.org/support/topic/disable-5-minute-refresh/