I have added my dynamically generated stylesheet by this way.
add_action( 'parse_request', 'my_custom_wp_request' );
function my_custom_wp_request( $wp ) {
if (
!empty( $_GET['my-custom-content'] )
&& $_GET['my-custom-content'] == 'css'
) {
# get theme options
header( 'Content-Type: text/css' );
require dirname( __FILE__ ) . '/css/style-options.php';
exit;
}
}
And to hook into theme I did
function my_login_css() {
?>
<link rel='stylesheet' type='text/css' href="<?php bloginfo( 'url' ); ?>/?my-custom-content=css" />
<?
}
add_action('wp_footer', 'my_login_css');
My question: Is there any way to hook stylesheet other than this old fashioned way, like wp_register_style
or wp_enqueue_style
?