• Notice: WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array.

    Origin of the error

    File: code-prettify.php

    Code:

    wp_localize_script(
    		'code-prettify',
    		'codePrettifyLoaderBaseUrl',
    		plugins_url( 'prettify', __FILE__ )
    	);

    Can you solve the problem and update the plugin? Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter almendron

    (@almendron)

    Possible solution (for @kallookoo )

    Switch for

    wp_add_inline_script( 
    	'code-prettify', 
    	sprintf( 
    		'var codePrettifyLoaderBaseUrl = "%s";', 
    		plugins_url( 'prettify', __FILE__ ) 
    	),
    	'before'
    );
Viewing 1 replies (of 1 total)
  • The topic ‘Notice’ is closed to new replies.