Thread Starter
brit77
(@brit77)
I experimented a bit with the code here: https://github.com/fightforthefuture/battleforthenet-widget and found something that seems to work. In the fftf-alerts.php file, I added theme: “slow” to line 85:
'extra' => 'var _bftn_options = { iframe_base_path: "https://widget.battleforthenet.com/iframe", theme: "slow" }',
Are there any issues with doing it this way? (other than losing the changes when the plugin updates!)
Thanks again,
S.
There shouldn’t be anything wrong with that edit (except obviously being overwritten). But … a better way would be to make an MU plugin for yourself with this:
$battleslow = 'var _bftn_options = { theme: "slow" }'
wp_add_inline_script( 'battleforthenet', $battleslow, 'before' );
I’m fairly certain that’ll work for you. I’m not 100% on all my Javascript yet, so I think you can declare the options twice… Hope so.
FWIW, I decided to go with decisions, not options, when I made it and not allow for ALL the different options each event had. That’s a lot of management and a lot more though than most people want to put in to this to use it. The only reason the extra value is there at all is they have a certificate error :/
Thread Starter
brit77
(@brit77)
Thanks for the insight, Mike.
Since the campaign is in a couple of days, I’ll stick with the simple one line addition to the plugin file (assuming there won’t be a critical update in that time!).
-
This reply was modified 8 years, 11 months ago by
brit77.