Preventing YARPP settings from saving
-
Hi I help develop the YARPP plugin.
We’ve tracked down a bug that results from a conflict between our two plugins.
The Javascript from your code that’s at play in the conflict is this:
e('body').on('click', '.disabled', function () { return !1 })
(where
e
isjQuery
renamed).That is preventing our settings page from saving because we have code that adds a cute spinner gif and *disables the submit button* (to prevent the user from clicking it over and over again if it’s slow). Like this:
$('.yarpp_spin_on_click').on('click', function() { $button = $(this); $spinner = $button.siblings('.spinner'); $button.addClass( 'disabled' ); $spinner.addClass( 'is-active' ); });
We can workaround by using a different CSS class (eg we could make one called
yarpp-disabled
and copy all ofdisabled
‘s style information over to it). But I think your current code has a high likelyhood to conflict with other plugins, so it might be good to change the code on your end. Eg maybe your selector could be more specific, so you know it only applies to your inputs.
Eg you could change your code toe('body').on('click', '.yikes-easy-mc-wrap .disabled', function () { return !1 })
and then on all your admin pages, in the
div
that wraps all your content, add the CSS classyikes-easy-mc-wrap
. Eg<div class="wrap yikes-easy-mc-wrap">...
What do you think? Or is there a better solution?
- The topic ‘Preventing YARPP settings from saving’ is closed to new replies.