Make WordPress Core

Changeset 7994


Ignore:
Timestamp:
05/25/2008 09:23:22 PM (17 years ago)
Author:
ryan
Message:

inline docs for wp_admin_css(). Props mdawaffe. see #7033

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r7981 r7994  
    11281128}
    11291129
     1130/**
     1131 * wp_admin_css_uri() - Outputs the URL of a WordPress admin CSS file
     1132 *
     1133 * @see WP_Styles::_css_href and its style_loader_src filter.
     1134 *
     1135 * @param string $file file relative to wp-admin/ without its ".css" extension.
     1136 */
     1137
    11301138function wp_admin_css_uri( $file = 'wp-admin' ) {
    11311139    if ( defined('WP_INSTALLING') ) {
     
    11391147}
    11401148
     1149/**
     1150 * wp_admin_css() - Enqueues or directly prints a stylesheet link to the specified CSS file.
     1151 *
     1152 * "Intelligently" decides to enqueue or to print the CSS file.
     1153 * If the wp_print_styles action has *not* yet been called, the CSS file will be enqueued.
     1154 * If the wp_print_styles action *has* been called, the CSS link will be printed.
     1155 * Printing may be forced by passing TRUE as the $force_echo (second) parameter.
     1156 *
     1157 * For backward compatibility with WordPress 2.3 calling method:
     1158 * If the $file (first) parameter does not correspond to a registered CSS file, we assume $file is a
     1159 * file relative to wp-admin/ without its ".css" extension.  A stylesheet link to that generated URL is printed.
     1160 *
     1161 * @package WordPress
     1162 * @since 2.3
     1163 *
     1164 * @uses $wp_styles WordPress Styles Object
     1165 *
     1166 * @param string $file Style handle name or file name (without ".css" extension) relative to wp-admin/
     1167 * @param bool $force_echo Optional.  Force the stylesheet link to be printed rather than enqueued.
     1168 */
     1169
    11411170function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
    11421171    global $wp_styles;
     
    11441173        $wp_styles = new WP_Styles();
    11451174
     1175    // For backward compatibility
    11461176    $handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file;
    11471177
Note: See TracChangeset for help on using the changeset viewer.