Function __global->_css_tempcode

Definitions

sources/web_resources.php

  • Get Tempcode to tie in (to the HTML, in <head>) for an individual CSS file.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$c ID_TEXT No No required parameter N/A N/A The CSS file required
&$css Tempcode Yes No required parameter N/A N/A Main Tempcode object (will be written into if appropriate)
&$css_need_inline Tempcode Yes No required parameter N/A N/A Inline Tempcode object (will be written into if appropriate)
$inline boolean No No False N/A N/A Only do global CSS
$context ?string No No Null N/A N/A HTML context for which we filter (minimise) any CSS we spit out as inline (null: none)
$theme ?ID_TEXT No No Null N/A N/A The name of the theme (null: current theme) (null: from what is cached)
$_seed ?ID_TEXT No No Null N/A N/A The seed colour (null: previous cached) (blank: none) (null: from what is cached)
$_minify ?boolean No No Null N/A N/A Whether minifying (null: from what is cached)
$_https ?boolean No No Null N/A N/A Whether doing HTTPS (null: from what is cached)
$_mobile ?boolean No No Null N/A N/A Whether operating in mobile mode (null: from what is cached)
$do_enforce boolean No No True N/A N/A Whether to generate the cached file if not already cached

Preview

Code (PHP)

/**
 * Get Tempcode to tie in (to the HTML, in <head>) for an individual CSS file.
 *
 * @param  ID_TEXT $c The CSS file required
 * @param  Tempcode $css Main Tempcode object (will be written into if appropriate)
 * @param  Tempcode $css_need_inline Inline Tempcode object (will be written into if appropriate)
 * @param  boolean $inline Only do global CSS
 * @param  ?string $context HTML context for which we filter (minimise) any CSS we spit out as inline (null: none)
 * @param  ?ID_TEXT $theme The name of the theme (null: current theme) (null: from what is cached)
 * @param  ?ID_TEXT $_seed The seed colour (null: previous cached) (blank: none) (null: from what is cached)
 * @param  ?boolean $_minify Whether minifying (null: from what is cached)
 * @param  ?boolean $_https Whether doing HTTPS (null: from what is cached)
 * @param  ?boolean $_mobile Whether operating in mobile mode (null: from what is cached)
 * @param  boolean $do_enforce Whether to generate the cached file if not already cached
 */

function _css_tempcode(string $c, object &$css, object &$css_need_inline, bool $inline = false, ?string $context = null, ?string $theme = null, ?string $_seed = null, ?bool $_minify = null, ?bool $_https = null, ?bool $_mobile = null, bool $do_enforce = true)