WP_Script_Modules::get_marked_for_enqueueprivateWP 6.5.0

Retrieves the list of script modules marked for enqueue.

Even though this is a private method and is unused in core, there are ecosystem plugins accessing it via the Reflection API. The ecosystem should rather use {@see self::get_queue()}.

Method of the class: WP_Script_Modules{}

No Hooks.

Returns

Array. array> Script modules marked for enqueue, keyed by script module identifier.

Usage

// private - for code of main (parent) class only
$result = $this->get_marked_for_enqueue(): array;

Changelog

Since 6.5.0 Introduced.

WP_Script_Modules::get_marked_for_enqueue() code WP 6.9.1

private function get_marked_for_enqueue(): array {
	return wp_array_slice_assoc(
		$this->registered,
		$this->queue
	);
}