cbach-wp-gridster
cbach-wp-gridster copied to clipboard
Replace GRIDSTER_FRONTEND_CSS with add_theme_support()
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