- 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
This commit is contained in:
parent
3b7e77da48
commit
419a787999
3 changed files with 13 additions and 4 deletions
|
@ -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 */
|
||||
|
|
Reference in a new issue