Fix i18n deprecation notice for translating too early

This commit is contained in:
David Stone
2025-02-15 15:06:43 -07:00
parent 6d7e7cef66
commit eb29a438a5
26 changed files with 98 additions and 104 deletions

View File

@ -30,7 +30,7 @@ class Maintenance_Mode {
*/
public function init(): void {
add_action('wp_ultimo_load', [$this, 'add_settings']);
add_action('init', [$this, 'add_settings']);
if (wu_get_setting('maintenance_mode')) {
$this->hooks();
@ -145,7 +145,7 @@ class Maintenance_Mode {
$site_id = \WP_Ultimo\Helpers\Hash::decode(wu_request('site_hash'), 'site');
if ( ! current_user_can_for_blog($site_id, 'manage_options')) {
return wp_send_json_error(
wp_send_json_error(
[
'message' => __('You do not have the necessary permissions to perform this option.', 'wp-ultimo'),
'value' => false,