File manager - Edit - /home/antilam/web/antilam.ru/public_html/wp-content/themes/woodmart/js/scripts/wc/commentImage.min.js
Back
!function(e){woodmartThemeModule.commentImage=function(){e("form.comment-form").attr("enctype","multipart/form-data");var t=e(".comment-form"),o=t.find("#wd-add-img-btn"),m=[];function n(e){t.prepend('<ul class="woocommerce-error" role="alert"><li>'+e+"</li></ul>")}0!==o.length&&(e.each(woodmart_settings.comment_images_upload_mimes,function(e,t){m.push(String(t))}),t.find("#wd-add-img-btn").on("change",function(){t.find(".wd-add-img-count").text(woodmart_settings.comment_images_added_count_text.replace("%s",this.files.length))}),t.on("submit",function(r){t.find(".woocommerce-error").remove();var i=!1,a=!1;o[0].files.length>woodmart_settings.comment_images_count&&(n(woodmart_settings.comment_images_count_text),r.preventDefault()),o[0].files.length<=0&&"yes"===woodmart_settings.single_product_comment_images_required&&(n(woodmart_settings.comment_required_images_error_text),r.preventDefault()),Array.prototype.forEach.call(o[0].files,function(t){var o=t.size,n=String(t.type);o>woodmart_settings.comment_images_upload_size&&(i=!0),e.inArray(n,m)<0&&(a=!0)}),i&&(n(woodmart_settings.comment_images_upload_size_text),r.preventDefault()),a&&(n(woodmart_settings.comment_images_upload_mimes_text),r.preventDefault())}))},e(document).ready(function(){woodmartThemeModule.commentImage()})}(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 8.4.22 | Generation time: 0.09 |
proxy
|
phpinfo
|
Settings