wp_enqueue_style [ WordPress Function ]
wp_enqueue_style ( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' )
| Parameters: |
|
| Links: |
|
| See: |
|
| Defined at: |
|
Soorgelijke functies: wp_dequeue_style, wp_enqueue_script, wp_enqueue_scripts, wp_dequeue_script, wp_deregister_style
Enqueue a CSS style file.
Registers the style if src provided (does NOT overwrite) and enqueues.
Source
<?php
function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
global $wp_styles;
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
if ( ! did_action( 'init' ) )
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
'<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>init</code>' ), '3.3' );
$wp_styles = new WP_Styles();
}
if ( $src ) {
$_handle = explode('?', $handle);
$wp_styles->add( $_handle[0], $src, $deps, $ver, $media );
}
$wp_styles->enqueue( $handle );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_enqueue_style - WordPress Codex
Usage. wp_enqueue_style( $handle, $src, $deps, $ver, $media ); ... ( 'prefix-style' , plugins_url('style.css', __FILE__) ); wp_enqueue_style( 'prefix-style' ); } ?> ...
codex.wordpress.org - php - How to use wp_enqueue_style() in my WordPress theme ...
I am building out my first WordPress site for a client. I really want to ... Not quite, but almost. What you want to do is place a function in ...
stackoverflow.com - Wp_enqueue_style | Wptuts+
May 12, 2012 ... As many stated before me: “A good WordPress citizen only loads their files where they're needed”. This principle applies both to front-end and ...
wp.tutsplus.com - Loading Custom Stylesheets with wp_enqueue_style | ButlerBlog
Feb 20, 2012 ... While the concepts outlined here are more specific to loading custom styles for the WP-Members™ plugin, the WP functions discussed can be ...
butlerblog.com
Gebruikersdiscussies [ wordpress.org ]
- joesnellpdx on "wp_enqueue_style() automattic _s responsive"
- another-webmaster on "[Plugin: WordPress Admin Bar Improved] Debug shows following"
- Donald Gilbert on "[Plugin: WordPress Admin Bar Improved] Debug shows following"
- another-webmaster on "[Plugin: WordPress Admin Bar Improved] Debug shows following"
- armagri on "Major trouble with 3.3 update, can't access wp-admin"
- anamika_wp on "3.3 upgrade error wp_enqueue_style"
- Donald Gilbert on "[Plugin: WordPress Admin Bar Improved] Debug shows following"
- another-webmaster on "[Plugin: WordPress Admin Bar Improved] Debug shows following"
- creariz on "wp_enqueue_scripts for stylesheets not working"
- James Edmonston on "wp_enqueue_scripts for stylesheets not working"