Telefono: +39 392 33 73 731

Errore in dashboard di Wordpress 5.7

Il messaggio di errore che appare è questo:

Notice: WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.) in /home/whataqhc/public_html/wp-includes/functions.php on line 5313

Purtroppo si tratta di un bug nel file di core di Wordpress, quindi va modificato il file \wp-includes\functions.wp-scripts.php
Riga 221, il terzo parametro va definito come array, quindi il codice va cambiato da così:

return $wp_scripts->localize( $handle, $object_name, $l10n );

a così:

return $wp_scripts->localize( $handle, $object_name, (array)$l10n );

Giovedì 20 Maggio 2021
(0 commenti)
PHP

Aggiungi un commento

Nome
E-mail (non verrà pubblicata)
Sito Web
Commento