-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Issue: Automatically load CSS and JS files from the assets folder based on theme hierarchy and plugin activation
Description:
All CSS and JS files located in the assets folder must be automatically loaded for both parent and child themes. The logic should handle the following cases: plugin-specific assets, RTL styles, and ensure proper handling based on theme hierarchy.
Requirements:
-
Automatic Loading of Assets:
- All CSS and JS files located in the
assetsfolder must be automatically loaded without manual inclusion.
- All CSS and JS files located in the
-
Plugin-Specific Assets:
- If files are inside the
assets/plugins/folder, they should be loaded only if the corresponding plugin is active. - Check if the plugin is active using its folder and file name (e.g.,
assets/plugins/plugin-name/).
- If files are inside the
-
CSS RTL Logic:
- If the site is RTL (
is_rtl()), automatically load only CSS files ending in-rtl.css. - If the site is not RTL, automatically load standard CSS files (excluding
-rtl.css).
- If the site is RTL (
-
Parent and Child Theme Hierarchy:
- For Parent Themes: Automatically load assets using
filename.asset.phpwhen available. - For Child Themes: Prefer
asset.phpfor loading. Ifasset.phpis not available, automatically fallback to loadingfilename.cssdirectly.
- For Parent Themes: Automatically load assets using
Expected Outcome:
- All CSS and JS files located in the
assetsfolder are automatically loaded according to the specified logic, with correct RTL or straight versions, plugin activation, and respect to theme hierarchy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels