Define $wp_lightbox_2 as global variable
-
Could you please define $wp_lightbox_2 as global variable before assigning value to it?
I had an issue in jqlb_js(). This function could not access $wp_lightbox_2. I tested on 2 sites; one worked fine, another one didn’t. After I defined $wp_lightbox_2 as global variable, it worked fine in both sites. Please check https://developer.wordpress.org/reference/functions/register_activation_hook/#a-note-on-variable-scope.
- The topic ‘Define $wp_lightbox_2 as global variable’ is closed to new replies.