/includes/functions.wp-styles.php

Description

BackPress styles procedural API.

  • since: r79
Functions
wp_deregister_style (line 69)

Remove a registered CSS file.

  • see: WP_Styles::remove() For additional information.
  • since: r79
void wp_deregister_style (string $handle)
  • string $handle: Name of the stylesheet.
wp_enqueue_style (line 96)

Enqueue a CSS style file.

Registers the style if src provided (does NOT overwrite) and enqueues.

void wp_enqueue_style (string $handle, [string|bool $src = false], [array $deps = array()], [string|bool $ver = false], [string $media = false])
  • string $handle: Name of the stylesheet.
  • string|bool $src: Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
  • array $deps: Array of handles (names) of any stylesheet that this stylesheet depends on. (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
  • string|bool $ver: String specifying the stylesheet version number, if it has one. This parameter is used to ensure that the correct version is sent to the client regardless of caching, and so should be included if a version number is available and makes sense for the stylesheet.
  • string $media: The media for which this stylesheet has been defined.
wp_print_styles (line 20)

Display styles that are in the queue or part of $handles.

  • return: True on success, false on failure.
  • since: r79
  • uses: do_action() - Calls 'wp_print_styles' hook.
bool wp_print_styles ([array|bool $handles = false])
  • 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.
wp_register_style (line 52)

Register CSS style file.

void wp_register_style (string $handle, string|bool $src, [array $deps = array()], [string|bool $ver = false], [string $media = 'all'])
  • string $handle: Name of the stylesheet.
  • string|bool $src: Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
  • array $deps: Array of handles of any stylesheet that this stylesheet depends on. (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
  • string|bool $ver: String specifying the stylesheet version number. Set to NULL to disable. Used to ensure that the correct version is sent to the client regardless of caching.
  • string $media: The media for which this stylesheet has been defined.
wp_style_is (line 120)

Check whether style has been added to WordPress Styles.

The values for list defaults to 'queue', which is the same as wp_enqueue_style().

  • return: True on success, false on failure.
  • since: WP unknown; BP unknown
bool wp_style_is (string $handle, [string $list = 'queue'])
  • string $handle: Name of the stylesheet.
  • string $list: Values are 'registered', 'done', 'queue' and 'to_do'.

Documentation generated on Fri, 18 May 2012 01:34:01 +0100 by phpDocumentor 1.4.3