Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use get_asset_info to get dependencies and version of script file for wp_enqueue_script function #608

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

ravinderk
Copy link
Contributor

@ravinderk ravinderk commented Oct 25, 2023

Description of the Change

I use get_asset_info function to get dependencies and version of script for wp_enqeueue_script.

Closes #607

How to test the Change

  • All edited script files should load correctly.
  • We are using get_asset_info function in each wp_enqueue_script

Changelog Entry

Changed - Use get_asset_info to get dependencies and version of script file for the wp_enqueue_script function.

Credits

Props @ravinderk @dkotter, @berkod

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@ravinderk ravinderk self-assigned this Oct 25, 2023
@ravinderk ravinderk changed the title refactor: use get_asset_info to get dependencies and version for wp_enqueue_script function Refactor: use get_asset_info to get dependencies and version for wp_enqueue_script function Oct 25, 2023
@ravinderk ravinderk changed the title Refactor: use get_asset_info to get dependencies and version for wp_enqueue_script function Use get_asset_info to get dependencies and version for wp_enqueue_script function Oct 25, 2023
@ravinderk ravinderk changed the title Use get_asset_info to get dependencies and version for wp_enqueue_script function Use get_asset_info to get dependencies and version of script file for wp_enqueue_script function Oct 25, 2023
@ravinderk ravinderk marked this pull request as ready for review October 25, 2023 03:36
@ravinderk ravinderk requested review from dkotter, jeffpaul and a team as code owners October 25, 2023 03:36
@jeffpaul jeffpaul added this to the 2.4.0 milestone Oct 25, 2023
@dkotter
Copy link
Collaborator

dkotter commented Oct 25, 2023

This looks good but seems to only make this change for JS files. I think we want to do the same for the CSS files we are loading which should be referenced in the issue description.

@ravinderk
Copy link
Contributor Author

This looks good but seems to only make this change for JS files. I think we want to do the same for the CSS files we are loading which should be referenced in the issue description.

@dkotter I was not sure whether we should use the asset file version for the style file. I will implement it.

@ravinderk
Copy link
Contributor Author

@dkotter pull request is ready to review.

@dkotter dkotter requested a review from berkod October 26, 2023 16:56
Copy link
Member

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that this was reviewed in UAT today and approved for merge, but could hold off on merging until #602 gets merged in

@dkotter dkotter merged commit 8ad0047 into develop Nov 2, 2023
13 checks passed
@dkotter dkotter deleted the fix/use-get_asset_info_function-607 branch November 2, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update enqueuing of assets to use our get_asset_info function
4 participants