PHP Class Kirki_Helper, kirki

Datei anzeigen Open project: aristath/kirki Class Usage Examples

Public Methods

Method Description
array_replace_recursive ( array $array, array $array1 ) : mixed Recursive replace in arrays.
get_dashicons ( ) : array Get an array of all available dashicons.
get_image_from_url ( string $url ) : array Returns an array of the attachment's properties.
get_image_id ( string $url ) : integer | string Returns the attachment object
get_material_design_colors ( false | string $context = false ) : array Gets an array of material-design colors.
get_post_types ( ) : array Get an array of publicly-querable post-types.
get_posts ( array $args ) : array Get an array of posts.
get_taxonomies ( ) : array Get an array of publicly-querable taxonomies.
get_terms ( string | array $taxonomies ) : array Get an array of terms from a taxonomy
init_filesystem ( ) Initialize the WP_Filesystem
recurse ( array $array, array $array1 ) : array Helper method to be used from the array_replace_recursive method.

Method Details

array_replace_recursive() public static method

Recursive replace in arrays.
public static array_replace_recursive ( array $array, array $array1 ) : mixed
$array array The first array.
$array1 array The second array.
return mixed

get_dashicons() public static method

Get an array of all available dashicons.
public static get_dashicons ( ) : array
return array

get_image_from_url() public static method

Returns an array of the attachment's properties.
public static get_image_from_url ( string $url ) : array
$url string URL to the image.
return array

get_image_id() public static method

Returns the attachment object
public static get_image_id ( string $url ) : integer | string
$url string URL to the image.
return integer | string Numeric ID of the attachement.

get_material_design_colors() public static method

Gets an array of material-design colors.
public static get_material_design_colors ( false | string $context = false ) : array
$context false | string Allows us to get subsets of the palette.
return array

get_post_types() public static method

Get an array of publicly-querable post-types.
public static get_post_types ( ) : array
return array

get_posts() public static method

Get an array of posts.
public static get_posts ( array $args ) : array
$args array Define arguments for the get_posts function.
return array

get_taxonomies() public static method

Get an array of publicly-querable taxonomies.
public static get_taxonomies ( ) : array
return array

get_terms() public static method

Get an array of terms from a taxonomy
public static get_terms ( string | array $taxonomies ) : array
$taxonomies string | array See https://developer.wordpress.org/reference/functions/get_terms/ for details.
return array

init_filesystem() public static method

Initialize the WP_Filesystem
public static init_filesystem ( )

recurse() public static method

Helper method to be used from the array_replace_recursive method.
public static recurse ( array $array, array $array1 ) : array
$array array The first array.
$array1 array The second array.
return array