wp_add_inline_script() functions.php on line

Here is the error “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 ….

Fix kan gjøres slikt:
Finn linje nr altså i functions.php error som viser etter line …. som ligner denne:
under og sett inn ,@ uten paranteser foran eller bak, alle som heter trigger_error. lagre og test.

(1 @ her) trigger_error(
sprintf(
/* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: WordPress version number. */
__( ‘%1$s was called incorrectly. %2$s %3$s’ ),
$function,
$message,
$version
),
E_USER_NOTICE
);
} else {
if ( $version ) {
$version = sprintf( ‘(This message was added in version %s.)’, $version );
}

        $message .= sprintf(
            ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
            'https://wordpress.org/support/article/debugging-in-wordpress/'
        );

       (nr 2 @ her) trigger_error(
            sprintf(
                '%1$s was called <strong>incorrectly</strong>. %2$s %3$s',
                $function,
                $message,
                $version
            ),
            E_USER_NOTICE
        


Legg igjen en kommentar

Din e-postadresse vil ikke bli publisert.

Dette nettstedet bruker Akismet for å redusere spam. Lær om hvordan dine kommentar-data prosesseres.