Version Description
Download this release
Release Info
Developer | tareq1988 |
Plugin | WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- admin/posting.php +11 -1
- assets/js/billing-address.js +3 -1
- assets/js/frontend-form.js +1 -1
- assets/js/frontend-form.min.js +1 -1
- changelog.txt +10 -0
- class/frontend-account.php +5 -17
- includes/class-field-manager.php +2 -0
- includes/class-frontend-form-post.php +23 -11
- languages/wp-user-frontend.pot +28 -28
- readme.txt +12 -2
- templates/submit-post.php +1 -1
- wpuf-functions.php +3 -3
- wpuf.php +2 -2
admin/posting.php
CHANGED
@@ -214,7 +214,17 @@ class WPUF_Admin_Posting {
|
|
214 |
|
215 |
<!-- <input type="hidden" name="wpuf_lock_editing_post_nonce" value="<?php // echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" /> -->
|
216 |
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'wpuf_lock_editing_post_nonce' ); ?>
|
217 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
<label>
|
220 |
<?php if ( !$is_locked ) { ?>
|
214 |
|
215 |
<!-- <input type="hidden" name="wpuf_lock_editing_post_nonce" value="<?php // echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" /> -->
|
216 |
<?php wp_nonce_field( plugin_basename( __FILE__ ), 'wpuf_lock_editing_post_nonce' ); ?>
|
217 |
+
<p>
|
218 |
+
<?php
|
219 |
+
echo wp_kses( $msg, [
|
220 |
+
'a' => [
|
221 |
+
'href' => [],
|
222 |
+
'id' => [],
|
223 |
+
'data' => [],
|
224 |
+
]
|
225 |
+
] );
|
226 |
+
?>
|
227 |
+
</p>
|
228 |
|
229 |
<label>
|
230 |
<?php if ( !$is_locked ) { ?>
|
assets/js/billing-address.js
CHANGED
@@ -81,7 +81,8 @@ jQuery(function($){
|
|
81 |
function wpuf_calculate_tax() {
|
82 |
|
83 |
var $wpuf_cc_address = jQuery('#wpuf-address-country-state');
|
84 |
-
var $payment_form
|
|
|
85 |
|
86 |
var postData = {
|
87 |
action: 'wpuf_update_billing_address',
|
@@ -93,6 +94,7 @@ jQuery(function($){
|
|
93 |
billing_zip: $wpuf_cc_address.find('#wpuf_biiling_zip_code').val(),
|
94 |
type: $payment_form.find('#wpuf_type').html(),
|
95 |
id: $payment_form.find('#wpuf_id').html(),
|
|
|
96 |
};
|
97 |
|
98 |
var current_ajax_count = ++ajax_tax_count;
|
81 |
function wpuf_calculate_tax() {
|
82 |
|
83 |
var $wpuf_cc_address = jQuery('#wpuf-address-country-state');
|
84 |
+
var $payment_form = jQuery('#wpuf-payment-gateway');
|
85 |
+
var form = jQuery('#wpuf-ajax-address-form');
|
86 |
|
87 |
var postData = {
|
88 |
action: 'wpuf_update_billing_address',
|
94 |
billing_zip: $wpuf_cc_address.find('#wpuf_biiling_zip_code').val(),
|
95 |
type: $payment_form.find('#wpuf_type').html(),
|
96 |
id: $payment_form.find('#wpuf_id').html(),
|
97 |
+
_wpnonce: form.find('#_wpnonce').val()
|
98 |
};
|
99 |
|
100 |
var current_ajax_count = ++ajax_tax_count;
|
assets/js/frontend-form.js
CHANGED
@@ -633,7 +633,7 @@
|
|
633 |
var map_required = self.find('[data-required="yes"][name="google_map"]');
|
634 |
if ( map_required ) {
|
635 |
var val = $(map_required).val();
|
636 |
-
if ( val == '
|
637 |
error = true;
|
638 |
error_type = 'required';
|
639 |
|
633 |
var map_required = self.find('[data-required="yes"][name="google_map"]');
|
634 |
if ( map_required ) {
|
635 |
var val = $(map_required).val();
|
636 |
+
if ( val == '' ) {
|
637 |
error = true;
|
638 |
error_type = 'required';
|
639 |
|
assets/js/frontend-form.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form").on("click","button#wpuf-account-update-profile",this.account_update_profile),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("step-change-fieldset",function(a,b,c){if(wpuf_plupload_items.length)for(var d=wpuf_plupload_items.length-1;d>=0;d--)wpuf_plupload_items[d].refresh();if(wpuf_map_items.length)for(var d=wpuf_map_items.length-1;d>=0;d--)google.maps.event.trigger(wpuf_map_items[d].map,"resize"),wpuf_map_items[d].map.setCenter(wpuf_map_items[d].center)}),this.ajaxCategory(),a(':submit[name="wpuf_user_subscription_cancel"]').click(function(b){b.preventDefault(),swal({text:wpuf_frontend.cancelSubMsg,type:"warning",showCancelButton:!0,confirmButtonColor:"#d54e21",confirmButtonText:wpuf_frontend.delete_it,cancelButtonText:wpuf_frontend.cancel_it,confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger"}).then(function(b){if(!b)return!1;a("#wpuf_cancel_subscription").submit()})})},check_pass_strength:function(){var b=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!b)return a("#pass-strength-result").html(" "),void a("#pass-strength-result").hide();if(void 0!==wp.passwordStrength)switch(wp.passwordStrength.meter(b,wp.passwordStrength.userInputBlacklist(),b)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(c){var d=this,e=0,f=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=f){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==f&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var g=a(".wpuf-multistep-progressbar"),h=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){h.text(g.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(e,f),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(g){if(a(this).hasClass("wpuf-multistep-next-btn")){0!=d.formStepCheck("",a(this).closest("fieldset"))&&c.change_fieldset(++e,f)}else a(this).hasClass("wpuf-multistep-prev-btn")&&c.change_fieldset(--e,f);var h=a("form.wpuf-form-add"),i=h.offset().top;return b.scrollTo({top:i-32,behavior:"smooth"}),!1})}},change_fieldset:function(b,c){var d=a("fieldset.wpuf-multistep-fieldset").eq(b);a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var e=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(e=a.trim(e),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var f=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,f=Number(f.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:f}),a(".wpuf-progress-percentage").text(e+" ("+f+"%)")}a(".wpuf-form").trigger("step-change-fieldset",[b,d])},ajaxCategory:function(){a(".category-wrap").on("change",".cat-ajax",function(){var b=a(this).data("form-id");currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),currentLevel+1,"category",b)})},getChildCats:function(b,c,d,e){var f=a(b).val(),g="wpuf-category-dropdown-lvl-"+c,d=void 0!==d?d:"category",h=a(b).siblings("span").data("taxonomy");a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:f,nonce:wpuf_frontend.nonce,field_attr:h,form_id:e},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+g+'" level="'+c+'"></div>'),b.parent().parent().find("#"+g).html(e).slideDown("fast")),a(document).trigger("wpuf-ajax-fetched-child-categories",g,c,d)}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr");b.siblings().andSelf().length>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this);if(WP_User_Frontend.validateForm(c))return!0},draftPost:function(b){b.preventDefault();var c=a(this),d=a(this).closest("form"),e=d.serialize()+"&action=wpuf_draft_post",f=d.find('input[type="hidden"][name="post_id"]').val(),g=[];a(".wpuf-rich-validation").each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),f=a.trim(tinyMCE.get(d).getContent());g.push(e+"="+encodeURIComponent(f))}),e=e+"&"+g.join("&"),c.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,e,function(b){if(void 0===f){var e='<input type="hidden" name="post_id" value="'+b.post_id+'">';e+='<input type="hidden" name="post_date" value="'+b.date+'">',e+='<input type="hidden" name="post_author" value="'+b.post_author+'">',e+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',d.append(e)}c.next("span.wpuf-loading").remove(),c.after('<span class="wpuf-draft-saved"> Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},account_update_profile:function(b){b.preventDefault();var c=a(this).closest("form");a.post(wpuf_frontend.ajaxurl,c.serialize(),function(a){a.success?(c.find(".wpuf-error").hide(),c.find(".wpuf-success").show()):(c.find(".wpuf-success").hide(),c.find(".wpuf-error").show(),c.find(".wpuf-error").text(a.data))})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if(void 0!==c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));d.find(".g-recaptcha").length>0&&grecaptcha.reset(),swal({html:c.error,type:"warning",showCancelButton:!1,confirmButtonColor:"#d54e21",confirmButtonText:"OK",cancelButtonClass:"btn btn-danger"}),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b),b.find('[data-required="yes"]:visible').each(function(b,d){var e=a(d).data("type");switch(j="",e){case"rich":var f=a(d).data("id");""===(j=a.trim(tinyMCE.get(f).getContent()))&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":""===(j=a.trim(a(d).val()))&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"password":case"confirm_password":var g=a(d).data("repeat");if(j=a.trim(a(d).val()),""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type)),g){var h=a('[data-type="confirm_password"]').eq(0);h.val()!=j&&(c=!0,error_type="mismatch",WP_User_Frontend.markError(h,error_type))}break;case"select":(j=a(d).val())&&"-1"!==j||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":null!==(j=a(d).val())&&0!==j.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var i=a(d).children().find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var i=a(d).find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var i=a(d).find("ul").children().length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var j=a(d).val();""!==j?WP_User_Frontend.isValidEmail(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var j=a(d).val();""!==j&&(WP_User_Frontend.isValidURL(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}});var d=b.find('[data-required="yes"][name="google_map"]');if(d){","==a(d).val()&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type))}if(c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var e=b.serialize(),f=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());f.push(e+"="+encodeURIComponent(g))}),e=e+"&"+f.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":case"mismatch":case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a)},isValidURL:function(a){return new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)").test(a)},insertImage:function(b,c){if(a("#"+b).length){var d=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:"wpuf-insert-image-container",multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:wpuf_frontend_upload.max_filesize,url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});d.bind("Init",function(a,b){}),d.bind("FilesAdded",function(b,c){var d=a("#wpuf-insert-image-container");a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),d.bind("QueueChanged",function(a){d.start()}),d.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),d.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),d.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),d.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove(),a("[id^=wpuf-avatar]").css("display","")})},editorLimit:{bind:function(b,c,d,e){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b,e)}),a("input#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b,e)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b,e)},100)}),a("input#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b,e)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b,e)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b,e)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d,e){var f=WP_User_Frontend.editorLimit.tinymce.getStats(b).chars+1,g="word"===e?"Word Limit : ":"Character Limit : ";"word"===e&&(f=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1),d&&a(".mce-path-item.mce-last",b.container).html(g+f+"/"+d),d&&f>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(WP_User_Frontend.content_limit_message(e)))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textLimit:function(b,c,d){var e=a(this),f=e.val().length+1;"word"===d&&(f=e.val().split(" ").length),c&&f>c?(e.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(WP_User_Frontend.content_limit_message(d)),WP_User_Frontend.editorLimit.blockTyping(b)):e.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&(e.val(content.substring(0,c)),"word"===d&&e.val(content.slice(0,c).join(" ")))},blockTyping:function(b){-1!==a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}},doUncheckRadioBtn:function(a){a.checked=!1},content_limit_message:function(a){return"word"===a?"Word limit reached.":"Character limit reached."}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked").parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()}),a(function(){a('input[name="first_name"], input[name="last_name"]').on("change keyup",function(){var b,c=a.makeArray(a('input[name="first_name"], input[name="last_name"]').map(function(){if(b=a(this).val())return b})).join(" ");a('input[name="display_name"]').val(c)})}),a(function(a){a('.wpuf-form-add input[name="dokan_store_name"]').on("focusout",function(){var b=a(this).val().toLowerCase().replace(/-+/g,"").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"");a('input[name="shopurl"]').val(b),a("#url-alart").text(b),a('input[name="shopurl"]').focus()}),a('.wpuf-form-add input[name="shopurl"]').keydown(function(b){a(this).val();-1!==a.inArray(b.keyCode,[46,8,9,27,13,91,109,110,173,189,190])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=39||(b.shiftKey||(b.keyCode<65||b.keyCode>90)&&(b.keyCode<48||b.keyCode>57))&&(b.keyCode<96||b.keyCode>105)&&b.preventDefault()}),a('.wpuf-form-add input[name="shopurl"]').keyup(function(b){a("#url-alart").text(a(this).val())}),a('.wpuf-form-add input[name="shopurl"]').on("focusout",function(){var b=a(this),c={action:"shop_url",url_slug:b.val(),_nonce:dokan.nonce};""!==b.val()&&a.post(dokan.ajaxurl,c,function(b){0==b?(a("#url-alart").removeClass("text-success").addClass("text-danger"),a("#url-alart-mgs").removeClass("text-success").addClass("text-danger").text(dokan.seller.notAvailable)):(a("#url-alart").removeClass("text-danger").addClass("text-success"),a("#url-alart-mgs").removeClass("text-danger").addClass("text-success").text(dokan.seller.available))})}),a(".wpuf-form-add #wpuf-map-add-location").attr("name","find_address")})}(jQuery,window);
|
1 |
+
!function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form").on("click","button#wpuf-account-update-profile",this.account_update_profile),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("step-change-fieldset",function(a,b,c){if(wpuf_plupload_items.length)for(var d=wpuf_plupload_items.length-1;d>=0;d--)wpuf_plupload_items[d].refresh();if(wpuf_map_items.length)for(var d=wpuf_map_items.length-1;d>=0;d--)google.maps.event.trigger(wpuf_map_items[d].map,"resize"),wpuf_map_items[d].map.setCenter(wpuf_map_items[d].center)}),this.ajaxCategory(),a(':submit[name="wpuf_user_subscription_cancel"]').click(function(b){b.preventDefault(),swal({text:wpuf_frontend.cancelSubMsg,type:"warning",showCancelButton:!0,confirmButtonColor:"#d54e21",confirmButtonText:wpuf_frontend.delete_it,cancelButtonText:wpuf_frontend.cancel_it,confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger"}).then(function(b){if(!b)return!1;a("#wpuf_cancel_subscription").submit()})})},check_pass_strength:function(){var b=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!b)return a("#pass-strength-result").html(" "),void a("#pass-strength-result").hide();if(void 0!==wp.passwordStrength)switch(wp.passwordStrength.meter(b,wp.passwordStrength.userInputBlacklist(),b)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(c){var d=this,e=0,f=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=f){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==f&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var g=a(".wpuf-multistep-progressbar"),h=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){h.text(g.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(e,f),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(g){if(a(this).hasClass("wpuf-multistep-next-btn")){0!=d.formStepCheck("",a(this).closest("fieldset"))&&c.change_fieldset(++e,f)}else a(this).hasClass("wpuf-multistep-prev-btn")&&c.change_fieldset(--e,f);var h=a("form.wpuf-form-add"),i=h.offset().top;return b.scrollTo({top:i-32,behavior:"smooth"}),!1})}},change_fieldset:function(b,c){var d=a("fieldset.wpuf-multistep-fieldset").eq(b);a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var e=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(e=a.trim(e),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var f=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,f=Number(f.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:f}),a(".wpuf-progress-percentage").text(e+" ("+f+"%)")}a(".wpuf-form").trigger("step-change-fieldset",[b,d])},ajaxCategory:function(){a(".category-wrap").on("change",".cat-ajax",function(){var b=a(this).data("form-id");currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),currentLevel+1,"category",b)})},getChildCats:function(b,c,d,e){var f=a(b).val(),g="wpuf-category-dropdown-lvl-"+c,d=void 0!==d?d:"category",h=a(b).siblings("span").data("taxonomy");a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:f,nonce:wpuf_frontend.nonce,field_attr:h,form_id:e},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+g+'" level="'+c+'"></div>'),b.parent().parent().find("#"+g).html(e).slideDown("fast")),a(document).trigger("wpuf-ajax-fetched-child-categories",g,c,d)}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr");b.siblings().andSelf().length>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this);if(WP_User_Frontend.validateForm(c))return!0},draftPost:function(b){b.preventDefault();var c=a(this),d=a(this).closest("form"),e=d.serialize()+"&action=wpuf_draft_post",f=d.find('input[type="hidden"][name="post_id"]').val(),g=[];a(".wpuf-rich-validation").each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),f=a.trim(tinyMCE.get(d).getContent());g.push(e+"="+encodeURIComponent(f))}),e=e+"&"+g.join("&"),c.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,e,function(b){if(void 0===f){var e='<input type="hidden" name="post_id" value="'+b.post_id+'">';e+='<input type="hidden" name="post_date" value="'+b.date+'">',e+='<input type="hidden" name="post_author" value="'+b.post_author+'">',e+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',d.append(e)}c.next("span.wpuf-loading").remove(),c.after('<span class="wpuf-draft-saved"> Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},account_update_profile:function(b){b.preventDefault();var c=a(this).closest("form");a.post(wpuf_frontend.ajaxurl,c.serialize(),function(a){a.success?(c.find(".wpuf-error").hide(),c.find(".wpuf-success").show()):(c.find(".wpuf-success").hide(),c.find(".wpuf-error").show(),c.find(".wpuf-error").text(a.data))})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if(void 0!==c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));d.find(".g-recaptcha").length>0&&grecaptcha.reset(),swal({html:c.error,type:"warning",showCancelButton:!1,confirmButtonColor:"#d54e21",confirmButtonText:"OK",cancelButtonClass:"btn btn-danger"}),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b),b.find('[data-required="yes"]:visible').each(function(b,d){var e=a(d).data("type");switch(j="",e){case"rich":var f=a(d).data("id");""===(j=a.trim(tinyMCE.get(f).getContent()))&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":""===(j=a.trim(a(d).val()))&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"password":case"confirm_password":var g=a(d).data("repeat");if(j=a.trim(a(d).val()),""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type)),g){var h=a('[data-type="confirm_password"]').eq(0);h.val()!=j&&(c=!0,error_type="mismatch",WP_User_Frontend.markError(h,error_type))}break;case"select":(j=a(d).val())&&"-1"!==j||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":null!==(j=a(d).val())&&0!==j.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var i=a(d).children().find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var i=a(d).find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var i=a(d).find("ul").children().length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var j=a(d).val();""!==j?WP_User_Frontend.isValidEmail(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var j=a(d).val();""!==j&&(WP_User_Frontend.isValidURL(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}});var d=b.find('[data-required="yes"][name="google_map"]');if(d){""==a(d).val()&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type))}if(c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var e=b.serialize(),f=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());f.push(e+"="+encodeURIComponent(g))}),e=e+"&"+f.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":case"mismatch":case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a)},isValidURL:function(a){return new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)").test(a)},insertImage:function(b,c){if(a("#"+b).length){var d=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:"wpuf-insert-image-container",multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:wpuf_frontend_upload.max_filesize,url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});d.bind("Init",function(a,b){}),d.bind("FilesAdded",function(b,c){var d=a("#wpuf-insert-image-container");a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),d.bind("QueueChanged",function(a){d.start()}),d.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),d.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),d.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),d.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove(),a("[id^=wpuf-avatar]").css("display","")})},editorLimit:{bind:function(b,c,d,e){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b,e)}),a("input#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b,e)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b,e)},100)}),a("input#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b,e)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b,e)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b,e)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d,e){var f=WP_User_Frontend.editorLimit.tinymce.getStats(b).chars+1,g="word"===e?"Word Limit : ":"Character Limit : ";"word"===e&&(f=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1),d&&a(".mce-path-item.mce-last",b.container).html(g+f+"/"+d),d&&f>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(WP_User_Frontend.content_limit_message(e)))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textLimit:function(b,c,d){var e=a(this),f=e.val().length+1;"word"===d&&(f=e.val().split(" ").length),c&&f>c?(e.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(WP_User_Frontend.content_limit_message(d)),WP_User_Frontend.editorLimit.blockTyping(b)):e.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&(e.val(content.substring(0,c)),"word"===d&&e.val(content.slice(0,c).join(" ")))},blockTyping:function(b){-1!==a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}},doUncheckRadioBtn:function(a){a.checked=!1},content_limit_message:function(a){return"word"===a?"Word limit reached.":"Character limit reached."}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked").parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()}),a(function(){a('input[name="first_name"], input[name="last_name"]').on("change keyup",function(){var b,c=a.makeArray(a('input[name="first_name"], input[name="last_name"]').map(function(){if(b=a(this).val())return b})).join(" ");a('input[name="display_name"]').val(c)})}),a(function(a){a('.wpuf-form-add input[name="dokan_store_name"]').on("focusout",function(){var b=a(this).val().toLowerCase().replace(/-+/g,"").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"");a('input[name="shopurl"]').val(b),a("#url-alart").text(b),a('input[name="shopurl"]').focus()}),a('.wpuf-form-add input[name="shopurl"]').keydown(function(b){a(this).val();-1!==a.inArray(b.keyCode,[46,8,9,27,13,91,109,110,173,189,190])||65==b.keyCode&&!0===b.ctrlKey||b.keyCode>=35&&b.keyCode<=39||(b.shiftKey||(b.keyCode<65||b.keyCode>90)&&(b.keyCode<48||b.keyCode>57))&&(b.keyCode<96||b.keyCode>105)&&b.preventDefault()}),a('.wpuf-form-add input[name="shopurl"]').keyup(function(b){a("#url-alart").text(a(this).val())}),a('.wpuf-form-add input[name="shopurl"]').on("focusout",function(){var b=a(this),c={action:"shop_url",url_slug:b.val(),_nonce:dokan.nonce};""!==b.val()&&a.post(dokan.ajaxurl,c,function(b){0==b?(a("#url-alart").removeClass("text-success").addClass("text-danger"),a("#url-alart-mgs").removeClass("text-success").addClass("text-danger").text(dokan.seller.notAvailable)):(a("#url-alart").removeClass("text-danger").addClass("text-success"),a("#url-alart-mgs").removeClass("text-danger").addClass("text-success").text(dokan.seller.available))})}),a(".wpuf-form-add #wpuf-map-add-location").attr("name","find_address")})}(jQuery,window);
|
changelog.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= v3.5.2 (22 September, 2020) =
|
2 |
* Fix - Changelog for wordpress.org
|
3 |
|
1 |
+
= v3.5.3 (21 October, 2020) =
|
2 |
+
* Fix - Default post form is not showing on the frontend account
|
3 |
+
* Fix - Missing featured image field when previewing a post form
|
4 |
+
* Fix - Post query loop for post forms
|
5 |
+
* Fix - Post edit could not be edited after unlocking post edit
|
6 |
+
* Fix - Taxes couldn't count properly when selecting different tax region
|
7 |
+
* Fix - Google map field validation doesn't work
|
8 |
+
* Fix - Redirect payment page after post updating
|
9 |
+
* Fix - Custom field value and link send as plain text when sending an email for post notification
|
10 |
+
|
11 |
= v3.5.2 (22 September, 2020) =
|
12 |
* Fix - Changelog for wordpress.org
|
13 |
|
class/frontend-account.php
CHANGED
@@ -72,30 +72,18 @@ class WPUF_Frontend_Account {
|
|
72 |
'post_status' => 'any',
|
73 |
'orderby' => 'DESC',
|
74 |
'order' => 'ID',
|
|
|
75 |
];
|
76 |
|
77 |
-
$
|
78 |
-
|
79 |
$forms = [];
|
80 |
|
81 |
-
if ( $
|
82 |
-
$
|
83 |
-
|
84 |
-
while ( $query->have_posts() ) {
|
85 |
-
$query->the_post();
|
86 |
-
|
87 |
-
$form = $query->posts[ $i ];
|
88 |
-
|
89 |
-
$settings = get_post_meta( get_the_ID(), 'wpuf_form_settings', true );
|
90 |
-
|
91 |
-
$forms[ $form->ID ] = $form->post_title;
|
92 |
-
|
93 |
-
$i++;
|
94 |
}
|
95 |
}
|
96 |
|
97 |
-
wp_reset_postdata();
|
98 |
-
|
99 |
return $forms;
|
100 |
}
|
101 |
|
72 |
'post_status' => 'any',
|
73 |
'orderby' => 'DESC',
|
74 |
'order' => 'ID',
|
75 |
+
'numberposts' => -1,
|
76 |
];
|
77 |
|
78 |
+
$posts = get_posts( $args );
|
|
|
79 |
$forms = [];
|
80 |
|
81 |
+
if ( ! empty( $posts ) ) {
|
82 |
+
foreach( $posts as $post ) {
|
83 |
+
$forms[ $post->ID ] = $post->post_title;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
}
|
86 |
|
|
|
|
|
87 |
return $forms;
|
88 |
}
|
89 |
|
includes/class-field-manager.php
CHANGED
@@ -122,6 +122,7 @@ class WPUF_Field_Manager {
|
|
122 |
require_once __DIR__ . '/fields/class-field-hidden.php';
|
123 |
require_once __DIR__ . '/fields/class-field-image.php';
|
124 |
require_once __DIR__ . '/fields/class-field-recaptcha.php';
|
|
|
125 |
|
126 |
$fields = [
|
127 |
'post_title' => new WPUF_Form_Field_Post_Title(),
|
@@ -142,6 +143,7 @@ class WPUF_Field_Manager {
|
|
142 |
'custom_hidden_field' => new WPUF_Form_Field_Hidden(),
|
143 |
'image_upload' => new WPUF_Form_Field_Image(),
|
144 |
'recaptcha' => new WPUF_Form_Field_reCaptcha(),
|
|
|
145 |
];
|
146 |
|
147 |
$this->fields = apply_filters( 'wpuf-form-fields', $fields );
|
122 |
require_once __DIR__ . '/fields/class-field-hidden.php';
|
123 |
require_once __DIR__ . '/fields/class-field-image.php';
|
124 |
require_once __DIR__ . '/fields/class-field-recaptcha.php';
|
125 |
+
require_once __DIR__ . '/fields/class-field-featured-image.php';
|
126 |
|
127 |
$fields = [
|
128 |
'post_title' => new WPUF_Form_Field_Post_Title(),
|
143 |
'custom_hidden_field' => new WPUF_Form_Field_Hidden(),
|
144 |
'image_upload' => new WPUF_Form_Field_Image(),
|
145 |
'recaptcha' => new WPUF_Form_Field_reCaptcha(),
|
146 |
+
'featured_image' => new WPUF_Form_Field_Featured_Image(),
|
147 |
];
|
148 |
|
149 |
$this->fields = apply_filters( 'wpuf-form-fields', $fields );
|
includes/class-frontend-form-post.php
CHANGED
@@ -748,6 +748,10 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
748 |
$post_field_search = [ '%post_title%', '%post_content%', '%post_excerpt%', '%tags%', '%category%',
|
749 |
'%author%', '%author_email%', '%author_bio%', '%sitename%', '%siteurl%', '%permalink%', '%editlink%', ];
|
750 |
|
|
|
|
|
|
|
|
|
751 |
$post_field_replace = [
|
752 |
$post->post_title,
|
753 |
$post->post_content,
|
@@ -758,9 +762,9 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
758 |
$user->user_email,
|
759 |
( $user->description ) ? $user->description : 'not available',
|
760 |
get_bloginfo( 'name' ),
|
761 |
-
home_url
|
762 |
-
|
763 |
-
|
764 |
];
|
765 |
|
766 |
$content = str_replace( $post_field_search, $post_field_replace, $content );
|
@@ -772,7 +776,11 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
772 |
if ( $replace ) {
|
773 |
foreach ( $replace as $index => $meta_key ) {
|
774 |
$value = get_post_meta( $post_id, $meta_key, false );
|
775 |
-
|
|
|
|
|
|
|
|
|
776 |
$new_value = implode( '; ', $value );
|
777 |
}
|
778 |
|
@@ -969,7 +977,11 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
969 |
}
|
970 |
}
|
971 |
|
972 |
-
if (
|
|
|
|
|
|
|
|
|
973 |
$redirect_to = add_query_arg( [
|
974 |
'action' => 'wpuf_pay',
|
975 |
'type' => 'post',
|
@@ -1010,6 +1022,9 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
1010 |
if ( $guest_mode == 'true' && $guest_verify == 'true' && !is_user_logged_in() ) {
|
1011 |
$response = apply_filters( 'wpuf_edit_post_redirect', $response, $post_id, $form_id, $this->form_settings );
|
1012 |
} elseif ( $is_update ) {
|
|
|
|
|
|
|
1013 |
//send mail notification
|
1014 |
if ( isset( $this->form_settings['notification'] ) && $this->form_settings['notification']['edit'] == 'on' ) {
|
1015 |
$mail_body = $this->prepare_mail_body( $this->form_settings['notification']['edit_body'], $post_author, $post_id );
|
@@ -1023,10 +1038,10 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
1023 |
|
1024 |
//now redirect the user
|
1025 |
$response = apply_filters( 'wpuf_edit_post_redirect', $response, $post_id, $form_id, $this->form_settings );
|
1026 |
-
|
1027 |
-
//now perform some post related actions
|
1028 |
-
do_action( 'wpuf_edit_post_after_update', $post_id, $form_id, $this->form_settings, $this->form_fields ); // plugin API to extend the functionality
|
1029 |
} else {
|
|
|
|
|
|
|
1030 |
// send mail notification
|
1031 |
if ( isset( $this->form_settings['notification'] ) && $this->form_settings['notification']['new'] == 'on' ) {
|
1032 |
$mail_body = $this->prepare_mail_body( $this->form_settings['notification']['new_body'], $post_author, $post_id );
|
@@ -1040,9 +1055,6 @@ class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form {
|
|
1040 |
|
1041 |
//redirect the user
|
1042 |
$response = apply_filters( 'wpuf_add_post_redirect', $response, $post_id, $form_id, $this->form_settings );
|
1043 |
-
|
1044 |
-
//now perform some post related actions
|
1045 |
-
do_action( 'wpuf_add_post_after_insert', $post_id, $form_id, $this->form_settings, $meta_vars ); // plugin API to extend the functionality
|
1046 |
}
|
1047 |
|
1048 |
return $response;
|
748 |
$post_field_search = [ '%post_title%', '%post_content%', '%post_excerpt%', '%tags%', '%category%',
|
749 |
'%author%', '%author_email%', '%author_bio%', '%sitename%', '%siteurl%', '%permalink%', '%editlink%', ];
|
750 |
|
751 |
+
$home_url = sprintf( '<a href="%s">%s</a>', home_url(), home_url() );
|
752 |
+
$post_url = sprintf( '<a href="%s">%s</a>', get_permalink( $post_id ), get_permalink( $post_id ) );
|
753 |
+
$post_edit_link = sprintf( '<a href="%s">%s</a>', admin_url( 'post.php?action=edit&post=' . $post_id ), admin_url( 'post.php?action=edit&post=' . $post_id ) );
|
754 |
+
|
755 |
$post_field_replace = [
|
756 |
$post->post_title,
|
757 |
$post->post_content,
|
762 |
$user->user_email,
|
763 |
( $user->description ) ? $user->description : 'not available',
|
764 |
get_bloginfo( 'name' ),
|
765 |
+
$home_url,
|
766 |
+
$post_url,
|
767 |
+
$post_edit_link,
|
768 |
];
|
769 |
|
770 |
$content = str_replace( $post_field_search, $post_field_replace, $content );
|
776 |
if ( $replace ) {
|
777 |
foreach ( $replace as $index => $meta_key ) {
|
778 |
$value = get_post_meta( $post_id, $meta_key, false );
|
779 |
+
|
780 |
+
if ( isset( $value[0] ) && is_array( $value[0] ) ) {
|
781 |
+
$new_value = implode( '; ', $value[0] );
|
782 |
+
|
783 |
+
} else {
|
784 |
$new_value = implode( '; ', $value );
|
785 |
}
|
786 |
|
977 |
}
|
978 |
}
|
979 |
|
980 |
+
if (
|
981 |
+
isset( $this->form_settings['enable_pay_per_post'] )
|
982 |
+
&& wpuf_validate_boolean( $this->form_settings['enable_pay_per_post'] )
|
983 |
+
&& ! $is_update
|
984 |
+
) {
|
985 |
$redirect_to = add_query_arg( [
|
986 |
'action' => 'wpuf_pay',
|
987 |
'type' => 'post',
|
1022 |
if ( $guest_mode == 'true' && $guest_verify == 'true' && !is_user_logged_in() ) {
|
1023 |
$response = apply_filters( 'wpuf_edit_post_redirect', $response, $post_id, $form_id, $this->form_settings );
|
1024 |
} elseif ( $is_update ) {
|
1025 |
+
//now perform some post related actions
|
1026 |
+
do_action( 'wpuf_edit_post_after_update', $post_id, $form_id, $this->form_settings, $this->form_fields ); // plugin API to extend the functionality
|
1027 |
+
|
1028 |
//send mail notification
|
1029 |
if ( isset( $this->form_settings['notification'] ) && $this->form_settings['notification']['edit'] == 'on' ) {
|
1030 |
$mail_body = $this->prepare_mail_body( $this->form_settings['notification']['edit_body'], $post_author, $post_id );
|
1038 |
|
1039 |
//now redirect the user
|
1040 |
$response = apply_filters( 'wpuf_edit_post_redirect', $response, $post_id, $form_id, $this->form_settings );
|
|
|
|
|
|
|
1041 |
} else {
|
1042 |
+
//now perform some post related actions
|
1043 |
+
do_action( 'wpuf_add_post_after_insert', $post_id, $form_id, $this->form_settings, $meta_vars ); // plugin API to extend the functionality
|
1044 |
+
|
1045 |
// send mail notification
|
1046 |
if ( isset( $this->form_settings['notification'] ) && $this->form_settings['notification']['new'] == 'on' ) {
|
1047 |
$mail_body = $this->prepare_mail_body( $this->form_settings['notification']['new_body'], $post_author, $post_id );
|
1055 |
|
1056 |
//redirect the user
|
1057 |
$response = apply_filters( 'wpuf_add_post_redirect', $response, $post_id, $form_id, $this->form_settings );
|
|
|
|
|
|
|
1058 |
}
|
1059 |
|
1060 |
return $response;
|
languages/wp-user-frontend.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GPL2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP User Frontend 3.5.
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -161,7 +161,7 @@ msgid "Duration"
|
|
161 |
msgstr ""
|
162 |
|
163 |
#: admin/class-admin-subscription.php:226
|
164 |
-
#: admin/class-admin-subscription.php:596 class/frontend-account.php:
|
165 |
#: class/subscription.php:883 includes/class-user-subscription.php:305
|
166 |
#: templates/subscriptions/pack-details.php:24
|
167 |
msgid "Free"
|
@@ -284,7 +284,7 @@ msgstr ""
|
|
284 |
msgid "For each %s %s"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: admin/class-admin-subscription.php:601 class/frontend-account.php:
|
288 |
msgid ", for %s installments"
|
289 |
msgstr ""
|
290 |
|
@@ -2715,19 +2715,19 @@ msgid ""
|
|
2715 |
"<a id=\"wpuf_clear_schedule_lock\" data=\"%s\" href=\"#\">Clear Lock</a> Or,"
|
2716 |
msgstr ""
|
2717 |
|
2718 |
-
#: admin/posting.php:
|
2719 |
msgid "Lock Post Permanently"
|
2720 |
msgstr ""
|
2721 |
|
2722 |
-
#: admin/posting.php:
|
2723 |
msgid "Lock user from editing this post from the frontend dashboard"
|
2724 |
msgstr ""
|
2725 |
|
2726 |
-
#: admin/posting.php:
|
2727 |
msgid "WPUF Custom Fields"
|
2728 |
msgstr ""
|
2729 |
|
2730 |
-
#: admin/posting.php:
|
2731 |
msgid "No custom fields found."
|
2732 |
msgstr ""
|
2733 |
|
@@ -3882,7 +3882,7 @@ msgstr ""
|
|
3882 |
msgid "Label for post submission menu"
|
3883 |
msgstr ""
|
3884 |
|
3885 |
-
#: class/frontend-account.php:48 class/frontend-account.php:
|
3886 |
#: includes/class-wcmp-integration.php:127
|
3887 |
#: includes/class-wcmp-integration.php:144
|
3888 |
msgid "Submit Post"
|
@@ -3898,59 +3898,59 @@ msgid ""
|
|
3898 |
"account page."
|
3899 |
msgstr ""
|
3900 |
|
3901 |
-
#: class/frontend-account.php:
|
3902 |
msgid "<p>You have not subscribed to any package yet.</p>"
|
3903 |
msgstr ""
|
3904 |
|
3905 |
-
#: class/frontend-account.php:
|
3906 |
msgid "<p>You may have processed your payment, but the pack is not active yet.</p>"
|
3907 |
msgstr ""
|
3908 |
|
3909 |
-
#: class/frontend-account.php:
|
3910 |
msgid "For each"
|
3911 |
msgstr ""
|
3912 |
|
3913 |
-
#: class/frontend-account.php:
|
3914 |
msgid "Nonce failure"
|
3915 |
msgstr ""
|
3916 |
|
3917 |
-
#: class/frontend-account.php:
|
3918 |
msgid "First Name is a required field."
|
3919 |
msgstr ""
|
3920 |
|
3921 |
-
#: class/frontend-account.php:
|
3922 |
msgid "Last Name is a required field."
|
3923 |
msgstr ""
|
3924 |
|
3925 |
-
#: class/frontend-account.php:
|
3926 |
msgid "Email is a required field."
|
3927 |
msgstr ""
|
3928 |
|
3929 |
-
#: class/frontend-account.php:
|
3930 |
msgid "Please provide a valid email address."
|
3931 |
msgstr ""
|
3932 |
|
3933 |
-
#: class/frontend-account.php:
|
3934 |
msgid "This email address is already registered."
|
3935 |
msgstr ""
|
3936 |
|
3937 |
-
#: class/frontend-account.php:
|
3938 |
msgid "Please fill out all password fields."
|
3939 |
msgstr ""
|
3940 |
|
3941 |
-
#: class/frontend-account.php:
|
3942 |
msgid "Please enter your current password."
|
3943 |
msgstr ""
|
3944 |
|
3945 |
-
#: class/frontend-account.php:
|
3946 |
msgid "Please re-enter your password."
|
3947 |
msgstr ""
|
3948 |
|
3949 |
-
#: class/frontend-account.php:
|
3950 |
msgid "New passwords do not match."
|
3951 |
msgstr ""
|
3952 |
|
3953 |
-
#: class/frontend-account.php:
|
3954 |
msgid "Your current password is incorrect."
|
3955 |
msgstr ""
|
3956 |
|
@@ -4548,11 +4548,11 @@ msgstr ""
|
|
4548 |
msgid "Select a post form that will show on the vendor dashboard."
|
4549 |
msgstr ""
|
4550 |
|
4551 |
-
#: includes/class-field-manager.php:
|
4552 |
msgid "Custom Fields"
|
4553 |
msgstr ""
|
4554 |
|
4555 |
-
#: includes/class-field-manager.php:
|
4556 |
msgid "Others"
|
4557 |
msgstr ""
|
4558 |
|
@@ -4632,12 +4632,12 @@ msgstr ""
|
|
4632 |
msgid "You do not have sufficient permissions to access this form."
|
4633 |
msgstr ""
|
4634 |
|
4635 |
-
#: includes/class-frontend-form-post.php:
|
4636 |
msgid "Email successfully verified. Please Login."
|
4637 |
msgstr ""
|
4638 |
|
4639 |
-
#: includes/class-frontend-form-post.php:
|
4640 |
-
#: includes/class-frontend-form-post.php:
|
4641 |
msgid ""
|
4642 |
"Thank you for posting on our site. We have sent you an confirmation email. "
|
4643 |
"Please check your inbox!"
|
2 |
# This file is distributed under the GPL2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP User Frontend 3.5.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
+
"POT-Creation-Date: 2020-10-21 05:00:56+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
161 |
msgstr ""
|
162 |
|
163 |
#: admin/class-admin-subscription.php:226
|
164 |
+
#: admin/class-admin-subscription.php:596 class/frontend-account.php:243
|
165 |
#: class/subscription.php:883 includes/class-user-subscription.php:305
|
166 |
#: templates/subscriptions/pack-details.php:24
|
167 |
msgid "Free"
|
284 |
msgid "For each %s %s"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: admin/class-admin-subscription.php:601 class/frontend-account.php:247
|
288 |
msgid ", for %s installments"
|
289 |
msgstr ""
|
290 |
|
2715 |
"<a id=\"wpuf_clear_schedule_lock\" data=\"%s\" href=\"#\">Clear Lock</a> Or,"
|
2716 |
msgstr ""
|
2717 |
|
2718 |
+
#: admin/posting.php:233
|
2719 |
msgid "Lock Post Permanently"
|
2720 |
msgstr ""
|
2721 |
|
2722 |
+
#: admin/posting.php:238
|
2723 |
msgid "Lock user from editing this post from the frontend dashboard"
|
2724 |
msgstr ""
|
2725 |
|
2726 |
+
#: admin/posting.php:289
|
2727 |
msgid "WPUF Custom Fields"
|
2728 |
msgstr ""
|
2729 |
|
2730 |
+
#: admin/posting.php:341
|
2731 |
msgid "No custom fields found."
|
2732 |
msgstr ""
|
2733 |
|
3882 |
msgid "Label for post submission menu"
|
3883 |
msgstr ""
|
3884 |
|
3885 |
+
#: class/frontend-account.php:48 class/frontend-account.php:99
|
3886 |
#: includes/class-wcmp-integration.php:127
|
3887 |
#: includes/class-wcmp-integration.php:144
|
3888 |
msgid "Submit Post"
|
3898 |
"account page."
|
3899 |
msgstr ""
|
3900 |
|
3901 |
+
#: class/frontend-account.php:222
|
3902 |
msgid "<p>You have not subscribed to any package yet.</p>"
|
3903 |
msgstr ""
|
3904 |
|
3905 |
+
#: class/frontend-account.php:230
|
3906 |
msgid "<p>You may have processed your payment, but the pack is not active yet.</p>"
|
3907 |
msgstr ""
|
3908 |
|
3909 |
+
#: class/frontend-account.php:246
|
3910 |
msgid "For each"
|
3911 |
msgstr ""
|
3912 |
|
3913 |
+
#: class/frontend-account.php:307
|
3914 |
msgid "Nonce failure"
|
3915 |
msgstr ""
|
3916 |
|
3917 |
+
#: class/frontend-account.php:321
|
3918 |
msgid "First Name is a required field."
|
3919 |
msgstr ""
|
3920 |
|
3921 |
+
#: class/frontend-account.php:325
|
3922 |
msgid "Last Name is a required field."
|
3923 |
msgstr ""
|
3924 |
|
3925 |
+
#: class/frontend-account.php:329
|
3926 |
msgid "Email is a required field."
|
3927 |
msgstr ""
|
3928 |
|
3929 |
+
#: class/frontend-account.php:341
|
3930 |
msgid "Please provide a valid email address."
|
3931 |
msgstr ""
|
3932 |
|
3933 |
+
#: class/frontend-account.php:343
|
3934 |
msgid "This email address is already registered."
|
3935 |
msgstr ""
|
3936 |
|
3937 |
+
#: class/frontend-account.php:349
|
3938 |
msgid "Please fill out all password fields."
|
3939 |
msgstr ""
|
3940 |
|
3941 |
+
#: class/frontend-account.php:352
|
3942 |
msgid "Please enter your current password."
|
3943 |
msgstr ""
|
3944 |
|
3945 |
+
#: class/frontend-account.php:355
|
3946 |
msgid "Please re-enter your password."
|
3947 |
msgstr ""
|
3948 |
|
3949 |
+
#: class/frontend-account.php:358
|
3950 |
msgid "New passwords do not match."
|
3951 |
msgstr ""
|
3952 |
|
3953 |
+
#: class/frontend-account.php:361 class/frontend-account.php:372
|
3954 |
msgid "Your current password is incorrect."
|
3955 |
msgstr ""
|
3956 |
|
4548 |
msgid "Select a post form that will show on the vendor dashboard."
|
4549 |
msgstr ""
|
4550 |
|
4551 |
+
#: includes/class-field-manager.php:185
|
4552 |
msgid "Custom Fields"
|
4553 |
msgstr ""
|
4554 |
|
4555 |
+
#: includes/class-field-manager.php:206
|
4556 |
msgid "Others"
|
4557 |
msgstr ""
|
4558 |
|
4632 |
msgid "You do not have sufficient permissions to access this form."
|
4633 |
msgstr ""
|
4634 |
|
4635 |
+
#: includes/class-frontend-form-post.php:891
|
4636 |
msgid "Email successfully verified. Please Login."
|
4637 |
msgstr ""
|
4638 |
|
4639 |
+
#: includes/class-frontend-form-post.php:1010
|
4640 |
+
#: includes/class-frontend-form-post.php:1016
|
4641 |
msgid ""
|
4642 |
"Thank you for posting on our site. We have sent you an confirmation email. "
|
4643 |
"Please check your inbox!"
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== WP User Frontend - Membership, Profile, Registration & Post Submission Plugin for WordPress ===
|
2 |
Contributors: tareq1988, nizamuddinbabu, wedevs
|
3 |
Donate link: https://tareq.co/donate/
|
4 |
-
Tags: Forms, registration, profile-builder, login, membership, frontend
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.5.1
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 3.5.
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -263,6 +263,16 @@ redirected to the edit page with that post id. Then you'll see the edit post for
|
|
263 |
|
264 |
== Changelog ==
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
= v3.5.2 (22 September, 2020) =
|
267 |
* Fix - Changelog for wordpress.org
|
268 |
|
1 |
=== WP User Frontend - Membership, Profile, Registration & Post Submission Plugin for WordPress ===
|
2 |
Contributors: tareq1988, nizamuddinbabu, wedevs
|
3 |
Donate link: https://tareq.co/donate/
|
4 |
+
Tags: Forms, registration, profile-builder, login, membership, frontend-post
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.5.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 3.5.3
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
263 |
|
264 |
== Changelog ==
|
265 |
|
266 |
+
= v3.5.3 (21 October, 2020) =
|
267 |
+
* Fix - Default post form is not showing on the frontend account
|
268 |
+
* Fix - Missing featured image field when previewing a post form
|
269 |
+
* Fix - Post query loop for post forms
|
270 |
+
* Fix - Post edit could not be edited after unlocking post edit
|
271 |
+
* Fix - Taxes couldn't count properly when selecting different tax region
|
272 |
+
* Fix - Google map field validation doesn't work
|
273 |
+
* Fix - Redirect payment page after post updating
|
274 |
+
* Fix - Custom field value and link send as plain text when sending an email for post notification
|
275 |
+
|
276 |
= v3.5.2 (22 September, 2020) =
|
277 |
* Fix - Changelog for wordpress.org
|
278 |
|
templates/submit-post.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
$no_form_notice = __( 'No post form assigned yet by the administrator.', 'wp-user-frontend' );
|
4 |
-
$selected_form = wpuf_get_option( '
|
5 |
|
6 |
if ( empty( $selected_form ) ) {
|
7 |
echo wp_kses_post( '<div class="wpuf-info">' . $no_form_notice . '</div>' );
|
1 |
<?php
|
2 |
|
3 |
$no_form_notice = __( 'No post form assigned yet by the administrator.', 'wp-user-frontend' );
|
4 |
+
$selected_form = wpuf_get_option( 'default_post_form', 'wpuf_frontend_posting' );
|
5 |
|
6 |
if ( empty( $selected_form ) ) {
|
7 |
echo wp_kses_post( '<div class="wpuf-info">' . $no_form_notice . '</div>' );
|
wpuf-functions.php
CHANGED
@@ -2941,7 +2941,7 @@ function wpuf_form_posts_count( $form_id ) {
|
|
2941 |
function get_formatted_mail_body( $message, $subject ) {
|
2942 |
if ( wpuf()->is_pro() && wpuf_pro_is_module_active( 'email-templates/email-templates.php' ) ) {
|
2943 |
$css = '';
|
2944 |
-
$header = apply_filters( 'wpuf_email_header', '' );
|
2945 |
$footer = apply_filters( 'wpuf_email_footer', '' );
|
2946 |
|
2947 |
if ( empty( $header ) ) {
|
@@ -3255,9 +3255,9 @@ add_action( 'wp_ajax_nopriv_wpuf-ajax-address', 'wpuf_ajax_get_states_field' );
|
|
3255 |
* @return void
|
3256 |
*/
|
3257 |
function wpuf_update_billing_address() {
|
3258 |
-
$nonce = isset( $_POST['_wpnonce'] ) ?
|
3259 |
|
3260 |
-
if (
|
3261 |
return ;
|
3262 |
}
|
3263 |
|
2941 |
function get_formatted_mail_body( $message, $subject ) {
|
2942 |
if ( wpuf()->is_pro() && wpuf_pro_is_module_active( 'email-templates/email-templates.php' ) ) {
|
2943 |
$css = '';
|
2944 |
+
$header = apply_filters( 'wpuf_email_header', '', $subject );
|
2945 |
$footer = apply_filters( 'wpuf_email_footer', '' );
|
2946 |
|
2947 |
if ( empty( $header ) ) {
|
3255 |
* @return void
|
3256 |
*/
|
3257 |
function wpuf_update_billing_address() {
|
3258 |
+
$nonce = isset( $_POST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ) : '';
|
3259 |
|
3260 |
+
if ( ! wp_verify_nonce( $nonce, 'wpuf-ajax-address' ) ) {
|
3261 |
return ;
|
3262 |
}
|
3263 |
|
wpuf.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP User Frontend
|
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
|
5 |
Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
|
6 |
Author: weDevs
|
7 |
-
Version: 3.5.
|
8 |
Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
|
9 |
License: GPL2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -12,7 +12,7 @@ Text Domain: wp-user-frontend
|
|
12 |
Domain Path: /languages
|
13 |
*/
|
14 |
|
15 |
-
define( 'WPUF_VERSION', '3.5.
|
16 |
define( 'WPUF_FILE', __FILE__ );
|
17 |
define( 'WPUF_ROOT', __DIR__ );
|
18 |
define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
|
5 |
Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
|
6 |
Author: weDevs
|
7 |
+
Version: 3.5.3
|
8 |
Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
|
9 |
License: GPL2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Domain Path: /languages
|
13 |
*/
|
14 |
|
15 |
+
define( 'WPUF_VERSION', '3.5.3' );
|
16 |
define( 'WPUF_FILE', __FILE__ );
|
17 |
define( 'WPUF_ROOT', __DIR__ );
|
18 |
define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
|