WordPress/wp-admin/js/about.min.js

1 line
766 B
JavaScript

!function(a){a(document).ready(function(){var b,c;a(".color-palette").click(function(){a(this).siblings('input[name="admin_color"]').prop("checked",!0)}),b=a("#color-picker"),c=a("#colors-css"),b.on("click.colorpicker",".color-option",function(){var b,d,e=a(this);if(!e.hasClass("selected")){if(e.siblings(".selected").removeClass("selected"),e.addClass("selected").find('input[type="radio"]').prop("checked",!0),d=e.children(".css_url").val(),c.attr("href",d),"undefined"!=typeof wp&&wp.svgPainter){try{b=a.parseJSON(e.children(".icon_colors").val())}catch(f){}b&&(wp.svgPainter.setColors(b),wp.svgPainter.paint())}a.post(ajaxurl,{action:"save-user-color-scheme",color_scheme:e.children('input[name="admin_color"]').val(),nonce:a("#_wpnonce").val()})}})})}(jQuery);