public static function add( $type, $data = [] ) {

		$is_admin = is_admin();

		if ( self::validate( $type, $data, $is_admin ) ) {

			$hook = $is_admin ? 'admin_enqueue_scripts' : 'wp_enqueue_scripts';

			$method = __CLASS__ . "::add_{$type}s";

			if ( has_action( $hook, $method ) === false ) {
				add_action( $hook, $method );
			}

			return true;
		}

		return false;
	}
public static function add( $type, $data = [] ) {

		$is_admin = is_admin();

		if ( self::validate( $type, $data, $is_admin ) ) {

			$hook = $is_admin ? 'admin_enqueue_scripts' : 'wp_enqueue_scripts';

			$method = __CLASS__ . "::add_{$type}s";

			if ( has_action( $hook, $method ) === false ) {
				add_action( $hook, $method );
			}

			return true;
		}

		return false;
	}
public static function add ( $ type , $ data = [ ] ) { $ is_admin = is_admin ( ) ; if ( self :: validate ( $ type , $ data , $ is_admin ) ) { $ hook = $ is_admin ? 'admin_enqueue_scripts' : 'wp_enqueue_scripts' ; $ method = __CLASS__ . "::add_{$type}s" ; if ( has_action ( $ hook , $ method ) === false ) { add_action ( $ hook , $ method ) ; } return true ; } return false ; }
Add scripts or styles.

@param string $type → script|style.
@param array  $data → settings.

@see https://github.com/Josantonius/WP_Register#add

@return boolean
Add scripts or styles .