[ Index ]

WordPress Cross Reference

title

Body

[close]

/wp-includes/ -> functions.wp-styles.php (summary)

BackPress Styles Procedural API

File Size: 245 lines (10 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  wp_print_styles()
  wp_add_inline_style()
  wp_register_style()
  wp_deregister_style()
  wp_enqueue_style()
  wp_dequeue_style()
  wp_style_is()
  wp_style_add_data()

Functions
Functions that are not part of a class:

wp_print_styles( $handles = false )   X-Ref
Display styles that are in the $handles queue.

Passing an empty array to $handles prints the queue,
passing an array with one string prints that style,
and passing an array of strings prints those styles.

param: array|bool $handles Styles to be printed. Default 'false'.
return: array On success, a processed array of WP_Dependencies items; otherwise, an empty array.

wp_add_inline_style( $handle, $data )   X-Ref
Add extra CSS styles to a registered stylesheet.

Styles will only be added if the stylesheet in already in the queue.
Accepts a string $data containing the CSS. If two or more CSS code blocks
are added to the same stylesheet $handle, they will be printed in the order
they were added, i.e. the latter added styles can redeclare the previous.

param: string $handle Name of the stylesheet to add the extra styles to. Must be lowercase.
param: string $data   String containing the CSS styles to be added.
return: bool True on success, false on failure.

wp_register_style( $handle, $src, $deps = array()   X-Ref
Register a CSS stylesheet.

param: string      $handle Name of the stylesheet.
param: string|bool $src    Path to the stylesheet from the WordPress root directory. Example: '/css/mystyle.css'.
param: array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
param: string|bool $ver    String specifying the stylesheet version number. Used to ensure that the correct version
param: string      $media  Optional. The media for which this stylesheet has been defined.

wp_deregister_style( $handle )   X-Ref
Remove a registered stylesheet.

param: string $handle Name of the stylesheet to be removed.

wp_enqueue_style( $handle, $src = false, $deps = array()   X-Ref
Enqueue a CSS stylesheet.

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

param: string      $handle Name of the stylesheet.
param: string|bool $src    Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
param: array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
param: string|bool $ver    String specifying the stylesheet version number, if it has one. This parameter is used
param: string      $media  Optional. The media for which this stylesheet has been defined.

wp_dequeue_style( $handle )   X-Ref
Remove a previously enqueued CSS stylesheet.

param: string $handle Name of the stylesheet to be removed.

wp_style_is( $handle, $list = 'enqueued' )   X-Ref
Check whether a CSS stylesheet has been added to the queue.

param: string $handle Name of the stylesheet.
param: string $list   Optional. Status of the stylesheet to check. Default 'enqueued'.
return: bool Whether style is queued.

wp_style_add_data( $handle, $key, $value )   X-Ref
Add metadata to a CSS stylesheet.

Works only if the stylesheet has already been added.

Possible values for $key and $value:
'conditional' string      Comments for IE 6, lte IE 7 etc.
'rtl'         bool|string To declare an RTL stylesheet.
'suffix'      string      Optional suffix, used in combination with RTL.
'alt'         bool        For rel="alternate stylesheet".
'title'       string      For preferred/alternate stylesheets.

param: string $handle Name of the stylesheet.
param: string $key    Name of data point for which we're storing a value.
param: mixed  $data   String containing the CSS data to be added.
return: bool True on success, false on failure.



Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu