[ Index ]

WordPress Cross Reference

title

Body

[close]

/wp-includes/ -> class.wp-dependencies.php (summary)

(no description)

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

Defines 2 classes

WP_Dependencies:: (11 methods):
  do_items()
  do_item()
  all_deps()
  add()
  add_data()
  get_data()
  remove()
  enqueue()
  dequeue()
  query()
  set_group()

_WP_Dependency:: (2 methods):
  __construct()
  add_data()


Class: WP_Dependencies  - X-Ref

BackPress Scripts enqueue

Classes were refactored from the WP_Scripts and WordPress script enqueue API.

do_items( $handles = false, $group = false )   X-Ref
Process the items and dependencies.

Processes the items passed to it or the queue, and their dependencies.

param: mixed $handles Optional. Items to be processed: Process queue (false), process item (string), process items (array of strings).
param: mixed $group   Group level: level (int), no groups (false).
return: array Handles of items that have been processed.

do_item( $handle )   X-Ref
Process a dependency.

param: string $handle Name of the item. Should be unique.
return: bool True on success, false if not set.

all_deps( $handles, $recursion = false, $group = false )   X-Ref
Determine dependencies.

Recursively builds an array of items to process taking
dependencies into account. Does NOT catch infinite loops.

param: mixed $handles   Item handle and argument (string) or item handles and arguments (array of strings).
param: bool  $recursion Internal flag that function is calling itself.
param: mixed $group     Group level: (int) level, (false) no groups.
return: bool True on success, false on failure.

add( $handle, $src, $deps = array()   X-Ref
Register an item.

Registers the item if no item of that name already exists.

param: string $handle Unique item name.
param: string $src    The item url.
param: array  $deps   Optional. An array of item handle strings on which this item depends.
param: string $ver    Optional. Version (used for cache busting).
param: mixed  $args   Optional. Custom property of the item. NOT the class property $args. Examples: $media, $in_footer.
return: bool True on success, false on failure.

add_data( $handle, $key, $value )   X-Ref
Add extra item data.

Adds data to a registered item.

param: string $handle Name of the item. Should be unique.
param: string $key    The data key.
param: mixed  $value  The data value.
return: bool True on success, false on failure.

get_data( $handle, $key )   X-Ref
Get extra item data.

Gets data associated with a registered item.

param: string $handle Name of the item. Should be unique.
param: string $key    The data key.
return: mixed Extra item data (string), false otherwise.

remove( $handles )   X-Ref
Un-register an item or items.

param: mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).
return: void

enqueue( $handles )   X-Ref
Queue an item or items.

Decodes handles and arguments, then queues handles and stores
arguments in the class property $args. For example in extending
classes, $args is appended to the item url as a query string.
Note $args is NOT the $args property of items in the $registered array.

param: mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).

dequeue( $handles )   X-Ref
Dequeue an item or items.

Decodes handles and arguments, then dequeues handles
and removes arguments from the class property $args.

param: mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).

query( $handle, $list = 'registered' )   X-Ref
Query list for an item.

param: string $handle Name of the item. Should be unique.
param: string $list   Property name of list array.
return: bool Found, or object Item data.

set_group( $handle, $recursion, $group )   X-Ref
Set item group, unless already in a lower group.

param: string $handle    Name of the item. Should be unique.
param: bool   $recursion Internal flag that calling function was called recursively.
param: mixed  $group     Group level.
return: bool Not already in the group or a lower group

Class: _WP_Dependency  - X-Ref

Class _WP_Dependency

Helper class to register a handle and associated data.

__construct()   X-Ref
Setup dependencies.


add_data( $name, $data )   X-Ref
Add handle data.

param: string $name The data key to add.
param: mixed  $data The data value to add.
return: bool False if not scalar, true otherwise.



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