From 419a787999e7723a8f59fd3a6157c654be72e501 Mon Sep 17 00:00:00 2001 From: Aricura Date: Tue, 10 Jun 2014 11:03:52 +0000 Subject: [PATCH] - Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@929556 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- classes/footnotes_settings.php | 12 +++++++++--- index.php | 2 +- readme.txt | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/classes/footnotes_settings.php b/classes/footnotes_settings.php index fd32f80..d341ab2 100644 --- a/classes/footnotes_settings.php +++ b/classes/footnotes_settings.php @@ -57,8 +57,13 @@ class Class_FootnotesSettings /* loads and filters the settings for this plugin */ $this->a_arr_Options = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, self::$a_arr_Default_Settings, true); + /* register public stylesheet */ + wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__)); + /* add public stylesheet */ + wp_enqueue_style('footnote_public_style'); + /* execute class includes on action-even: init, admin_init and admin_menu */ - add_action('init', array($this, 'LoadScriptsAndStylesheets')); + //add_action('init', array($this, 'LoadScriptsAndStylesheets')); add_action('admin_init', array($this, 'RegisterSettings')); add_action('admin_init', array($this, 'RegisterTab_General')); @@ -77,9 +82,9 @@ class Class_FootnotesSettings /* add the jQuery plugin (already registered by WP) */ wp_enqueue_script('jquery'); /* register public stylesheet */ - wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__)); + //wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__)); /* add public stylesheet */ - wp_enqueue_style('footnote_public_style'); + //wp_enqueue_style('footnote_public_style'); /* register settings stylesheet */ wp_register_style('footnote_settings_style', plugins_url('../css/settings.css', __FILE__)); /* add settings stylesheet */ @@ -126,6 +131,7 @@ class Class_FootnotesSettings */ function OutputSettingsPage() { + $this->LoadScriptsAndStylesheets(); /* gets active tag, or if nothing set the "general" tab will be set to active */ $l_str_tab = isset($_GET['tab']) ? $_GET['tab'] : FOOTNOTE_SETTINGS_LABEL_GENERAL; /* outputs all tabs */ diff --git a/index.php b/index.php index 53d9834..a067c82 100755 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/plugins/footnotes/ Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Author: media competence institute - Version: 1.2.3 + Version: 1.2.4 Author URI: http://cheret.co.uk/mci Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 3b22118..acfc054 100755 --- a/readme.txt +++ b/readme.txt @@ -64,6 +64,9 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho == Changelog == += 1.2.4 = +- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, Spain) + = 1.2.3 = - Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, Spain) - Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, Spain)