M’he trobat amb l’error de consola de JS següent:
‘Uncaught Reference Error:’ ‘wpColorPickerL1On is not defined’
L’error m’impedia personalitzar el layout de la plantilla Publisher (de BetterStudio).
He trobat la solució en aquest fòrum de WP: https://wordpress.org/support/topic/help-wordpress-5-5-update-crashing-elementor-color-picker-issue/
if( is_admin() ){
add_action( 'wp_default_scripts', 'wp_default_custom_scripts' );
function wp_default_custom_scripts( $scripts ){
$scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
'wp-color-picker',
'wpColorPickerL10n',
array(
'clear' => __( 'Clear' ),
'clearAriaLabel' => __( 'Clear color' ),
'defaultString' => __( 'Default' ),
'defaultAriaLabel' => __( 'Select default color' ),
'pick' => __( 'Select Color' ),
'defaultLabel' => __( 'Color value' ),
)
);
}
}