- This topic has 3 replies, 3 voices, and was last updated 4 months, 2 weeks ago by .
-
Topic
-
Hey guys!
Just updated to WordPress 5.5 and I got a error on JavaScript console on the ALPHA CHANNEL feature for COLOR PICKER. At first moment I did think it was related to the META BOX suite, however it is a general problem happening on many themes and plugins out there.
So, I would suggest you to address a fix within Meta Box internals, because other people could think same way as me and come here asking for help.
I understand it is a problem inside the COLOR PICKER code, but, anyway, I did fix it using this on my theme functions.php file:
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.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' ), ) ); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.