cbach-wp-gridster icon indicating copy to clipboard operation
cbach-wp-gridster copied to clipboard

Replace GRIDSTER_FRONTEND_CSS with add_theme_support()

Open thefuxia opened this issue 11 years ago • 0 comments

Keep the global namespace clean, use the built-in API instead.

Themes should register their support with:

add_theme_support( 
    'gridster',
    array(
        'front_stylesheet' => get_stylesheet_directory_uri() . '/gridster.css'
    )
);

The plugin should check that with:

$theme_support = get_theme_support( 'gridster' );

if ( ! empty ( $theme_support['front_stylesheet'] ) )
    wp_enqueue_style( 'gridster_front', $theme_support['front_stylesheet'] );
else
    // enqueue the plugin stylesheet

thefuxia avatar Apr 29 '13 02:04 thefuxia