Skip to content

Commit

Permalink
Uses other properties to check if WP 4.9
Browse files Browse the repository at this point in the history
Fixes #413 Uses other properties to check if WP 4.9
  • Loading branch information
bfintal committed Jul 3, 2018
1 parent 717c4aa commit e83f3dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/dev/wp-color-picker-alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
_wrap = '<div class="wp-picker-container" />',
_button = '<input type="button" class="button button-small" />',
// Prevent CSS issues in < WordPress 4.9
_deprecated = ( wpColorPickerL10n.current !== undefined );
_deprecated = ( wpColorPickerL10n.current !== undefined && wpColorPickerL10n.clearAriaLabel !== undefined && wpColorPickerL10n.defaultAriaLabel !== undefined );
// Declare some global variables when is deprecated or not
if ( _deprecated ) {
var _before = '<a tabindex="0" class="wp-color-result" />';
Expand Down
2 changes: 1 addition & 1 deletion js/min/wp-color-picker-alpha-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/wp-color-picker-alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
_wrap = '<div class="wp-picker-container" />',
_button = '<input type="button" class="button button-small" />',
// Prevent CSS issues in < WordPress 4.9
_deprecated = ( wpColorPickerL10n.current !== undefined );
_deprecated = ( wpColorPickerL10n.current !== undefined && wpColorPickerL10n.clearAriaLabel !== undefined && wpColorPickerL10n.defaultAriaLabel !== undefined );
// Declare some global variables when is deprecated or not
if ( _deprecated ) {
var _before = '<a tabindex="0" class="wp-color-result" />';
Expand Down

1 comment on commit e83f3dd

@goodwinpress
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

Please sign in to comment.