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

Refactor core file structure and init loaders #1303

Merged
merged 9 commits into from
Mar 30, 2023
Merged

Refactor core file structure and init loaders #1303

merged 9 commits into from
Mar 30, 2023

Conversation

herrvigg
Copy link
Collaborator

The core and utils files are too large and difficult to maintain.
Hooks are created while loading some PHP files which is hard to control.

Break core and utils into smaller pieces:

  • init.php - the main plugin loader from core that is qtranxf_init_language()
  • language_config.php - language entries in $q_config from utils
  • language_detect.php - detect and redirect, mostly from core
  • rest_api.php
  • url.php - most of url_info handling from core and utils

Refactor qtranxf_init_language() to make some init calls more explicit.
Refactor core/hooks/frontend loaders to move all creations of hooks into functions.
Deprecate legacy qtranxf_init (no-op).

@herrvigg herrvigg added the core Core functionalities, including the admin section label Mar 30, 2023
@herrvigg herrvigg merged commit 9dcd83f into master Mar 30, 2023
@herrvigg herrvigg deleted the core-files branch March 30, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionalities, including the admin section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant