pfeifferNet

assets.php

Manage child theme scripts and styles.

Tags
since
5.9.0
copyright

2024 Keith Pfeiffer

Table of Contents

Functions

register_styles()  : void
Register styles.
enqueue_assets()  : void
Enqueue the scripts and styles.
disable_child_theme_load()  : bool
Prevent generatepress from loading child theme stylesheet.
get_asset_version()  : string
Return the version.

Functions

register_styles()

Register styles.

register_styles() : void

The asset must start with a leading slash. It is relative to the assets directory.

Tags
since
6.0.0

enqueue_assets()

Enqueue the scripts and styles.

enqueue_assets() : void
Tags
since
5.9.0
since
6.0.0

Handling of dependencies and enqueue order moved to other functions.

disable_child_theme_load()

Prevent generatepress from loading child theme stylesheet.

disable_child_theme_load() : bool

The stylesheet will have dependencies added and enqueued late in loadng process,

Tags
since
6.0.0
Return values
bool

get_asset_version()

Return the version.

get_asset_version(string $asset_path) : string
Parameters
$asset_path : string

The fully qualified asset path.

Tags
since
5.9.0
since
6.0.0

Parameter changed to require the full path.

uses
get_theme_metadata()
Return values
string

The resource version.


        
On this page

Search results