Changes between Initial Version and Version 1 of Ticket #59018, comment 22
- Timestamp:
- 08/23/2023 08:05:08 PM (16 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #59018, comment 22
initial v1 1 1 Looking at this more: seems adding a trailing slash would make it work (somehow) for now. Not a fan of this solution but then there seems to be some "pretty unusual" code there (not really sure what is the intent for this use of substr_replace: `substr_replace( $script_path, '.asset.php', - strlen( '.js' ) )`, why the negative index and why do `strlen()` of a hard-coded string). 2 2 3 Thinking the `trailingslashit()` would be better applied to `$template_path_norm` and `$ template_path_norm`, not just when comparing the paths. Later on when construction the script/stylesheet URL `get_theme_file_uri()` removes slashes from the beginning of the fragment anyways.3 Thinking the `trailingslashit()` would be better applied to `$template_path_norm` and `$stylesheet_path_norm`, not just when comparing the paths. Later on when construction the script/stylesheet URL `get_theme_file_uri()` removes slashes from the beginning of the fragment anyways.