Title: Enabling Custom events
Last modified: August 24, 2016

---

# Enabling Custom events

 *  Resolved [Andrew](https://wordpress.org/support/users/sm60/)
 * (@sm60)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enabling-custom-events/)
 * The Responsive Lightbox plugin has a conflict with another plugin I use. I have
   the fix for it – I just need to enable ‘custom events’. But I use a multisite
   so I need to force this option to always be set to enable. Otherwise each user
   will have to enable custom events themselves so it works correctly. I managed
   to achieve this by editing the plugin where it says:
 * `<input id="rl-enable-custom-events-' . $val . '" type="radio" name="responsive_lightbox_settings[
   enable_custom_events]" value="' . $val . '" ' . checked(($val === 'yes' ? TRUE:
   FALSE), $this->options['settings']['enable_custom_events'], FALSE) . ' /><label
   for="rl-enable-custom-events-' . $val . '">' . esc_html($trans) . '</label>';`
 * I only had to change:
    `TRUE : FALSE` to: `FALSE : TRUE` This sets custom events
   to enable and prevents a user from switching it to disable. But I was wondering
   if it is possible to code it in one of my files instead? I use a must-use plugin
   file where I put php snippets in. Otherwise I’ll have to keep editing the plugin
   every time the plugin is upgraded.
 * Any help appreciated.
 * [https://wordpress.org/plugins/responsive-lightbox/](https://wordpress.org/plugins/responsive-lightbox/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enabling-custom-events/#post-6000765)
 * That’s what rl_lightbox_args filter is for.
 * You can use it to force that setting like that:
 *     ```
       function custom_rl_lightbox_args($args) {
       	$args['custom_events'] = ' ajaxComplete'; // or any other custom events you wish to force
       	return $args;
       }
       add_filter('rl_lightbox_args', 'custom_rl_lightbox_args');
       ```
   
 *  Thread Starter [Andrew](https://wordpress.org/support/users/sm60/)
 * (@sm60)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enabling-custom-events/#post-6000766)
 * Brilliant, thanks, I’ll try it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Enabling Custom events’ is closed to new replies.

 * ![](https://ps.w.org/responsive-lightbox/assets/icon-256x256.png?rev=3460874)
 * [Responsive Lightbox & Gallery](https://wordpress.org/plugins/responsive-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-lightbox/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Andrew](https://wordpress.org/support/users/sm60/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/enabling-custom-events/#post-6000766)
 * Status: resolved