8000 Fixes WordPress 6.7 warning about loading translations too early by akirk · Pull Request #479 · WordPress/health-check · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixes WordPress 6.7 warning about loading translations too early #479

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

akirk
C 8F59 opy link
Member
@akirk akirk commented Nov 18, 2024

Short introduction

Description of what the PR accomplishes

Admittedly, I cannot see a change in behavior, translations are loaded in the user language even without this PR. Still, I believe it is best practice to load the translations through the hook.

This error message is thrown before the PR:

#0 wp-includes/l10n.php(1386): _load_textdomain_just_in_time('health-check')
#1 wp-includes/l10n.php(194): get_translations_for_domain('health-check')
#2 wp-includes/l10n.php(306): translate('File integrity', 'health-check')
#3 wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-files-integrity.php(20): __('File integrity', 'health-check')
#4 wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-files-integrity.php(297): Health_Check_Files_Integrity->__construct()
#5 wp-content/plugins/health-check/health-check.php(72): require_once('wp-content/plugi...')
#6 wp-includes/class-wp-hook.php(324): HealthCheck\{closure}('')
#7 wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#8 wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 wp-settings.php(559): do_action('plugins_loaded')
#10 wp-config.php(232): require_once('wp-content/plugi...')
#11 wp-load.php(50): require_once('wp-content/plugi...')
#12 wp-blog-header.php(13): require_once('wp-content/plugi...')
#13 index.php(17): require('wp-content/plugi...')

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.

1 participant
0