Skip to content

Conversation

schlessera
Copy link
Member

@schlessera schlessera commented Aug 8, 2022

The -context=admin logic was hooking some of its logic to the admin_init action. However, as the loading was adapted, the requirement for triggering the admin_init action ended up within the action's closures, causing the entire construct to not be executed at all.

This PR changes the --context=admin logic to use init instead of admin_init, and adds custom (hacky) logic to load the admin environment accordingly.

This hacky approach for loading the admin environment is used to ensure we stick with the behavior of whatever WordPress version is being used. Inlining the code would make this hard to accomplish.

@schlessera schlessera requested a review from a team as a code owner August 8, 2022 10:02
@schlessera schlessera added this to the 2.7.0 milestone Aug 8, 2022
@schlessera schlessera force-pushed the fix/use-different-action-for-admin-context-logix branch from ff95cfe to d0c788e Compare August 8, 2022 12:23
@schlessera schlessera force-pushed the fix/use-different-action-for-admin-context-logix branch from 6bb2634 to db58bb5 Compare September 2, 2022 21:57
@schlessera schlessera force-pushed the fix/use-different-action-for-admin-context-logix branch from f507e7b to caea7ec Compare September 2, 2022 22:42
@schlessera schlessera merged commit f8207ad into master Sep 2, 2022
@schlessera schlessera deleted the fix/use-different-action-for-admin-context-logix branch September 2, 2022 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants