WordPress at a glance
function is not described

WP_Scripts::in_default_dir() public WP 2.8.0

Whether a handle's source is in a default directory.

{} It's a method of the class: WP_Scripts{}

No Hooks.

Return

true|false. True if found, false if not.

Usage

global $wp_scripts;
$wp_scripts->in_default_dir( $src );
$src(string) (required)
The source of the enqueued script.

Changelog

Since 2.8.0 Introduced.

Code of WP_Scripts::in_default_dir() WP 5.7.2

<?php
public function in_default_dir( $src ) {
	if ( ! $this->default_dirs ) {
		return true;
	}

	if ( 0 === strpos( $src, '/' . WPINC . '/js/l10n' ) ) {
		return false;
	}

	foreach ( (array) $this->default_dirs as $test ) {
		if ( 0 === strpos( $src, $test ) ) {
			return true;
		}
	}
	return false;
}