관리-도구
편집 파일: control.js
wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(i){var n;(i=i||this).kirkiNotifications(),i.container.on("change keyup paste","input",(function(){n=jQuery(this).val(),i.setting.set(n)}))},kirkiNotifications:function(){var i=this,n=void 0!==i.params.choices&&void 0!==i.params.choices.accept_unitless&&!0===i.params.choices.accept_unitless;wp.customize(i.id,(function(t){t.bind((function(e){var a="long_title";!1!==i.validateCssValue(e)||n&&!isNaN(e)?t.notifications.remove(a):t.notifications.add(a,new wp.customize.Notification(a,{type:"warning",message:dimensionkirkiL10n["invalid-value"]}))}))}))},validateCssValue:function(i){var n,t,e,a=this,o=!0;return!i||""===i||0===i||"0"===i||"auto"===i||"inherit"===i||"initial"===i||0<=i.indexOf("calc(")&&0<=i.indexOf(")")||(n=parseFloat(i),!(t=i.replace(n,""))||(2<=(e=i.split(" ")).length?(e.forEach((function(i){i&&!a.validateCssValue(i)&&(o=!1)})),o):!isNaN(n)&&-1!==["fr","rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"].indexOf(t)))}}); //# sourceMappingURL=control.js.map