from_location() публичный статический Метод

Returns a new style object, instantiated according to the given arguments.
С версии: 3.0.0
public static from_location ( string $handle, AssetLocation $location, array $dependencies = [], string | null $version = '', string $media = 'all' ) : static
$handle string The handle.
$location AssetLocation Location object.
$dependencies array Optional. The dependencies. Defaults to empty array.
$version string | null Optional. Version of the file. Defaults to empty string.
$media string Optional. Style media data. Defaults to 'all'.
Результат static Style object.
Пример #1
0
 /**
  * Returns a new style object, instantiated according to the given arguments.
  *
  * @since 3.0.0
  *
  * @param string      $handle       The handle.
  * @param string      $file         File name.
  * @param string[]    $dependencies Optional. The dependencies.
  * @param string|null $version      Optional. Version of the file. Defaults to empty string.
  * @param string      $media        Optional. Style media data. Defaults to 'all'.
  *
  * @return Style Style object.
  */
 public function create_internal_style($handle, $file, array $dependencies = [], $version = '', $media = 'all')
 {
     return DebugAwareStyle::from_location($handle, new AssetLocation($file, $this->internal_style_path, $this->internal_style_url), $dependencies, $version, $media);
 }