wp_enqueue_style built in styles

I’m writing (rewriting) my plugin to use

wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-dialog');

Which is great!

But to use the dialog I need to load a jquery style sheet with wp_enqueue_style, is there a way to load a built-in style, similar to the way you can load the built in scripts (as seen above)? Or do I need to make a call to an external resource?

Solutions Collecting From Web of "wp_enqueue_style built in styles"

I’m a little confused by your question, can you not simply use wp_enqueue_style, which you actually wrote into this threads heading(not sure if you know the function exists or not).

wp_enqueue_style works in the same way as the wp_enqueue_script counterpart, but of course as you’d expect, enqueues stylesheets..

Here’s a list of the enqueues i was able to find in WordPress core(those you can use without needing to register them or declare paths to).

wp_enqueue_style( 'global' );
wp_enqueue_style( 'wp-admin' );
wp_enqueue_style( 'colors' );
wp_enqueue_style( 'media' );
wp_enqueue_style( 'ie' );
wp_enqueue_style( 'imgareaselect' );
wp_enqueue_style( 'imgareaselect' );
wp_enqueue_style( 'plugin-install' );
wp_enqueue_style( 'press-this' );
wp_enqueue_style( 'press-this-ie');
wp_enqueue_style( 'colors' );
wp_enqueue_style( 'theme-install' );
wp_enqueue_style( 'thickbox' );

Beyond those above you’ll need to declare the path inside the enqueue(because it’s not a registered style), as you would for scripts..

wp_enqueue_style( 'myPluginStylesheet', WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );

Or register the style..

wp_register_style( 'myPluginStylesheet', WP_PLUGIN_URL . '/myPlugin/stylesheet.css' );

..then call it when needed..

wp_enqueue_style( 'myPluginStylesheet' );

If you’re using this on one plugin page, the registration part is a little pointless, and it’s probably easier to declare the path straight inside the enqueue.. (you really only need register a script or style if it’s going to be called in more than one place).

Hope that’s the information you’re looking for… 😉