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

Change priority for S3 Uploads loader #540

Closed
1 task done
rmccue opened this issue Jul 30, 2021 · 2 comments · Fixed by #541
Closed
1 task done

Change priority for S3 Uploads loader #540

rmccue opened this issue Jul 30, 2021 · 2 comments · Fixed by #541

Comments

@rmccue
Copy link
Member

rmccue commented Jul 30, 2021

Currently, S3's init loads on plugins_loaded at priority 10. This means uploads aren't correctly set up prior to this, i.e. if alphabetically-earlier plugins run callbacks on plugins_loaded.

We should run this at a much earlier priority, such as 0, since all it does is add further hooks.

Acceptance criteria:

  • Calling wp_upload_dir() from a plugin on the plugins_loaded (default priority) hook should return the S3 URL
@rmccue
Copy link
Member Author

rmccue commented Jul 30, 2021

Just ran into this on a second project, in this case caused by AMP running at priority -9223372036854775808. 🙄

@rmccue
Copy link
Member Author

rmccue commented Jul 30, 2021

Filed the latter at ampproject/amp-wp#6499

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 a pull request may close this issue.

1 participant