WordPress.org

Forums

Theme Check
[Plugin: Theme-Check] is_admin() ? (3 posts)

  1. Scott Phillips
    Member
    Posted 3 years ago #

    I'm checking my new theme using the theme-check plugin. However the settings page for the plugin is using the styling from my theme. I am checking for is_admin to decide whether to add my theme's stylesheet.

    This is the plugin's page that has my theme's style applied:
    wp-admin/themes.php?page=themecheck

    In my theme's function.php file I register my theme's style sheet with:

    wp_register_style( 'style' , get_stylesheet_directory_uri() . '/style.css', array( ), '1.0' );
    if ( ! is_admin() ) {
    	wp_enqueue_style( 'style' );
    }

    The question is why does the theme-check plugin page not respect is_admin() or is there a problem with how I am including my theme's style sheet. I realize I could add the stylesheet definition from header.php but that seems wrong.

    http://wordpress.org/extend/plugins/theme-check/

  2. Simon Prosser
    Theme Review Admin
    Plugin Author

    Posted 3 years ago #

    Yea its a bug ;) I will post a fix later today.

  3. Simon Prosser
    Theme Review Admin
    Plugin Author

    Posted 3 years ago #

    Sorry, it isnt a bug with the plugin. The css for theme-check is only loaded in the theme-check page.
    You must be loading your theme css wrong.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic