Registers some assets from public available CDNs: ajax.googleapis.com cdnjs.cloudflare.com cdn.jsdelivr.net

author etessore
since 1.0
package classes
version 1.0.1

 Methods

__construct()

__construct() 
Inherited
inherited_from \DefaultAssets::__construct()

Adds a css to the current set

add_css(string $handle, string | bool $src, array $deps, string | bool $ver, string $media) : \DefaultAssets
Inherited
see http://codex.wordpress.org/Function_Reference/wp_register_style
inherited_from \DefaultAssets::add_css()

Parameters

$handle

string

Name of the stylesheet.

$src

stringbool

Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.

$deps

array

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.

$ver

stringbool

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.

$media

string

The media for which this stylesheet has been defined.

Returns

\DefaultAssets$this for chainability

Adds a javascript to the current set

add_js(string $handle, string $src, array $deps, string | bool $ver, bool $in_footer) : \DefaultAssets
Inherited
see http://codex.wordpress.org/Function_Reference/wp_register_script
inherited_from \DefaultAssets::add_js()

Parameters

$handle

string

Script name

$src

string

Script url

$deps

array

(optional) Array of script names on which this script depends

$ver

stringbool

(optional) Script version (used for cache busting), set to NULL to disable

$in_footer

bool

(optional) Whether to enqueue the script before or before

Returns

\DefaultAssets$this for chainability

register_custom()

register_custom() 
Inherited
inherited_from \DefaultAssets::register_custom()

(non-PHPdoc)

register_standard() 

Register some jQuery UI themes from code.jquery.com CDN

register_jqueryui_themes(array $themes) : \DefaultAssetsCDN

Parameters

$themes

array

list of theme names

Returns

\DefaultAssetsCDN$this for chainability

Registers some Google Webfonts

register_webfonts(array $fonts) : \DefaultAssetsCDN

Parameters

$fonts

array

list of font names

Returns

\DefaultAssetsCDN$this for chainability

 Properties

 

$assets_manager 
Inherited
inherited_from \DefaultAssets::$$assets_manager