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()}.

Метод класса: WP_Script_Modules{}

Хуков нет.

Возвращает

Массив<Строку,. array> Script modules marked for enqueue, keyed by script module identifier.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_marked_for_enqueue(): array;

Список изменений

С версии 6.5.0 Введена.

Код WP_Script_Modules::get_marked_for_enqueue() WP 6.9.1

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