From 4d143679ebf6fc91e2f6cc6e1e32d0c9c6f0497d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20de=20la=20Puente=20Gonz=C3=A1lez?= Date: Wed, 30 Mar 2016 16:43:38 +0200 Subject: [PATCH] Ensuring loading scripts only in the options page --- wp-add-to-homescreen/class-wp-add-to-homescreen-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-add-to-homescreen/class-wp-add-to-homescreen-admin.php b/wp-add-to-homescreen/class-wp-add-to-homescreen-admin.php index 0a409b7..98cb6a2 100644 --- a/wp-add-to-homescreen/class-wp-add-to-homescreen-admin.php +++ b/wp-add-to-homescreen/class-wp-add-to-homescreen-admin.php @@ -26,7 +26,7 @@ class WP_Add_To_Homescreen_Admin { add_action('wp_dashboard_setup', array($this, 'add_dashboard_widgets')); add_action('admin_menu', array($this, 'admin_menu')); add_action('admin_init', array($this, 'admin_init')); - add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts')); + add_action('settings_page_' . self::$options_page_id, array($this, 'enqueue_scripts')); add_action('update_option_' . $this->options->o('theme-color'), array($this, 'regenerate_icon')); }