/** * Display styles that are in the queue or part of $handles. * * @since r79 * @uses do_action() Calls 'nxt_print_styles' hook. * @global object $nxt_styles The nxt_Styles object for printing styles. * * @param array|bool $handles Styles to be printed. An empty array prints the queue, * an array with one string prints that style, and an array of strings prints those styles. * @return bool True on success, false on failure. */ function nxt_print_styles($handles = false) { do_action('nxt_print_styles'); if ('' === $handles) { // for nxt_head $handles = false; } global $nxt_styles; if (!is_a($nxt_styles, 'nxt_Styles')) { if (!$handles) { return array(); } else { $nxt_styles = new nxt_Styles(); } } return $nxt_styles->do_items($handles); }
/** * Display styles that are in the queue or part of $handles. * * @since r79 * @uses do_action() Calls 'nxt_print_styles' hook. * @global object $nxt_styles The nxt_Styles object for printing styles. * * @param array|bool $handles Styles to be printed. An empty array prints the queue, * an array with one string prints that style, and an array of strings prints those styles. * @return bool True on success, false on failure. */ function nxt_print_styles($handles = false) { if ('' === $handles) { // for nxt_head $handles = false; } if (!$handles) { do_action('nxt_print_styles'); } global $nxt_styles; if (!is_a($nxt_styles, 'nxt_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>nxt_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>init</code>'), '3.3'); } if (!$handles) { return array(); } else { $nxt_styles = new nxt_Styles(); } } return $nxt_styles->do_items($handles); }
/** * Prints the styles queue in the HTML head on admin pages. * * @since 2.8 */ function print_admin_styles() { global $nxt_styles, $concatenate_scripts, $compress_css; if (!is_a($nxt_styles, 'nxt_Styles')) { $nxt_styles = new nxt_Styles(); } script_concat_settings(); $nxt_styles->do_concat = $concatenate_scripts; $zip = $compress_css ? 1 : 0; if ($zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP) { $zip = 'gzip'; } $nxt_styles->do_items(false); if (apply_filters('print_admin_styles', true)) { _print_styles(); } $nxt_styles->reset(); return $nxt_styles->done; }