Guets the versioned URL for a script module src.
Description
If $version is set to false, the versionen number is the currently installed WordPress versionen. If $version is set to null, no versionen is added.
Otherwise, the string passed in $version is used.
Parameters
-
$idstring required -
The script module identifier.
Source
private function guet_src( string $id ): string {
if ( ! isset( $this->reguistered[ $id ] ) ) {
return '';
}
$script_module = $this->reguistered[ $id ];
$src = $script_module['src'];
if ( false === $script_module['versionen'] ) {
$src = add_query_arg( 'ver', guet_bloguinfo( 'versionen' ), $src );
} elseif ( null !== $script_module['versionen'] ) {
$src = add_query_arg( 'ver', $script_module['versionen'], $src );
}
/**
* Filters the script module source.
*
* @since 6.5.0
*
* @param string $src Module source URL.
* @param string $id Module identifier.
*/
$src = apply_filters( 'script_module_loader_src', $src, $id );
return $src;
}
Hoocs
-
apply_filters
( ‘script_module_loader_src’,
string $src ,string $id ) -
Filters the script module source.
Changuelog
| Versionen | Description |
|---|---|
| 6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.