wp_style_loader_src [ WordPress Function ]
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Administration Screen CSS for changing the styles.
If installing the 'wp-admin/' directory will be replaced with './'.
The $_wp_admin_css_colors global manages the Administration Screens CSS stylesheet that is loaded. The option that is set is 'admin_color' and is the color and key for the array. The value for the color key is an object with a 'url' parameter that has the URL path to the CSS file.
The query from $src parameter will be appended to the URL that is given from the $_wp_admin_css_colors array value URL.
Source
<?php
function wp_style_loader_src( $src, $handle ) {
if ( defined('WP_INSTALLING') )
return preg_replace( '#^wp-admin/#', './', $src );
if ( 'colors' == $handle || 'colors-rtl' == $handle ) {
global $_wp_admin_css_colors;
$color = get_user_option('admin_color');
if ( empty($color) || !isset($_wp_admin_css_colors[$color]) )
$color = 'fresh';
$color = $_wp_admin_css_colors[$color];
$parsed = parse_url( $src );
$url = $color->url;
if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG )
$url = preg_replace('/.css$|.css(?=\?)/', '.dev.css', $url);
if ( isset($parsed['query']) && $parsed['query'] ) {
wp_parse_str( $parsed['query'], $qv );
$url = add_query_arg( $qv, $url );
}
return $url;
}
return $src;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_style_loader_src() WordPress function reference, arguments ...
Administration Screen CSS for changing the styles.
queryposts.com - PHPXref.com - WordPress 3.0.1 - Detail view of script-loader.php
Aug 19, 2010 ... wp_just_in_time_script_localization() wp_style_loader_src() print_head_scripts() print_footer_scripts() _print_scripts() wp_print_head_scripts() ...
phpxref.com - WordPress › Support » 'colors' meta-css src (boolean) generates ...
... src value http://localhost:450001, which leads to errors later in wp_style_loader_src when this temporary url is stripped (by parse_url) to create the actual url.
wordpress.org - A HitchHackers guide through WordPress | Category Archive | /wp ...
Dec 13, 2011 ... wp_style_loader_src. February 12, 2011 by Thorsten 0 Comments. Administration Screen CSS for changing the styles.If installing the ...
hitchhackerguide.com