Skip to content

Commit bfefa0e

Browse files
committed
Allow filtering of group path
1 parent 48903e7 commit bfefa0e

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/Assets/Config.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,23 @@ public static function is_group_path_using_asset_directory_prefix( string $group
9696
* @return void
9797
*/
9898
public static function add_group_path( string $group_path_slug, string $root, string $relative, bool $is_using_asset_directory_prefix = false ): void {
99-
static::$group_paths[ $group_path_slug ] = [
100-
'root' => self::normalize_path( $root ),
101-
'relative' => trailingslashit( $relative ),
102-
'prefix' => $is_using_asset_directory_prefix,
103-
];
99+
/**
100+
* Allows for the group path to be filtered.
101+
*
102+
* @since 1.4.3
103+
*
104+
* @param array $group_path The group path data.
105+
* @param string $group_path_slug The slug of the group path.
106+
*/
107+
static::$group_paths[ $group_path_slug ] = apply_filters(
108+
'stellarwp/assets/group_path',
109+
[
110+
'root' => self::normalize_path( $root ),
111+
'relative' => trailingslashit( $relative ),
112+
'prefix' => $is_using_asset_directory_prefix,
113+
],
114+
$group_path_slug
115+
);
104116
}
105117

106118
/**

0 commit comments

Comments
 (0)