beans_uikit_dequeue_components

Dequeue UIkit components.

Dequeued components are removed from the UIkit compiler. Refer to UIkit 2 to learn more about the available components.

When development mode is enabled, files changes will automatically be detected. This makes it very easy to style UIkit themes using LESS.

This function must be called in the ‘beans_uikit_enqueue_scripts’ action hook.

beans_uikit_dequeue_components( string|array $components, string $type = 'core' )

Return: (void)

Parameters

NameTypeRequiredDefaultDescription
$componentsstring|arraytrue-Name of the component(s) to exclude as an indexed array. The name(s) must be the UIkit component filename without the extention (e.g. 'grid'). Set to true exclude all components.
$typestringfalse'core'Type of UIkit components ('core' or 'add-ons').

Source

function beans_uikit_dequeue_components( $components, $type = 'core' ) {

	global $_beans_uikit_enqueued_items;

	if ( true === $components ) {

		$uikit = new _Beans_Uikit;
		$components = $uikit->get_all_components( $type );

	}

	// Remove components.
	$_beans_uikit_enqueued_items['components'][ $type ] = array_diff( (array) $_beans_uikit_enqueued_items['components'][ $type ], (array) $components );

}