Loading things on other plugin pages
-
Hello,
It seems the plugin may be enqueuing scripts even on admin settings pages that don’t belong to the plugin. It’s causing a conflict with the “404 Solution” plugin.
Can we verify that enqueue scripts is only called when this specific plugin’s settings page is used?
e.g. in the function that’s called when the settings page is created, set a variable like
$GLOBALS['copy-delete-posts-settings-page'] = truethen before “wp_enqueue_style” and “wp_enqueue_script” are called, use something like
if (!array_key_exists('copy-delete-posts-settings-page', $GLOBALS) || $GLOBALS['copy-delete-posts-settings-page'] != true) { return; }This is adapted from https://pippinsplugins.com/loading-scripts-correctly-in-the-wordpress-admin/
thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Loading things on other plugin pages’ is closed to new replies.