qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
553
stars
104
forks
source link
Refactor `core` file structure and init loaders #1303
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).
The
core
andutils
files are too large and difficult to maintain. Hooks are created while loading some PHP files which is hard to control.Break
core
andutils
into smaller pieces:init.php
- the main plugin loader fromcore
that isqtranxf_init_language()
language_config.php
- language entries in$q_config
fromutils
language_detect.php
- detect and redirect, mostly fromcore
rest_api.php
url.php
- most ofurl_info
handling fromcore
andutils
Refactor
qtranxf_init_language()
to make some init calls more explicit. Refactorcore/hooks/frontend
loaders to move all creations of hooks into functions. Deprecate legacyqtranxf_init
(no-op).