wp_register_style [ WordPress Function ]
wp_register_style ( $handle, $src, $deps = array(), $ver = false, $media = 'all' )
| Parameters: |
|
| Links: |
|
| See: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_deregister_style, wp_register_script, wp_register, wp_deregister_script, wp_print_styles
Register CSS style file.
Source
<?php
function wp_register_style( $handle, $src, $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();
}
$wp_styles->add( $handle, $src, $deps, $ver, $media );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/wp register style « WordPress Codex
<?php wp_register_style( $handle, $src, $deps, $ver, $media ) ?> Use the wp_enqueue_scripts action to call this function. Calling it outside of an action can ...
codex.wordpress.org - WordPress › Support » Tags — wp_register_style
(forgot?) Register · WordPress › Support » wp_register_style. Tag: wp_register_style Add New » ... wp_register_style conditional comments, 2, xdissent, 2 years ...
wordpress.org - Function Reference/wp enqueue style « WordPress Codex
Description. A safe way to add/enqueue a CSS style file to the wordpress generated page. If it was first registered with wp_register_style() it can now be added ...
codex.wordpress.org - wp_register_style - Kuttler
How to minify WordPress theme stylesheets properly. If you build WordPress theme you'll eventually come to the point where you want to minify the stylesheets.
kuttler.eu
Kullanýcý Tartýþmalarý [ wordpress.org ]
- craigglenn on "Having trouble adding my plugin css"
- creariz on "wp_enqueue_scripts for stylesheets not working"
- James Edmonston on "wp_enqueue_scripts for stylesheets not working"
- creariz on "wp_enqueue_scripts for stylesheets not working"
- skycrew on "Use wp_enqueue_style based on user option in widget"
- xdissent on "wp_register_style conditional comments"
- spstieng on "wp_register_style() not working for me"
- dodo on "wp_register_style() not working for me"
- spstieng on "wp_register_style() not working for me"
- tomontoast on "wp_register_style() not working for me"