Skip to content

Blueprints: Use playground.documentRoot instead of hardcoding /wordpress path #216

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

Merged

Conversation

sejas
Copy link
Collaborator

@sejas sejas commented Apr 25, 2023

Proposed changes

  • Use playground.documentRoot from playground to avoid hardcoded paths.
  • Fix documentRoot getter in base-php.

@sejas sejas self-assigned this Apr 25, 2023
@adamziel
Copy link
Collaborator

You could get it inside the function like await playground.documentRoot

@sejas
Copy link
Collaborator Author

sejas commented Apr 26, 2023

@adamziel , Great idea!, I've changed the code to grab the documentRoot from the playground variable.
I've also found a bug with the documentRoot getter. It returned the absoluteUrl instead of the documentRoot value.

@adamziel adamziel changed the title Blueprints: add documentRoot parameter to defineSiteUrl Blueprints: Use playground.documentRoot instead of hardcoding /wordpress path Apr 26, 2023
@adamziel
Copy link
Collaborator

Great spot and great fix @sejas!

@adamziel adamziel merged commit 77fe3c8 into WordPress:trunk Apr 26, 2023
@sejas sejas deleted the update/defineSiteUrl-accepts-document-root branch April 26, 2023 12:32
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.

2 participants