WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress - Version 2.4.4

Version Description

Download this release

Release Info

Developer tareq1988
Plugin Icon 128x128 WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress
Version 2.4.4
Comparing to
See all releases

Code changes from version 2.4.3 to 2.4.4

.svnignore DELETED
@@ -1,7 +0,0 @@
1
- includes/pro
2
- nbproject
3
- Gruntfile.js
4
- package.json
5
- docs.md
6
- changelog.txt
7
- plugin-deploy.sh
 
 
 
 
 
 
 
assets/js/frontend-form.js CHANGED
@@ -360,7 +360,7 @@
360
  // enable external plugins to use events
361
  $('body').trigger('wpuf:postform:success', res);
362
 
363
- if( res.show_message == true) {
364
  form.before( '<div class="wpuf-success">' + res.message + '</div>');
365
  form.slideUp( 'fast', function() {
366
  form.remove();
@@ -389,6 +389,10 @@
389
 
390
  return;
391
  } else {
 
 
 
 
392
  alert( res.error );
393
  }
394
 
360
  // enable external plugins to use events
361
  $('body').trigger('wpuf:postform:success', res);
362
 
363
+ if ( res.show_message == true) {
364
  form.before( '<div class="wpuf-success">' + res.message + '</div>');
365
  form.slideUp( 'fast', function() {
366
  form.remove();
389
 
390
  return;
391
  } else {
392
+ if ( form.find('.g-recaptcha').length > 0 ) {
393
+ grecaptcha.reset();
394
+ }
395
+
396
  alert( res.error );
397
  }
398
 
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={pass_val:"",retype_pass_val:"",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("keyup","#pass1",this.check_pass_strength),this.ajaxCategory(),a(':submit[name="wpuf_cancel_subscription"]').click(function(){if(!confirm("Are you sure you want to cancel your current subscription ?"))return!1})},check_pass_strength:function(){var b,c=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!c)return a("#pass-strength-result").html("&nbsp;"),void a("#pass-strength-result").hide();if("undefined"!=typeof wp.passwordStrength)switch(b=wp.passwordStrength.meter(c,wp.passwordStrength.userInputBlacklist(),c)){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(b){var c=this,d=0,e=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=e){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"==e&&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 f=a(".wpuf-multistep-progressbar"),g=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){g.text(f.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(d,e),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(f){if(a(this).hasClass("wpuf-multistep-next-btn")){var g=c.formStepCheck("",a(this).closest("fieldset"));0!=g&&b.change_fieldset(++d,e)}else a(this).hasClass("wpuf-multistep-prev-btn")&&b.change_fieldset(--d,e);return!1})}},change_fieldset:function(b,c){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 d=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(d=a.trim(d),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var e=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,e=Number(e.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:e}),a(".wpuf-progress-percentage").text(d+" ("+e+"%)")}a(".wpuf-form").trigger("step-change-fieldset")},ajaxCategory:function(){var b=".cat-ajax",c=".category-wrap";a(c).on("change",b,function(){currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),"lvl",currentLevel+1,c,"category")})},getChildCats:function(b,c,d,e,f){cat=a(b).val(),results_div=c+d,f="undefined"!=typeof f?f:"category",field_attr=a(b).siblings("span").data("taxonomy"),a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:cat,nonce:wpuf_frontend.nonce,field_attr:field_attr},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="'+c+d+'" level="'+d+'"></div>'),b.parent().parent().find("#"+results_div).html(e).slideDown("fast"))}})},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"),c=b.siblings().andSelf().length;c>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this),d=WP_User_Frontend.validateForm(c);if(d)return!0},draftPost:function(b){b.preventDefault();var c,d,e=a(this),f=a(this).closest("form"),g=f.serialize()+"&action=wpuf_draft_post",h=f.find('input[type="hidden"][name="post_id"]').val(),i=[];a(".wpuf-rich-validation").each(function(b,e){c=a(e).data("id"),d=a.trim(tinyMCE.get(c).getContent()),i.push(c+"="+encodeURIComponent(d))}),g=g+"&"+i.join("&"),e.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,g,function(b){if("undefined"==typeof h){var c='<input type="hidden" name="post_id" value="'+b.post_id+'">';c+='<input type="hidden" name="post_date" value="'+b.date+'">',c+='<input type="hidden" name="post_author" value="'+b.post_author+'">',c+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',f.append(c)}e.next("span.wpuf-loading").remove(),e.after('<span class="wpuf-draft-saved">&nbsp; 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("undefined"!=typeof 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()));alert(c.error),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);var d=b.find('[data-required="yes"]:visible');if(d.each(function(b,d){var e=a(d).data("type");switch(h="",e){case"rich":var f=a(d).data("id");h=a.trim(tinyMCE.get(f).getContent()),""===h&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":if(a(d).hasClass("password")&&(""==WP_User_Frontend.pass_val?WP_User_Frontend.pass_val=a(d).val():WP_User_Frontend.retype_pass_val=a(d).val(),""!=WP_User_Frontend.pass_val&&""!=WP_User_Frontend.retype_pass_val&&WP_User_Frontend.pass_val!=WP_User_Frontend.retype_pass_val)){c=!0,error_type="mismatch",WP_User_Frontend.markError(d,error_type);break}h=a.trim(a(d).val()),""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"select":h=a(d).val(),h&&"-1"!==h||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":h=a(d).val(),null!==h&&0!==h.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var g=a(d).children().find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var g=a(d).find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var g=a(d).find("ul").children().length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var h=a(d).val();""!==h?WP_User_Frontend.isValidEmail(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var h=a(d).val();""!==h&&(WP_User_Frontend.isValidURL(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}}),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":d=d+" "+error_str_obj[c];break;case"mismatch":d=d+" "+error_str_obj[c];break;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){var b=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);return b.test(a)},isValidURL:function(a){var b=new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)");return b.test(a)},insertImage:function(b,c){var d="wpuf-insert-image-container";if(a("#"+b).length){var e=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:d,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:"2mb",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"}]});e.bind("Init",function(a,b){}),e.bind("FilesAdded",function(b,c){var e=a("#"+d);a.each(c,function(a,b){e.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),e.bind("QueueChanged",function(a){e.start()}),e.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),e.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),e.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")}),e.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()})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textareaLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textareaLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},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){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d?a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d):"",d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},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)}},textareaLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])!==-1||65==b.keyCode&&b.ctrlKey===!0||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))})}}},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")){var b=a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked");b.parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()})}(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={pass_val:"",retype_pass_val:"",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("keyup","#pass1",this.check_pass_strength),this.ajaxCategory(),a(':submit[name="wpuf_cancel_subscription"]').click(function(){if(!confirm("Are you sure you want to cancel your current subscription ?"))return!1})},check_pass_strength:function(){var b,c=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!c)return a("#pass-strength-result").html("&nbsp;"),void a("#pass-strength-result").hide();if("undefined"!=typeof wp.passwordStrength)switch(b=wp.passwordStrength.meter(c,wp.passwordStrength.userInputBlacklist(),c)){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(b){var c=this,d=0,e=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=e){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"==e&&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 f=a(".wpuf-multistep-progressbar"),g=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){g.text(f.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(d,e),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(f){if(a(this).hasClass("wpuf-multistep-next-btn")){var g=c.formStepCheck("",a(this).closest("fieldset"));0!=g&&b.change_fieldset(++d,e)}else a(this).hasClass("wpuf-multistep-prev-btn")&&b.change_fieldset(--d,e);return!1})}},change_fieldset:function(b,c){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 d=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(d=a.trim(d),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var e=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,e=Number(e.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:e}),a(".wpuf-progress-percentage").text(d+" ("+e+"%)")}a(".wpuf-form").trigger("step-change-fieldset")},ajaxCategory:function(){var b=".cat-ajax",c=".category-wrap";a(c).on("change",b,function(){currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),"lvl",currentLevel+1,c,"category")})},getChildCats:function(b,c,d,e,f){cat=a(b).val(),results_div=c+d,f="undefined"!=typeof f?f:"category",field_attr=a(b).siblings("span").data("taxonomy"),a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:cat,nonce:wpuf_frontend.nonce,field_attr:field_attr},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="'+c+d+'" level="'+d+'"></div>'),b.parent().parent().find("#"+results_div).html(e).slideDown("fast"))}})},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"),c=b.siblings().andSelf().length;c>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this),d=WP_User_Frontend.validateForm(c);if(d)return!0},draftPost:function(b){b.preventDefault();var c,d,e=a(this),f=a(this).closest("form"),g=f.serialize()+"&action=wpuf_draft_post",h=f.find('input[type="hidden"][name="post_id"]').val(),i=[];a(".wpuf-rich-validation").each(function(b,e){c=a(e).data("id"),d=a.trim(tinyMCE.get(c).getContent()),i.push(c+"="+encodeURIComponent(d))}),g=g+"&"+i.join("&"),e.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,g,function(b){if("undefined"==typeof h){var c='<input type="hidden" name="post_id" value="'+b.post_id+'">';c+='<input type="hidden" name="post_date" value="'+b.date+'">',c+='<input type="hidden" name="post_author" value="'+b.post_author+'">',c+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',f.append(c)}e.next("span.wpuf-loading").remove(),e.after('<span class="wpuf-draft-saved">&nbsp; 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("undefined"!=typeof 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(),alert(c.error),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);var d=b.find('[data-required="yes"]:visible');if(d.each(function(b,d){var e=a(d).data("type");switch(h="",e){case"rich":var f=a(d).data("id");h=a.trim(tinyMCE.get(f).getContent()),""===h&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":if(a(d).hasClass("password")&&(""==WP_User_Frontend.pass_val?WP_User_Frontend.pass_val=a(d).val():WP_User_Frontend.retype_pass_val=a(d).val(),""!=WP_User_Frontend.pass_val&&""!=WP_User_Frontend.retype_pass_val&&WP_User_Frontend.pass_val!=WP_User_Frontend.retype_pass_val)){c=!0,error_type="mismatch",WP_User_Frontend.markError(d,error_type);break}h=a.trim(a(d).val()),""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"select":h=a(d).val(),h&&"-1"!==h||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":h=a(d).val(),null!==h&&0!==h.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var g=a(d).children().find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var g=a(d).find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var g=a(d).find("ul").children().length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var h=a(d).val();""!==h?WP_User_Frontend.isValidEmail(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var h=a(d).val();""!==h&&(WP_User_Frontend.isValidURL(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}}),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":d=d+" "+error_str_obj[c];break;case"mismatch":d=d+" "+error_str_obj[c];break;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){var b=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);return b.test(a)},isValidURL:function(a){var b=new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)");return b.test(a)},insertImage:function(b,c){var d="wpuf-insert-image-container";if(a("#"+b).length){var e=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:d,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:"2mb",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"}]});e.bind("Init",function(a,b){}),e.bind("FilesAdded",function(b,c){var e=a("#"+d);a.each(c,function(a,b){e.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),e.bind("QueueChanged",function(a){e.start()}),e.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),e.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),e.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")}),e.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()})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textareaLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textareaLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},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){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d?a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d):"",d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},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)}},textareaLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])!==-1||65==b.keyCode&&b.ctrlKey===!0||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))})}}},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")){var b=a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked");b.parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()})}(jQuery,window);
class/render-form.php CHANGED
@@ -822,7 +822,11 @@ class WPUF_Render_Form {
822
  *
823
  * @param $word_nums number of words allowed
824
  */
825
- function check_word_restriction_func($word_nums, $rich_text, $field_name){
 
 
 
 
826
  ?>
827
  <script type="text/javascript">
828
  (function($) {
822
  *
823
  * @param $word_nums number of words allowed
824
  */
825
+ function check_word_restriction_func($word_nums, $rich_text, $field_name) {
826
+ // bail out if it is dashboard
827
+ if ( is_admin() ) {
828
+ return;
829
+ }
830
  ?>
831
  <script type="text/javascript">
832
  (function($) {
languages/wpuf.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPL2.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP User Frontend 2.4.3\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wedevs.com/support/forum/plugin-support/wp-user-frontend/\n"
8
- "POT-Creation-Date: 2017-02-07 08:35:46+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -629,7 +629,7 @@ msgid ""
629
  "installed and saved!"
630
  msgstr ""
631
 
632
- #: admin/installer.php:73 admin/settings-options.php:17 wpuf-functions.php:1286
633
  msgid "Dashboard"
634
  msgstr ""
635
 
@@ -643,7 +643,7 @@ msgstr ""
643
 
644
  #: admin/installer.php:83 class/subscription.php:336 class/subscription.php:356
645
  #: class/subscription.php:357 class/subscription.php:358
646
- #: wpuf-functions.php:1288
647
  msgid "Subscription"
648
  msgstr ""
649
 
@@ -688,23 +688,23 @@ msgstr ""
688
  msgid "Sample Form"
689
  msgstr ""
690
 
691
- #: admin/posting.php:52 class/render-form.php:1419 wpuf.php:347
692
  msgid "Are you sure?"
693
  msgstr ""
694
 
695
- #: admin/posting.php:58 wpuf.php:353
696
  msgid "Allowed Files"
697
  msgstr ""
698
 
699
- #: admin/posting.php:61 wpuf.php:356
700
  msgid "Maximum number of files reached!"
701
  msgstr ""
702
 
703
- #: admin/posting.php:62 wpuf.php:357
704
  msgid "The file you have uploaded exceeds the file size limit. Please try again."
705
  msgstr ""
706
 
707
- #: admin/posting.php:63 wpuf.php:358
708
  msgid "You have uploaded an incorrect file type. Please try again."
709
  msgstr ""
710
 
@@ -1200,7 +1200,7 @@ msgstr ""
1200
  msgid "Are you sure to delete this pack?"
1201
  msgstr ""
1202
 
1203
- #: admin/subscription.php:231 class/render-form.php:1419
1204
  #: class/transactions-list-table.php:114 class/transactions-list-table.php:175
1205
  #: class/upload.php:171 includes/free/edit-user.php:101
1206
  #: templates/dashboard/posts.php:160 templates/dashboard.php:114
@@ -1932,40 +1932,40 @@ msgstr ""
1932
  msgid "Please make sure you've published your form."
1933
  msgstr ""
1934
 
1935
- #: class/render-form.php:871
1936
  msgid "Insert Photo"
1937
  msgstr ""
1938
 
1939
- #: class/render-form.php:1143 class/render-form.php:1148
1940
  #: includes/free/edit-profile.php:198 templates/dashboard/edit-profile.php:36
1941
  msgid "Strength indicator"
1942
  msgstr ""
1943
 
1944
- #: class/render-form.php:1149
1945
  msgid "Very weak"
1946
  msgstr ""
1947
 
1948
- #: class/render-form.php:1150
1949
  msgid "Weak"
1950
  msgstr ""
1951
 
1952
- #: class/render-form.php:1151
1953
  msgid "Medium"
1954
  msgstr ""
1955
 
1956
- #: class/render-form.php:1152
1957
  msgid "Strong"
1958
  msgstr ""
1959
 
1960
- #: class/render-form.php:1153
1961
  msgid "Mismatch"
1962
  msgstr ""
1963
 
1964
- #: class/render-form.php:1175 class/render-form.php:1283
1965
  msgid "-- Select --"
1966
  msgstr ""
1967
 
1968
- #: class/render-form.php:1407
1969
  msgid "Select Image"
1970
  msgstr ""
1971
 
@@ -2699,239 +2699,239 @@ msgstr ""
2699
  msgid "CSV"
2700
  msgstr ""
2701
 
2702
- #: wpuf-functions.php:1287
2703
  msgid "Posts"
2704
  msgstr ""
2705
 
2706
- #: wpuf-functions.php:1289
2707
  msgid "Edit Profile"
2708
  msgstr ""
2709
 
2710
- #: wpuf-functions.php:1393
2711
  msgid "United Arab Emirates Dirham"
2712
  msgstr ""
2713
 
2714
- #: wpuf-functions.php:1394
2715
  msgid "Australian Dollars"
2716
  msgstr ""
2717
 
2718
- #: wpuf-functions.php:1395
2719
  msgid "Argentine Peso"
2720
  msgstr ""
2721
 
2722
- #: wpuf-functions.php:1396
2723
  msgid "Bangladeshi Taka"
2724
  msgstr ""
2725
 
2726
- #: wpuf-functions.php:1397
2727
  msgid "Brazilian Real"
2728
  msgstr ""
2729
 
2730
- #: wpuf-functions.php:1398
2731
  msgid "Bulgarian Lev"
2732
  msgstr ""
2733
 
2734
- #: wpuf-functions.php:1399
2735
  msgid "Canadian Dollars"
2736
  msgstr ""
2737
 
2738
- #: wpuf-functions.php:1400
2739
  msgid "Chilean Peso"
2740
  msgstr ""
2741
 
2742
- #: wpuf-functions.php:1401
2743
  msgid "Chinese Yuan"
2744
  msgstr ""
2745
 
2746
- #: wpuf-functions.php:1402
2747
  msgid "Colombian Peso"
2748
  msgstr ""
2749
 
2750
- #: wpuf-functions.php:1403
2751
  msgid "Czech Koruna"
2752
  msgstr ""
2753
 
2754
- #: wpuf-functions.php:1404
2755
  msgid "Danish Krone"
2756
  msgstr ""
2757
 
2758
- #: wpuf-functions.php:1405
2759
  msgid "Dominican Peso"
2760
  msgstr ""
2761
 
2762
- #: wpuf-functions.php:1406
2763
  msgid "Algerian Dinar"
2764
  msgstr ""
2765
 
2766
- #: wpuf-functions.php:1407
2767
  msgid "Euros"
2768
  msgstr ""
2769
 
2770
- #: wpuf-functions.php:1408
2771
  msgid "Hong Kong Dollar"
2772
  msgstr ""
2773
 
2774
- #: wpuf-functions.php:1409
2775
  msgid "Croatia kuna"
2776
  msgstr ""
2777
 
2778
- #: wpuf-functions.php:1410
2779
  msgid "Hungarian Forint"
2780
  msgstr ""
2781
 
2782
- #: wpuf-functions.php:1411
2783
  msgid "Icelandic krona"
2784
  msgstr ""
2785
 
2786
- #: wpuf-functions.php:1412
2787
  msgid "Indonesia Rupiah"
2788
  msgstr ""
2789
 
2790
- #: wpuf-functions.php:1413
2791
  msgid "Indian Rupee"
2792
  msgstr ""
2793
 
2794
- #: wpuf-functions.php:1414
2795
  msgid "Nepali Rupee"
2796
  msgstr ""
2797
 
2798
- #: wpuf-functions.php:1415
2799
  msgid "Israeli Shekel"
2800
  msgstr ""
2801
 
2802
- #: wpuf-functions.php:1416
2803
  msgid "Japanese Yen"
2804
  msgstr ""
2805
 
2806
- #: wpuf-functions.php:1417
2807
  msgid "Lao Kip"
2808
  msgstr ""
2809
 
2810
- #: wpuf-functions.php:1418
2811
  msgid "South Korean Won"
2812
  msgstr ""
2813
 
2814
- #: wpuf-functions.php:1419
2815
  msgid "Malaysian Ringgits"
2816
  msgstr ""
2817
 
2818
- #: wpuf-functions.php:1420
2819
  msgid "Mexican Peso"
2820
  msgstr ""
2821
 
2822
- #: wpuf-functions.php:1421
2823
  msgid "Nigerian Naira"
2824
  msgstr ""
2825
 
2826
- #: wpuf-functions.php:1422
2827
  msgid "Norwegian Krone"
2828
  msgstr ""
2829
 
2830
- #: wpuf-functions.php:1423
2831
  msgid "New Zealand Dollar"
2832
  msgstr ""
2833
 
2834
- #: wpuf-functions.php:1424
2835
  msgid "Omani Rial"
2836
  msgstr ""
2837
 
2838
- #: wpuf-functions.php:1425
2839
  msgid "Iranian Rial"
2840
  msgstr ""
2841
 
2842
- #: wpuf-functions.php:1426
2843
  msgid "Pakistani Rupee"
2844
  msgstr ""
2845
 
2846
- #: wpuf-functions.php:1427
2847
  msgid "Paraguayan Guaraní"
2848
  msgstr ""
2849
 
2850
- #: wpuf-functions.php:1428
2851
  msgid "Philippine Pesos"
2852
  msgstr ""
2853
 
2854
- #: wpuf-functions.php:1429
2855
  msgid "Polish Zloty"
2856
  msgstr ""
2857
 
2858
- #: wpuf-functions.php:1430
2859
  msgid "Pounds Sterling"
2860
  msgstr ""
2861
 
2862
- #: wpuf-functions.php:1431
2863
  msgid "Romanian Leu"
2864
  msgstr ""
2865
 
2866
- #: wpuf-functions.php:1432
2867
  msgid "Russian Ruble"
2868
  msgstr ""
2869
 
2870
- #: wpuf-functions.php:1433
2871
  msgid "Saudi Riyal"
2872
  msgstr ""
2873
 
2874
- #: wpuf-functions.php:1434
2875
  msgid "Singapore Dollar"
2876
  msgstr ""
2877
 
2878
- #: wpuf-functions.php:1435
2879
  msgid "South African rand"
2880
  msgstr ""
2881
 
2882
- #: wpuf-functions.php:1436
2883
  msgid "Swedish Krona"
2884
  msgstr ""
2885
 
2886
- #: wpuf-functions.php:1437
2887
  msgid "Swiss Franc"
2888
  msgstr ""
2889
 
2890
- #: wpuf-functions.php:1438
2891
  msgid "Taiwan New Dollars"
2892
  msgstr ""
2893
 
2894
- #: wpuf-functions.php:1439
2895
  msgid "Thai Baht"
2896
  msgstr ""
2897
 
2898
- #: wpuf-functions.php:1440
2899
  msgid "Turkish Lira"
2900
  msgstr ""
2901
 
2902
- #: wpuf-functions.php:1441
2903
  msgid "US Dollar"
2904
  msgstr ""
2905
 
2906
- #: wpuf-functions.php:1442
2907
  msgid "Vietnamese Dong"
2908
  msgstr ""
2909
 
2910
- #: wpuf-functions.php:1443
2911
  msgid "Egyptian Pound"
2912
  msgstr ""
2913
 
2914
- #: wpuf.php:109
2915
  msgid "Your Post Has Been Expired"
2916
  msgstr ""
2917
 
2918
- #: wpuf.php:277
2919
  msgid "is required"
2920
  msgstr ""
2921
 
2922
- #: wpuf.php:278
2923
  msgid "does not match"
2924
  msgstr ""
2925
 
2926
- #: wpuf.php:279
2927
  msgid "is not valid"
2928
  msgstr ""
2929
 
2930
- #: wpuf.php:341
2931
  msgid "Please fix the errors to proceed"
2932
  msgstr ""
2933
 
2934
- #: wpuf.php:343
2935
  msgid "Word limit reached"
2936
  msgstr ""
2937
 
@@ -2953,7 +2953,7 @@ msgstr ""
2953
  msgid "https://tareq.co"
2954
  msgstr ""
2955
 
2956
- #: wpuf-functions.php:1003
2957
  msgctxt "tag delimiter"
2958
  msgid ","
2959
  msgstr ""
2
  # This file is distributed under the GPL2.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP User Frontend 2.4.4\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wedevs.com/support/forum/plugin-support/wp-user-frontend/\n"
8
+ "POT-Creation-Date: 2017-02-22 07:01:26+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
629
  "installed and saved!"
630
  msgstr ""
631
 
632
+ #: admin/installer.php:73 admin/settings-options.php:17 wpuf-functions.php:1290
633
  msgid "Dashboard"
634
  msgstr ""
635
 
643
 
644
  #: admin/installer.php:83 class/subscription.php:336 class/subscription.php:356
645
  #: class/subscription.php:357 class/subscription.php:358
646
+ #: wpuf-functions.php:1292
647
  msgid "Subscription"
648
  msgstr ""
649
 
688
  msgid "Sample Form"
689
  msgstr ""
690
 
691
+ #: admin/posting.php:52 class/render-form.php:1423 wpuf.php:344
692
  msgid "Are you sure?"
693
  msgstr ""
694
 
695
+ #: admin/posting.php:58 wpuf.php:350
696
  msgid "Allowed Files"
697
  msgstr ""
698
 
699
+ #: admin/posting.php:61 wpuf.php:353
700
  msgid "Maximum number of files reached!"
701
  msgstr ""
702
 
703
+ #: admin/posting.php:62 wpuf.php:354
704
  msgid "The file you have uploaded exceeds the file size limit. Please try again."
705
  msgstr ""
706
 
707
+ #: admin/posting.php:63 wpuf.php:355
708
  msgid "You have uploaded an incorrect file type. Please try again."
709
  msgstr ""
710
 
1200
  msgid "Are you sure to delete this pack?"
1201
  msgstr ""
1202
 
1203
+ #: admin/subscription.php:231 class/render-form.php:1423
1204
  #: class/transactions-list-table.php:114 class/transactions-list-table.php:175
1205
  #: class/upload.php:171 includes/free/edit-user.php:101
1206
  #: templates/dashboard/posts.php:160 templates/dashboard.php:114
1932
  msgid "Please make sure you've published your form."
1933
  msgstr ""
1934
 
1935
+ #: class/render-form.php:875
1936
  msgid "Insert Photo"
1937
  msgstr ""
1938
 
1939
+ #: class/render-form.php:1147 class/render-form.php:1152
1940
  #: includes/free/edit-profile.php:198 templates/dashboard/edit-profile.php:36
1941
  msgid "Strength indicator"
1942
  msgstr ""
1943
 
1944
+ #: class/render-form.php:1153
1945
  msgid "Very weak"
1946
  msgstr ""
1947
 
1948
+ #: class/render-form.php:1154
1949
  msgid "Weak"
1950
  msgstr ""
1951
 
1952
+ #: class/render-form.php:1155
1953
  msgid "Medium"
1954
  msgstr ""
1955
 
1956
+ #: class/render-form.php:1156
1957
  msgid "Strong"
1958
  msgstr ""
1959
 
1960
+ #: class/render-form.php:1157
1961
  msgid "Mismatch"
1962
  msgstr ""
1963
 
1964
+ #: class/render-form.php:1179 class/render-form.php:1287
1965
  msgid "-- Select --"
1966
  msgstr ""
1967
 
1968
+ #: class/render-form.php:1411
1969
  msgid "Select Image"
1970
  msgstr ""
1971
 
2699
  msgid "CSV"
2700
  msgstr ""
2701
 
2702
+ #: wpuf-functions.php:1291
2703
  msgid "Posts"
2704
  msgstr ""
2705
 
2706
+ #: wpuf-functions.php:1293
2707
  msgid "Edit Profile"
2708
  msgstr ""
2709
 
2710
+ #: wpuf-functions.php:1403
2711
  msgid "United Arab Emirates Dirham"
2712
  msgstr ""
2713
 
2714
+ #: wpuf-functions.php:1404
2715
  msgid "Australian Dollars"
2716
  msgstr ""
2717
 
2718
+ #: wpuf-functions.php:1405
2719
  msgid "Argentine Peso"
2720
  msgstr ""
2721
 
2722
+ #: wpuf-functions.php:1406
2723
  msgid "Bangladeshi Taka"
2724
  msgstr ""
2725
 
2726
+ #: wpuf-functions.php:1407
2727
  msgid "Brazilian Real"
2728
  msgstr ""
2729
 
2730
+ #: wpuf-functions.php:1408
2731
  msgid "Bulgarian Lev"
2732
  msgstr ""
2733
 
2734
+ #: wpuf-functions.php:1409
2735
  msgid "Canadian Dollars"
2736
  msgstr ""
2737
 
2738
+ #: wpuf-functions.php:1410
2739
  msgid "Chilean Peso"
2740
  msgstr ""
2741
 
2742
+ #: wpuf-functions.php:1411
2743
  msgid "Chinese Yuan"
2744
  msgstr ""
2745
 
2746
+ #: wpuf-functions.php:1412
2747
  msgid "Colombian Peso"
2748
  msgstr ""
2749
 
2750
+ #: wpuf-functions.php:1413
2751
  msgid "Czech Koruna"
2752
  msgstr ""
2753
 
2754
+ #: wpuf-functions.php:1414
2755
  msgid "Danish Krone"
2756
  msgstr ""
2757
 
2758
+ #: wpuf-functions.php:1415
2759
  msgid "Dominican Peso"
2760
  msgstr ""
2761
 
2762
+ #: wpuf-functions.php:1416
2763
  msgid "Algerian Dinar"
2764
  msgstr ""
2765
 
2766
+ #: wpuf-functions.php:1417
2767
  msgid "Euros"
2768
  msgstr ""
2769
 
2770
+ #: wpuf-functions.php:1418
2771
  msgid "Hong Kong Dollar"
2772
  msgstr ""
2773
 
2774
+ #: wpuf-functions.php:1419
2775
  msgid "Croatia kuna"
2776
  msgstr ""
2777
 
2778
+ #: wpuf-functions.php:1420
2779
  msgid "Hungarian Forint"
2780
  msgstr ""
2781
 
2782
+ #: wpuf-functions.php:1421
2783
  msgid "Icelandic krona"
2784
  msgstr ""
2785
 
2786
+ #: wpuf-functions.php:1422
2787
  msgid "Indonesia Rupiah"
2788
  msgstr ""
2789
 
2790
+ #: wpuf-functions.php:1423
2791
  msgid "Indian Rupee"
2792
  msgstr ""
2793
 
2794
+ #: wpuf-functions.php:1424
2795
  msgid "Nepali Rupee"
2796
  msgstr ""
2797
 
2798
+ #: wpuf-functions.php:1425
2799
  msgid "Israeli Shekel"
2800
  msgstr ""
2801
 
2802
+ #: wpuf-functions.php:1426
2803
  msgid "Japanese Yen"
2804
  msgstr ""
2805
 
2806
+ #: wpuf-functions.php:1427
2807
  msgid "Lao Kip"
2808
  msgstr ""
2809
 
2810
+ #: wpuf-functions.php:1428
2811
  msgid "South Korean Won"
2812
  msgstr ""
2813
 
2814
+ #: wpuf-functions.php:1429
2815
  msgid "Malaysian Ringgits"
2816
  msgstr ""
2817
 
2818
+ #: wpuf-functions.php:1430
2819
  msgid "Mexican Peso"
2820
  msgstr ""
2821
 
2822
+ #: wpuf-functions.php:1431
2823
  msgid "Nigerian Naira"
2824
  msgstr ""
2825
 
2826
+ #: wpuf-functions.php:1432
2827
  msgid "Norwegian Krone"
2828
  msgstr ""
2829
 
2830
+ #: wpuf-functions.php:1433
2831
  msgid "New Zealand Dollar"
2832
  msgstr ""
2833
 
2834
+ #: wpuf-functions.php:1434
2835
  msgid "Omani Rial"
2836
  msgstr ""
2837
 
2838
+ #: wpuf-functions.php:1435
2839
  msgid "Iranian Rial"
2840
  msgstr ""
2841
 
2842
+ #: wpuf-functions.php:1436
2843
  msgid "Pakistani Rupee"
2844
  msgstr ""
2845
 
2846
+ #: wpuf-functions.php:1437
2847
  msgid "Paraguayan Guaraní"
2848
  msgstr ""
2849
 
2850
+ #: wpuf-functions.php:1438
2851
  msgid "Philippine Pesos"
2852
  msgstr ""
2853
 
2854
+ #: wpuf-functions.php:1439
2855
  msgid "Polish Zloty"
2856
  msgstr ""
2857
 
2858
+ #: wpuf-functions.php:1440
2859
  msgid "Pounds Sterling"
2860
  msgstr ""
2861
 
2862
+ #: wpuf-functions.php:1441
2863
  msgid "Romanian Leu"
2864
  msgstr ""
2865
 
2866
+ #: wpuf-functions.php:1442
2867
  msgid "Russian Ruble"
2868
  msgstr ""
2869
 
2870
+ #: wpuf-functions.php:1443
2871
  msgid "Saudi Riyal"
2872
  msgstr ""
2873
 
2874
+ #: wpuf-functions.php:1444
2875
  msgid "Singapore Dollar"
2876
  msgstr ""
2877
 
2878
+ #: wpuf-functions.php:1445
2879
  msgid "South African rand"
2880
  msgstr ""
2881
 
2882
+ #: wpuf-functions.php:1446
2883
  msgid "Swedish Krona"
2884
  msgstr ""
2885
 
2886
+ #: wpuf-functions.php:1447
2887
  msgid "Swiss Franc"
2888
  msgstr ""
2889
 
2890
+ #: wpuf-functions.php:1448
2891
  msgid "Taiwan New Dollars"
2892
  msgstr ""
2893
 
2894
+ #: wpuf-functions.php:1449
2895
  msgid "Thai Baht"
2896
  msgstr ""
2897
 
2898
+ #: wpuf-functions.php:1450
2899
  msgid "Turkish Lira"
2900
  msgstr ""
2901
 
2902
+ #: wpuf-functions.php:1451
2903
  msgid "US Dollar"
2904
  msgstr ""
2905
 
2906
+ #: wpuf-functions.php:1452
2907
  msgid "Vietnamese Dong"
2908
  msgstr ""
2909
 
2910
+ #: wpuf-functions.php:1453
2911
  msgid "Egyptian Pound"
2912
  msgstr ""
2913
 
2914
+ #: wpuf.php:106
2915
  msgid "Your Post Has Been Expired"
2916
  msgstr ""
2917
 
2918
+ #: wpuf.php:274
2919
  msgid "is required"
2920
  msgstr ""
2921
 
2922
+ #: wpuf.php:275
2923
  msgid "does not match"
2924
  msgstr ""
2925
 
2926
+ #: wpuf.php:276
2927
  msgid "is not valid"
2928
  msgstr ""
2929
 
2930
+ #: wpuf.php:338
2931
  msgid "Please fix the errors to proceed"
2932
  msgstr ""
2933
 
2934
+ #: wpuf.php:340
2935
  msgid "Word limit reached"
2936
  msgstr ""
2937
 
2953
  msgid "https://tareq.co"
2954
  msgstr ""
2955
 
2956
+ #: wpuf-functions.php:1002
2957
  msgctxt "tag delimiter"
2958
  msgid ","
2959
  msgstr ""
readme.txt CHANGED
@@ -161,6 +161,16 @@ redirected to the edit page with that post id. Then you'll see the edit post for
161
 
162
  == Changelog ==
163
 
 
 
 
 
 
 
 
 
 
 
164
  = v2.4.3 (07 February, 2017) =
165
 
166
  * [fix] PHP backward compatibility issue
161
 
162
  == Changelog ==
163
 
164
+ = v2.4.4 (22 February, 2017) =
165
+
166
+ * [fix] Undefined JavaScript error when post is editing in admin
167
+ * [fix] User IP if the script is running in cli
168
+ * [fix] Date field on frontend post
169
+ * [fix] Hide subscription tab from my account page when subscription is turned off
170
+ * [fix] Plugin activation hooks
171
+ * [fix] Recaptcha refresh when validation failed
172
+
173
+
174
  = v2.4.3 (07 February, 2017) =
175
 
176
  * [fix] PHP backward compatibility issue
wpuf-functions.php CHANGED
@@ -734,7 +734,7 @@ function wpuf_show_custom_fields( $content ) {
734
 
735
  }
736
 
737
- $html = $address_html;
738
 
739
  } else {
740
 
@@ -747,7 +747,7 @@ function wpuf_show_custom_fields( $content ) {
747
 
748
  $new = implode( ', ', $value );
749
 
750
- if( $new ) {
751
  $html .= sprintf( '<li><label>%s</label>: %s</li>', $attr['label'], make_clickable( $new ) );
752
  }
753
  }
@@ -756,7 +756,6 @@ function wpuf_show_custom_fields( $content ) {
756
  }
757
  }
758
 
759
- // var_dump( $attr );
760
  $html .= '</ul>';
761
 
762
  return $content . $html;
@@ -1215,6 +1214,11 @@ function wpuf_clear_buffer() {
1215
  * @return boolean
1216
  */
1217
  function wpuf_is_license_expired() {
 
 
 
 
 
1218
  if ( in_array( $_SERVER['REMOTE_ADDR'], array( '127.0.0.1', '::1' ) ) ) {
1219
  return false;
1220
  }
@@ -1289,6 +1293,12 @@ function wpuf_get_account_sections() {
1289
  array( 'slug' => 'edit-profile', 'label' => __( 'Edit Profile', 'wpuf' ) ),
1290
  );
1291
 
 
 
 
 
 
 
1292
  return apply_filters( 'wpuf_account_sections', $account_sections );
1293
  }
1294
 
734
 
735
  }
736
 
737
+ $html .= $address_html;
738
 
739
  } else {
740
 
747
 
748
  $new = implode( ', ', $value );
749
 
750
+ if ( $new ) {
751
  $html .= sprintf( '<li><label>%s</label>: %s</li>', $attr['label'], make_clickable( $new ) );
752
  }
753
  }
756
  }
757
  }
758
 
 
759
  $html .= '</ul>';
760
 
761
  return $content . $html;
1214
  * @return boolean
1215
  */
1216
  function wpuf_is_license_expired() {
1217
+ // set the localhost ip if the script is running in cli
1218
+ if ( ! isset( $_SERVER['REMOTE_ADDR'] ) ) {
1219
+ $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
1220
+ }
1221
+
1222
  if ( in_array( $_SERVER['REMOTE_ADDR'], array( '127.0.0.1', '::1' ) ) ) {
1223
  return false;
1224
  }
1293
  array( 'slug' => 'edit-profile', 'label' => __( 'Edit Profile', 'wpuf' ) ),
1294
  );
1295
 
1296
+ $subscription = wpuf_get_option( 'force_pack', 'wpuf_payment', 'no' );
1297
+
1298
+ if ( 'no' === $subscription ) {
1299
+ unset( $account_sections[2] ); // unset the subscription section
1300
+ }
1301
+
1302
  return apply_filters( 'wpuf_account_sections', $account_sections );
1303
  }
1304
 
wpuf.php CHANGED
@@ -4,13 +4,13 @@ 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: Tareq Hasan
7
- Version: 2.4.3
8
  Author URI: https://tareq.co
9
  License: GPL2
10
  TextDomain: wpuf
11
  */
12
 
13
- define( 'WPUF_VERSION', '2.4.3' );
14
  define( 'WPUF_FILE', __FILE__ );
15
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
16
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
@@ -62,9 +62,6 @@ class WP_User_Frontend {
62
 
63
  $this->instantiate();
64
 
65
- register_activation_hook( __FILE__, array($this, 'install') );
66
- register_deactivation_hook( __FILE__, array($this, 'uninstall') );
67
-
68
  // set schedule event
69
  add_action( 'wpuf_remove_expired_post_hook', array( $this, 'action_to_remove_exipred_post' ) );
70
 
@@ -87,7 +84,7 @@ class WP_User_Frontend {
87
  *
88
  * @since 2.2.7
89
  */
90
- public function set_schedule_events() {
91
  wp_schedule_event( time(), 'daily', 'wpuf_remove_expired_post_hook' );
92
  }
93
 
@@ -197,10 +194,10 @@ class WP_User_Frontend {
197
  *
198
  * @global object $wpdb
199
  */
200
- function install() {
201
  global $wpdb;
202
 
203
- $this->set_schedule_events();
204
 
205
  flush_rewrite_rules( false );
206
 
@@ -248,7 +245,7 @@ class WP_User_Frontend {
248
  *
249
  * @return void
250
  */
251
- function uninstall() {
252
  wp_clear_scheduled_hook( 'wpuf_remove_expired_post_hook' );
253
  }
254
 
@@ -473,3 +470,5 @@ function wpuf() {
473
  }
474
 
475
  add_action( 'plugins_loaded', 'wpuf' );
 
 
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: Tareq Hasan
7
+ Version: 2.4.4
8
  Author URI: https://tareq.co
9
  License: GPL2
10
  TextDomain: wpuf
11
  */
12
 
13
+ define( 'WPUF_VERSION', '2.4.4' );
14
  define( 'WPUF_FILE', __FILE__ );
15
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
16
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
62
 
63
  $this->instantiate();
64
 
 
 
 
65
  // set schedule event
66
  add_action( 'wpuf_remove_expired_post_hook', array( $this, 'action_to_remove_exipred_post' ) );
67
 
84
  *
85
  * @since 2.2.7
86
  */
87
+ public static function set_schedule_events() {
88
  wp_schedule_event( time(), 'daily', 'wpuf_remove_expired_post_hook' );
89
  }
90
 
194
  *
195
  * @global object $wpdb
196
  */
197
+ public static function install() {
198
  global $wpdb;
199
 
200
+ self::set_schedule_events();
201
 
202
  flush_rewrite_rules( false );
203
 
245
  *
246
  * @return void
247
  */
248
+ public static function uninstall() {
249
  wp_clear_scheduled_hook( 'wpuf_remove_expired_post_hook' );
250
  }
251
 
470
  }
471
 
472
  add_action( 'plugins_loaded', 'wpuf' );
473
+ register_activation_hook( __FILE__, array( 'WP_User_Frontend', 'install' ) );
474
+ register_deactivation_hook( __FILE__, array( 'WP_User_Frontend', 'uninstall' ) );