WP_Scripts::set_group( string $handle, bool $recursion, int|false $group = false )

Sets handle group.


Description

See also


Parameters

$handle

(string) (Required) Name of the item. Should be unique.

$recursion

(bool) (Required) Internal flag that calling function was called recursively.

$group

(int|false) (Optional) Group level: (int) level, (false) no groups.

Default value: false


Return

(bool) Not already in the group or a lower group


Source

File: wp-includes/class.wp-scripts.php

	public function set_group( $handle, $recursion, $group = false ) {
		if ( isset( $this->registered[$handle]->args ) && $this->registered[$handle]->args === 1 )
			$grp = 1;
		else
			$grp = (int) $this->get_data( $handle, 'group' );

		if ( false !== $group && $grp > $group )
			$grp = $group;

		return parent::set_group( $handle, $recursion, $grp );
	}


Changelog

Changelog
Version Description
WP-2.8.0 Introduced.