* properly handle non-IE conditional comments. * EXCEPT for IE, then you would HAVE to check the $is_IE global since WordPress doesn't have a way to
If you are trying to load a stylesheet for all browsers * calling the wp_enqueue_style() function. * NOTE: It is also possible to just check and see if the $is_IE global in WordPress is set to true before * Load our IE-only stylesheet for all versions of IE: Wp_enqueue_style( 'my-theme', get_stylesheet_uri() )
Wp_enqueue_style( 'wpdocsPluginStylesheet' ) Įxpand full source code Collapse full source code Log in to add feedbackĪdd_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ) Default styles that are loaded via WordPress Core can be discerned via the source code on the default styles page.įile: wp-includes/įunction wp_enqueue_style( $handle, $src = '', $deps = array(), $ver = false, $media = 'all' ) ", 'wpdocs_plugin_admin_styles' ).If you are going to use some jQuery UI features you might have to provide your own CSS file: WordPress core does not have a full jQuery UI theme!.Wp_enqueue_style( $handle, $src, $deps, $ver, $media ) Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.Ī safe way to add/enqueue a stylesheet file to the WordPress generated page. ( string) (Optional) The media for which this stylesheet has been defined. If version is set to false, a version number is automatically added equal to current installed WordPress version. ( string| bool| null) (Optional) String specifying stylesheet version number, if it has one, which is added to the URL as a query string for cache busting purposes. ( string) (Optional) An array of registered stylesheet handles this stylesheet depends on. wpenqueuestyle usage inside of the theme or the plugin: wpenqueuestyle( my-style, gettemplatedirectoryuri(). ( string) (Optional) Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. ( string) (Required) Name of the stylesheet. Registers the style if source provided (does NOT overwrite) and enqueues.