Version Description
Give version 1.8 is a major update. Please make sure you make a backup of your database before updating.
Download this release
Release Info
Developer | webdevmattcrom |
Plugin | Give – Donation Plugin and Fundraising Platform |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- assets/js/admin/admin-scripts.js +4 -1
- assets/js/admin/admin-scripts.min.js +2 -2
- assets/js/admin/admin-settings.js +24 -0
- assets/js/admin/admin-settings.min.js +1 -1
- give.php +3 -3
- includes/admin/admin-filters.php +1 -1
- includes/admin/class-blank-slate.php +1 -1
- includes/admin/donors/class-donor-table.php +1 -1
- includes/admin/donors/donors.php +1 -1
- includes/admin/emails/class-email-notifications.php +2 -1
- includes/admin/settings/class-settings-general.php +16 -8
- includes/admin/tools/class-settings-logs.php +2 -1
- includes/admin/tools/import/class-give-import-core-settings.php +4 -4
- includes/admin/tools/import/class-give-import-donations.php +2 -2
- includes/admin/tools/logs/class-update-logs-list-table.php +268 -0
- includes/admin/tools/logs/logs.php +43 -0
- includes/admin/tools/views/html-admin-page-system-info.php +12 -1
- includes/admin/upgrades/class-give-updates.php +229 -21
- includes/admin/upgrades/upgrade-functions.php +454 -0
- includes/admin/upgrades/views/upgrades.php +38 -4
- includes/ajax-functions.php +3 -3
- includes/api/class-give-api.php +1 -1
- includes/class-give-background-updater.php +99 -3
- includes/class-give-cache.php +3 -7
- includes/class-give-db-donor-meta.php +0 -27
- includes/class-give-db-form-meta.php +0 -29
- includes/class-give-db-logs-meta.php +0 -28
- includes/class-give-db-logs.php +1 -1
- includes/class-give-db-meta.php +66 -24
- includes/class-give-db-payment-meta.php +0 -29
- includes/class-give-db.php +10 -0
- includes/class-give-donate-form.php +2 -2
- includes/class-give-donor.php +2 -2
- includes/class-give-logging.php +1 -0
- includes/donors/class-give-donors-query.php +1 -1
- includes/emails/class-give-email-tags.php +6 -20
- includes/formatting.php +1 -1
- includes/forms/functions.php +1 -1
- includes/gateways/functions.php +1 -1
- includes/import-functions.php +17 -17
- includes/install.php +5 -1
- includes/libraries/wp-background-process.php +1 -1
- includes/payments/actions.php +6 -6
- includes/payments/class-give-payment.php +16 -0
- includes/payments/class-payments-query.php +2 -1
- includes/payments/functions.php +1 -1
- languages/give.pot +311 -239
- readme.txt +12 -1
assets/js/admin/admin-scripts.js
CHANGED
@@ -1086,7 +1086,10 @@ var give_setting_edit = false;
|
|
1086 |
|
1087 |
if( $self.el.main_container.data('resume-update') ) {
|
1088 |
$self.el.update_link.addClass('active').hide().removeClass('give-hidden');
|
1089 |
-
|
|
|
|
|
|
|
1090 |
}
|
1091 |
|
1092 |
// Bailout.
|
1086 |
|
1087 |
if( $self.el.main_container.data('resume-update') ) {
|
1088 |
$self.el.update_link.addClass('active').hide().removeClass('give-hidden');
|
1089 |
+
|
1090 |
+
if( ! $('#give-restart-upgrades').length ) {
|
1091 |
+
window.setTimeout(Give_Updates.get_db_updates_info, 1000, $self );
|
1092 |
+
}
|
1093 |
}
|
1094 |
|
1095 |
// Bailout.
|
assets/js/admin/admin-scripts.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function give_render_responsive_tabs(){var e=jQuery(".give-settings-page"),t=jQuery("h2.give-nav-tab-wrapper"),i=e.width(),n=jQuery(".give-sub-nav-tab-wrapper"),a=jQuery("nav",n),s=jQuery("div.give-nav-tab-wrapper > a:not(give-not-tab)"),o=[],r=[],d=0;if(600<jQuery(window).outerWidth()&&(d=200),!e.length)return!1;t.css({height:"auto",overflow:"visible"}),s.removeClass("give-hidden");var c=new Promise(function(e,t){jQuery.each(s,function(e,t){t=jQuery(t),d+=parseInt(t.outerWidth()),d<i?o.push(t):r.push(t)}),e(!0)});c.then(function(e){if(r.length&&-1!==window.location.search.indexOf("&tab=")){var i={},s=get_url_params();r=r.filter(function(e){var t=-1!==parseInt(e.attr("href").indexOf("&tab="+s.tab));return t&&(i=e),!t}),i.length&&(r.unshift(o.pop()),o.push(i))}var d=new Promise(function(e,t){o.length&&jQuery.each(o,function(e,t){t=jQuery(t),t.hasClass("give-hidden")&&t.removeClass("give-hidden")}),e(!0)});d.then(function(e){r.length?(a.html(""),jQuery.each(r,function(e,t){t=jQuery(t),t.hasClass("nav-tab-active")||t.addClass("give-hidden"),t.clone().removeClass().appendTo(a)}),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(n),n.show()):n.hide()})})}function get_url_params(){for(var e,t=[],i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),n=0;n<i.length;n++)e=i[n].split("="),t[e[0]]=e[1];return t}function give_on_core_settings_import_start(){var e=jQuery("form.tools-setting-page-import"),t=e.find(".give-progress");give_setting_edit=!0,jQuery.ajax({type:"POST",url:ajaxurl,data:{action:give_vars.core_settings_import,fields:e.serialize()},dataType:"json",success:function(e){give_setting_edit=!1,!0===e.success?jQuery(t).find("div").width(e.percentage+"%"):alert(give_vars.error_message),window.location=e.url},error:function(){give_setting_edit=!1,alert(give_vars.error_message)}})}function give_on_donation_import_start(){give_on_donation_import_ajax()}function give_on_donation_import_ajax(){var e=jQuery("form.tools-setting-page-import");give_setting_edit=!0;var t=e.find(".give-progress"),i=jQuery(t).data("total_ajax"),n=jQuery(t).data("current"),a=jQuery(t).data("start"),s=jQuery(t).data("end"),o=jQuery(t).data("next"),r=jQuery(t).data("total"),d=jQuery(t).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:give_vars.give_donation_import,total_ajax:i,current:n,start:a,end:s,next:o,total:r,per_page:d,fields:e.serialize()},dataType:"json",success:function(e){jQuery(t).data("current",e.current),jQuery(t).find("div").width(e.percentage+"%"),1==e.next?(jQuery(t).data("start",e.start),jQuery(t).data("end",e.end),1==e.last&&jQuery(t).data("next",!1),give_on_donation_import_ajax()):(give_setting_edit=!1,window.location=e.url)},error:function(){give_setting_edit=!1,alert(give_vars.error_message)}})}jQuery.noConflict();var give_setting_edit=!1;!function(e){function t(e,t){return e=accounting.unformat(e,give_vars.decimal_separator).toString(),t="undefined"!==t&&t,e=!1!==t?parseFloat(e).toFixed(t):parseFloat(e).toFixed(give_vars.currency_decimals)}var i=function(t,i){i=jQuery.extend({wrapper:!0,show:!1},i);var n=i.wrapper?e(".give-spinner-wrapper",t):{},a=e(".give-spinner",t);return i.show?(n.length&&n.addClass("is-active"),void a.addClass("is-active")):(n.length&&n.removeClass("is-active"),void a.removeClass("is-active"))},n=function(){e("body").on("click","button.notice-dismiss",function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&a()})},a=function(){var e="give-message",t=document.location.href,i=t.split("?");if(i.length>=2){for(var n=i.shift(),a=i.join("?"),s=encodeURIComponent(e)+"=",o=a.split(/[&;]/g),r=o.length;r-- >0;)o[r].lastIndexOf(s,0)!==-1&&o.splice(r,1);t=n+"?"+o.join("&"),window.history.pushState("",document.title,t)}return t},s=function(){if(e(".give_datepicker").length>0){var t="mm/dd/yy";e(".give_datepicker").datepicker({dateFormat:t})}},o=function(){var t=e(".give-select-chosen");t.on("chosen:ready",function(){e(this).next(".chosen-container").find("input.chosen-search-input").after('<span class="spinner"></span>')}),t.on("chosen:no_results",function(){var t=e(this).next(".chosen-container"),i=t.find("li.no-results"),n="";n=t.hasClass("give-select-chosen-ajax")&&i.length?give_vars.chosen.ajax_search_msg.replace("{search_term}",'"'+e("input",t).val()+'"'):give_vars.chosen.no_results_msg.replace("{search_term}",'"'+e("input",t).val()+'"'),i.html(n)}),t.chosen({inherit_select_classes:!0,placeholder_text_single:give_vars.one_option,placeholder_text_multiple:give_vars.one_or_more_option}),e(".chosen-container").each(function(){0===e(this).width()&&e(this).css("width","100%")}),e("#post").on("click",".give-thickbox",function(){e(".give-select-chosen","#choose-give-form").css("width","100%")});var i,n=342;e(document.body).on("keyup",".give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input",function(t){var a=e(this).val(),s=e(this).closest(".give-select-chosen"),o=s.prev(),r=s.find('input[type="text"]'),d=(s.hasClass("variations"),t.which),c="give_forms_search";if(s.prev().data("search-type")){if("no_ajax"===o.data("search-type"))return;c="give_"+o.data("search-type")+"_search"}a.length<=3||!c.length||9===d||13===d||16===d||17===d||18===d||19===d||20===d||27===d||33===d||34===d||35===d||36===d||37===d||38===d||39===d||40===d||44===d||45===d||144===d||145===d||91===d||93===d||224===d||112<=d&&123>=d||(clearTimeout(i),s.addClass("give-select-chosen-ajax"),i=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:c,s:a},dataType:"json",beforeSend:function(){o.closest("ul.chosen-results").empty(),r.prop("disabled",!0)},success:function(t){s.removeClass("give-select-chosen-ajax"),e("option:not(:selected)",o).remove(),t.length?(e.each(t,function(t,i){e('option[value="'+i.id+'"]',o).length||o.prepend('<option value="'+i.id+'">'+i.name+"</option>")}),s.prev("select.give-select-chosen").trigger("chosen:updated")):s.prev("select.give-select-chosen").trigger("chosen:no_results"),r.prop("disabled",!1),r.val(a).focus()}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){r.prop("disabled",!1)})},n))}),e(".give-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.give-select-chosen").data("search-type"),i="";"form"===t?i=give_vars.search_placeholder:(t="search_placeholder_"+t,give_vars[t]&&(i=give_vars[t])),e(this).attr("placeholder",i)})},r={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){e("body").on("click",".delete-single-donation",function(){return confirm(give_vars.delete_payment)})},resendSingleDonationReceipt:function(){e("body").on("click",".resend-single-donation-receipt",function(){return confirm(give_vars.resend_receipt)})}},d={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"},e.post(ajaxurl,data,function(i){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden"),t.closest(".column-container").find(".give-column").removeClass("column-full"),t.closest(".column-container").find(".give-column").addClass("column");var n=e("#give-order-address-state-wrap");n.find("*").not(".order-data-address-line").remove(),void 0!==typeof i.states_found&&!0===i.states_found?(n.append(i.data),n.find("select").chosen()):(n.append('<input type="text" name="give-payment-address[0][state]" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!==typeof i.show_field&&!1===i.show_field&&(t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"),t.closest(".column-container").find(".give-column").addClass("column-full"),t.closest(".column-container").find(".give-column").removeClass("column")))}),!1})},add_note:function(){e("#give-add-payment-note").on("click",function(t){t.preventDefault();var i={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#give-payment-note").val()};if(i.note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#give-payment-note").css("border-color");e("#give-payment-note").css("border-color","red"),setTimeout(function(){e("#give-payment-note").css("border-color",n)},500)}})},remove_note:function(){e("body").on("click",".give-delete-payment-note",function(t){if(t.preventDefault(),confirm(give_vars.delete_payment_note)){var i={action:"give_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)})},resend_receipt:function(){e("body").on("click","#give-resend-receipt",function(e){return confirm(give_vars.resend_receipt)})},variable_price_list:function(){e("#give_payment_form_select").chosen().change(function(){var t,i=e(".give-donation-level");return!!(t=e(this).val())&&(!!i.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){t=t.trim(),t?(i.html(t),e('select[name="give-variable-price"]').chosen().change()):i.html("")}}))}),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',function(){var t=jQuery(this).data("prices"),i=e("#give-payment-total");""!==t&&e(this).val()in t&&(i.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout(function(){i.css("background-color","white")},1e3))})}},c={init:function(){this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings(),this.saveButtonTriggered(),this.changeAlert(),this.detectSettingsChange()},setting_change_country:function(){e('select[name="base_country"]').change(function(){var t=e(this),i={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,i,function(n){t.closest("tr").next().show(),void 0!=typeof n.states_found&&1==n.states_found?e(':input[name="base_state"]').replaceWith(n.data):(void 0!=typeof n.show_field&&0==n.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+i.field_name+'" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'))}),!1})},toggle_options:function(){var t=e('input[name="email_access"]',".give-setting-tab-body-general");t.on("change",function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())}).change();var i=e('input[name="form_featured_img"]',".give-setting-tab-body-display");i.on("change",function(){var t=e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val();"enabled"===t?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()}).change();var n=e('input[name="terms"]',".give-setting-tab-body-display");n.on("change",function(){var t=e('input[name="terms"]:checked',".give-setting-tab-body-display").val();"enabled"===t?(e("#agree_to_terms_label").parents("tr").show(),e("#wp-agreement_text-wrap").parents("tr").show()):(e("#agree_to_terms_label").parents("tr").hide(),e("#wp-agreement_text-wrap").parents("tr").hide())}).change();var a=e('input[name="admin_notices"]',".give-setting-tab-body-emails");a.on("change",function(){var t=e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val();"enabled"===t?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())}).change()},main_setting_update_notice:function(){var t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout(function(){t.slideUp()},5e3)},verify_settings:function(){var t=e("#success_page"),i=e("#failure_page");t.add(i).change(function(){if(t.val()===i.val()){var n='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+give_vars.matched_success_failure_page+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+give_vars.dismiss_notice_text+"</span></button> </div>",a=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),a.length)return!1;e("h1","#give-mainform").after(n),a=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",a).click(function(){a.remove()})}}).change()},saveButtonTriggered:function(){e(".give-settings-setting-page").on("click",".give-save-button",function(){e(window).unbind("beforeunload")})},changeAlert:function(){e(window).bind("beforeunload",function(e){var t=give_vars.setting_not_save_message;if(give_setting_edit)return(e||window.event).returnValue=t,t})},detectSettingsChange:function(){var t=e(".give-settings-setting-page");if(t.length>0){var i=e("#give-mainform").serialize();t.on("change keyup blur","form",function(){var t=e("#give-mainform").serialize();give_setting_edit=i!==t})}}},l={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change(function(){var t=e(this);"other"===t.val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()})},donors_export:function(){e("#give_donor_export_form").change(function(){var t=e(this),i=e("option:selected",t).val(),n=e("#give_customer_export_option");"0"===t.val()?n.show():n.hide();var a=e(".give_price_options_select");if(0!=parseInt(i)){var s={action:"give_check_for_form_price_variations",form_id:i,all_prices:!0};e.post(ajaxurl,s,function(t){a.remove(),e("#give_donor_export_form_chosen").after(t)})}else a.remove()})},recount_stats:function(){e("body").on("change","#recount-stats-type",function(){var t=e("#give-tools-recount-form"),i=e("option:selected",this).data("type"),n=e("#recount-stats-submit"),a=e(".tools-form-dropdown");if(t.find(".notice-wrap").remove(),n.removeClass("button-disabled").attr("disabled",!1),a.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===i){t.append('<div class="notice-wrap"></div>');var s=t.find(".notice-wrap");s.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.reset_stats_warn+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-test-donors"===i){t.append('<div class="notice-wrap"></div>');var s=t.find(".notice-wrap");s.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_test_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===i){t.append('<div class="notice-wrap"></div>');var s=t.find(".notice-wrap");s.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_import_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else a.hide(),a.val(0);current_forms=e(".tools-form-dropdown-"+i),current_forms.show(),current_forms.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+i).show()}),e("body").on("change","#confirm-reset",function(){var t=e(this).is(":checked");t?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),e("#give-tools-recount-form").submit(function(t){var i=e("#recount-stats-type").val(),n=e(this),a=e("option:selected",this).data("type");if("reset-stats"===a){var s=e("#confirm-reset").is(":checked");if(s)return!0;r=!0}n.find(".notice-wrap").remove(),n.append('<div class="notice-wrap"></div>');var o=n.find(".notice-wrap"),r=!1;if(null!==i&&0!==i||(o.html('<div class="updated error"><p>'+give_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-form"===a){var d=e('select[name="form_id"]').val();0==d&&(o.html('<div class="updated error"><p>'+give_vars.batch_export_no_reqs+"</p></div>"),r=!0)}if(r)return n.find(".button-disabled").removeClass("button-disabled"),!1})}},v={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".give-export-form",function(i){i.preventDefault();var n=e(this).find('input[type="submit"]');if(!n.hasClass("button-disabled")){var a=e(this).serialize();n.addClass("button-disabled"),e("form.give-export-form select").attr("disabled",!0).trigger("chosen:updated"),e(this).find(".notice-wrap").remove(),e(this).append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,a,t)}})},process_step:function(t,i,n){give_setting_edit=!0;var a=!1;e.ajax({type:"POST",url:ajaxurl,data:{form:i,action:"give_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){give_setting_edit=!1,a=!0;var s=e(".give-export-form").find(".give-progress").parent().parent(),o=s.find(".notice-wrap");if(s.find(".button-disabled").removeClass("button-disabled"),e("form.give-export-form select").attr("disabled",!1).trigger("chosen:updated"),t.error){var r=t.message;o.html('<div class="updated error"><p>'+r+"</p></div>")}else if(t.success){var d=t.message;o.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+d+'<span class="notice-dismiss"></span></p></div>')}else o.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,function(){}),n.process_step(parseInt(t.step),i,n);!0===a&&(e("#give-tools-recount-form")[0].reset(),e("#give-tools-recount-form .tools-form-dropdown").hide(),e("#give-tools-recount-form .tools-form-dropdown-recount-form-select").val("0").trigger("chosen:updated"))}}).fail(function(t){give_setting_edit=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)})},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",function(){e("#give-batch-success").parent().slideUp("fast")})}},u={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-button a",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_progress_counter=Give_Selector_Cache.get(e(".give-update-progress-count")),t.el.main_container.data("resume-update")&&(t.el.update_link.addClass("active").hide().removeClass("give-hidden"),window.setTimeout(u.get_db_updates_info,1e3,t)),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+give_vars.db_update_confirmation_msg_button+"</a> "+give_vars.db_update_confirmation_msg+"</p></div>")}),e("#give-db-updates").on("click","a.give-run-update-button",function(i){return i.preventDefault(),!e(this).hasClass("active")&&(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),e.ajax({type:"POST",url:ajaxurl,data:{action:"give_run_db_updates",run_db_update:1},dataType:"json",success:function(e){}}),window.setTimeout(u.get_db_updates_info,500,t),!1)}))},get_db_updates_info:function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_db_updates_info"},dataType:"json",success:function(i){var n=Give_Selector_Cache.get(".notice-wrap",t.el.progress_container,!0);-1!==e.inArray("success",Object.keys(i))?i.success?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text("100%"),-1!==e.inArray("heading",Object.keys(i.data))&&t.el.heading.html("<strong>"+i.data.heading+"</strong>"),t.el.update_link.closest("p").remove(),n.html('<div class="notice notice-success is-dismissible"><p>'+i.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(i.data))&&t.el.heading.html("<strong>"+i.data.heading+"</strong>"),n.html('<div class="notice notice-error"><p>'+i.data.message+"</p></div>"),setTimeout(function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")},1e3)):i&&-1!==e.inArray("percentage",Object.keys(i.data))?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text(i.data.total_percentage+"%"),-1!==e.inArray("heading",Object.keys(i.data))&&t.el.heading.html("<strong>"+i.data.heading+"</strong>"),e(".give-progress div","#give-db-updates").animate({width:i.data.percentage+"%"},50,function(){}),window.setTimeout(u.get_db_updates_info,1e3,t)):(n.html('<div class="notice notice-error"><p>'+give_vars.updates.ajax_error+"</p></div>"),setTimeout(function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")},1e3))}})},process_step:function(t,i,n){give_setting_edit=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(i)},dataType:"json",success:function(t){give_setting_edit=!1;var i=Give_Selector_Cache.get(".notice-wrap",n.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout(function(){n.el.update_link.removeClass("active").show(),n.el.progress_main_container.addClass("give-hidden")},5e3)):t&&-1!==e.inArray("percentage",Object.keys(t.data))?(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,function(){}),-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",n.el.heading.data("update-count"))+"</strong>"),n.process_step(parseInt(t.data.step),t.data.update,n)):(i.html('<div class="notice notice-error"><p>'+give_vars.updates.ajax_error+"</p></div>"),setTimeout(function(){n.el.update_link.removeClass("active").show(),n.el.progress_main_container.addClass("give-hidden")},5e3))}}).fail(function(e){give_setting_edit=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",self.el.progress_container).append(e.responseText)}).always(function(){})},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",function(){e(this).parent().slideUp("fast")})}},g=function(){e('select[name="give-payment-status"]').on("change",function(){var t=e(this).val();e(".give-donation-status").removeClass(function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")}).addClass("status-"+t)})},p={init:function(){this.editDonor(),this.add_email(),this.removeUser(),this.cancelEdit(),this.add_note(),this.delete_checked(),this.addressesAction(),this.unlockDonorFields(),this.bulkDeleteDonor(),e("body").on("click",'#give-donors-filter .bulkactions input[type="submit"]',this.handleBulkActions)},unlockDonorFields:function(t){e("body").on("click",".give-lock-block",function(e){alert(give_vars.unlock_donor_fields),e.preventDefault()})},editDonor:function(){e("body").on("click","#edit-donor",function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block")})},removeUser:function(){e("body").on("click","#disconnect-donor",function(t){if(t.preventDefault(),!confirm(give_vars.disconnect_user))return!1;var i=e('input[name="customerinfo[id]"]').val(),n={give_action:"disconnect-userid",customer_id:i,_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,n,function(e){window.location.href=e.redirect},"json")})},cancelEdit:function(){e("body").on("click","#give-edit-donor-cancel",function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")})},add_note:function(){e("body").on("click","#add-donor-note",function(t){t.preventDefault();var i={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(i.donor_note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout(function(){e("#donor-note").css("border-color",n)},500)}})},delete_checked:function(){e("#give-donor-delete-confirm").change(function(){var t=e("#give-donor-delete-records"),i=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),i.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),i.attr("disabled",!0))})},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",function(t){t.preventDefault();var i=e(this),n=i.parent();n.parent().find(".notice-wrap").remove(),n.find(".spinner").css("visibility","visible"),i.attr("disabled",!0);var a=n.find('input[name="donor-id"]').val(),s=n.find('input[name="additional-email"]').val(),o=n.find('input[name="make-additional-primary"]').is(":checked"),r=n.find('input[name="add_email_nonce"]').val(),d={give_action:"add_donor_email",customer_id:a,email:s,primary:o,_wpnonce:r};e.post(ajaxurl,d,function(e){!0===e.success?window.location.href=e.redirect:(i.attr("disabled",!1),n.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),n.find(".spinner").css("visibility","hidden"))},"json")})},addressesAction:function(){var t=this,n=e("#donor-address-wrapper"),a=e(".all-address",n),s=e(".give-no-address-message",n),o=e(a).parent(),r=e(".address-form",n),d=e(".js-cancel",r),c=e('select[name="country"]',r),l=e(".add-new-address",n),v=parseInt(e('input[name="donor-id"]').val());c.on("change",function(){e(this).trigger("chosen:updated")}),a.on("click",".js-edit",function(i){var n=e(this).closest(".address");i.preventDefault(),e(".notice",o).remove(),t.__set_address_form_val(n),t.__set_address_form_action("update",n.data("address-id")),l.hide(),a.addClass("give-hidden"),r.removeClass("add-new-address-form-hidden"),r.data("process","update")}),a.on("click",".js-remove",function(i){i.preventDefault();var n=e(this).closest(".address");e(".notice",o).remove(),r.data("changed",!0),t.__set_address_form_val(n),t.__set_address_form_action("remove",n.data("address-id")),r.trigger("submit")}),l.on("click",function(i){i.preventDefault(),e(".notice",o).remove(),e(this).hide(),a.addClass("give-hidden"),r.removeClass("add-new-address-form-hidden"),t.__set_address_form_action("add"),t.__set_address_form_action()}),d.on("click",function(e){e.preventDefault(),r.find('input[type="text"]').val(""),l.show(),a.removeClass("give-hidden"),r.addClass("add-new-address-form-hidden")}),r.on("change",function(){e(this).data("changed",!0)}).on("submit",function(t){t.preventDefault();var d=e(this);return e(".notice",o).remove(),e(this).data("changed")?(e.ajax({type:"POST",url:ajaxurl,data:{action:"donor_manage_addresses",donorID:v,form:e("form",r).serialize()},beforeSend:function(){i(n,{show:!0})},success:function(t){if(i(n),t.success){var r;switch(t.data.action){case"add":e(".give-grid-row",a).append(t.data.address_html),!s.hasClass("give-hidden")&&e("div.give-grid-col-4",a).length&&s.addClass("give-hidden");break;case"remove":r=a.find('div[data-address-id*="'+t.data.id+'"]').parent(),r.length&&r.animate({"margin-left":"-999"},1e3,function(){r.remove(),s.hasClass("give-hidden")&&!e("div.give-grid-col-4",a).length&&s.removeClass("give-hidden")});break;case"update":r=a.find('div[data-address-id*="'+t.data.id+'"]').parent();var d=r.prev(),c={},l=!1;parseInt(e(".give-grid-row>div",a).length)<2?e(".give-grid-row",a).append(t.data.address_html):(d.length&&(d.after(t.data.address_html),l=!0),l||(c=r.next(),c.length&&c.before(t.data.address_html))),r.remove()}o.prepend(t.data.success_msg)}else o.prepend(t.data.error_msg)},dataType:"json"}).always(function(){d.data("changed",!1),r.find('input[type="text"]').val(""),l.show(),a.removeClass("give-hidden"),r.addClass("add-new-address-form-hidden")}),!1):(l.show(),a.removeClass("give-hidden"),r.addClass("add-new-address-form-hidden"),!1)})},__set_address_form_action:function(t,i){var n=e("#donor-address-wrapper"),a=e(".address-form",n),s=e('input[name="address-action"]',a),o=e('input[name="address-id"]',a);t=t||"add",i=i||"billing",s.val(t),o.val(i)},__set_address_form_val:function(t){var i=e("#donor-address-wrapper"),n=e(".address-form",i),a=e('[data-address-type="state"]',t).text().substr(2).trim();e('select[name="country"]',n).val().trim()!==e('[data-address-type="country"]',t).text().trim()?(e('select[name="country"]',n).val(e('[data-address-type="country"]',t).text().trim()).trigger("chosen:updated").change(),window.setTimeout(function(){e('[name="state"]',n).val(a).trigger("chosen:updated")},500)):e('[name="state"]',n).val(a).trigger("chosen:updated"),e('input[name="line1"]',n).val(e('[data-address-type="line1"]',t).text().trim()),e('input[name="line2"]',n).val(e('[data-address-type="line2"]',t).text().trim()),e('input[name="city"]',n).val(e('[data-address-type="city"]',t).text().trim()),e('input[name="zip"]',n).val(e('[data-address-type="zip"]',t).text().trim())},bulkDeleteDonor:function(){var t=e("body");t.on("click","#give-bulk-delete-cancel",function(t){e(this).closest("tr").hide(),
|
2 |
-
e(".give-skip-donor").trigger("click"),t.preventDefault()}),t.on("click","#cb-select-all-1, #cb-select-all-2",function(){var t=e(this);e.each(e(".donor-selector"),function(){var i=e(this).val(),n=e(this).data("name"),a='<div id="give-donor-'+i+'" data-id="'+i+'"><a class="give-skip-donor" title="'+give_vars.remove_from_bulk_delete+'">X</a>'+n+"</div>";t.is(":checked")&&!e(this).is(":checked")?e("#give-bulk-donors").append(a):t.is(":checked")||e("#give-bulk-donors").find("#give-donor-"+i).remove()})}),t.on("click",".donor-selector",function(){var t=e(this).val(),i=e(this).data("name"),n='<div id="give-donor-'+t+'" data-id="'+t+'"><a class="give-skip-donor" title="'+give_vars.remove_from_bulk_delete+'">X</a>'+i+"</div>";e(this).is(":checked")?e("#give-bulk-donors").prepend(n):e("#give-bulk-donors").find("#give-donor-"+t).remove()}),t.on("click","#give-delete-donor-confirm",function(){e(this).is(":checked")?e("#give-bulk-delete-button").removeAttr("disabled"):(e("#give-bulk-delete-button").attr("disabled",!0),e("#give-delete-donor-records").removeAttr("checked"))}),t.on("click","#give-delete-donor-records",function(){e(this).is(":checked")&&(e("#give-delete-donor-confirm").attr("checked","checked"),e("#give-bulk-delete-button").removeAttr("disabled"))}),t.on("click",".give-skip-donor",function(){var t=e(this).closest("div").data("id");e("#give-donor-"+t).remove(),e("#donor-"+t).find('input[type="checkbox"]').removeAttr("checked")}),t.on("click",".give-single-donor-delete",function(t){var i=e(this).data("id"),n=e("tr#donor-"+i).find(".donor-selector"),a=e('[id^="cb-select-all-"]'),s=e("#give-bulk-donors"),o=n.data("name"),r='<div id="give-donor-'+i+'" data-id="'+i+'"><a class="give-skip-donor" title="'+give_vars.remove_from_bulk_delete+'">X</a>'+o+"</div>";s.html(""),a.is(":checked")&&a.removeAttr("checked"),e(".donor-selector").removeAttr("checked"),n.attr("checked","checked"),0===e("#give-donor-"+i).length&&(s.prepend(r),e("#give-bulk-delete").slideDown()),t.preventDefault()})},handleBulkActions:function(t){var i=e(this).closest(".tablenav").find("select").val(),n=[],a=give_vars.donors_bulk_action.no_action_selected,s=give_vars.donors_bulk_action.no_donor_selected;return e.each(e(".donor-selector:checked"),function(){n.push(e(this).val())}),"-1"===i?(alert(a),!1):parseInt(n)?("delete"===i&&e("#give-bulk-delete").slideDown(),void t.preventDefault()):(alert(s),!1)}},_={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",function(e){return confirm(give_vars.revoke_api_key)})},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",function(e){return confirm(give_vars.regenerate_api_key)})}},h={init:function(){var t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_field_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){var t=this,i=e(".give-metabox-tabs a");i.on("click",function(i){i.preventDefault(),$this=e(this),t.activate_tab($this),t.update_query($this)})},activate_tab:function(t){var i=t.data("tab-id"),n=t.parent(),a=e("ul.give-metabox-sub-tabs",n),s=a.length,o=e(".give-metabox-tabs a"),r=o.parents("li"),d=e("ul.give-metabox-sub-tabs"),c=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(i),s){n.toggleClass("active"),a.removeClass("give-hidden");var l=e("li.active","ul.give-metabox-sub-tabs");d.not(a).addClass("give-hidden"),r.not(n).removeClass("active"),l.addClass("active")}else c?c&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),r.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):r.each(function(t,i){i=e(i),i.removeClass("active"),i.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",i).addClass("give-hidden")});t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){var i=t.data("tab-id"),n=e.query.set("give_tab",i).remove("message").toString();history.replaceState&&history.replaceState(null,null,n)},setup_colorpicker_fields:function(){e(document).ready(function(){var t=e(".give-colorpicker");t.length&&t.each(function(t,i){var n=e(i);n.parents(".give-template").length||n.wpColorPicker()})})},setup_media_fields:function(){var t,i,n=e("body");n.on("click",".give-upload-button",function(a){a.preventDefault();var s={};switch(i=e(this),e(this).data("field-type")){case"media":s={title:give_vars.metabox_fields.media.button_title,button:{text:give_vars.metabox_fields.media.button_title},multiple:!1,library:{type:"image"}};break;default:s={title:give_vars.metabox_fields.file.button_title,button:{text:give_vars.metabox_fields.file.button_title},multiple:!1}}var o=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing");"undefined"!=typeof o&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);var r=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");"undefined"!=typeof r&&""!==r&&(s.library={type:r}),t=wp.media(s),t.on("select",function(){var e=t.state().get("selection").first().toJSON(),a=i.prev(),s="id"===i.data("fvalue")?e.id:e.url;if(n.trigger("give_media_inserted",[e,a]),a.val(s),"id"!==i.data("fvalue")){var o='input[name="'+a.attr("name")+'_id"]',r=a.closest("tr").next("tr").find(o);r.length&&a.closest("tr").next("tr").find(o).val(e.id)}}),t.open()}),n.on("give_media_inserted",function(t,n){var a=i.parents(".give-field-wrap"),s=e(".give-image-thumb",a);return!!s.length&&("image"!==n.type?(s.addClass("give-hidden"),e("img",s).attr("src",""),!1):(s.find("img").attr("src",n.url),void s.removeClass("give-hidden")))}),e("span.give-delete-image-thumb",".give-image-thumb").on("click",function(t){t.preventDefault();var i=e(this).parents(".give-field-wrap"),n=e(this).parent(),a=e('input[type="text"]',i);n.addClass("give-hidden"),a.val(""),e("img",n).attr("src","")})},setup_repeatable_fields:function(){jQuery(function(){jQuery(".give-repeatable-field-section").each(function(){var t=e(this),i={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:give_vars.confirm_before_remove_row_text,is_sortable:!0,before_add:null,after_add:f,before_remove:null,after_remove:m,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(t,i){e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,i){e("body").trigger("repeater_field_sorting_stop",[i.item])},update:function(i,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item);var a=e(".give-row",t).not(".give-template");if(a.length){var s=1;a.each(function(t,i){var n=e(".give-field, label",e(i));n.length&&n.each(function(){var t=e(this).parents(".give-field-wrap"),i=e(this);e.each(this.attributes,function(e,n){var a=this.value.replace(/\[/g,"_").replace(/]/g,""),o=a+"_field",r="",d="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(s-1)+"]"),d=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(o)&&(r=d+"_field",t.removeClass(o).addClass(r)),a==i.attr("id")&&i.attr("id",d))})}),s++}),t.trigger("repeater_field_row_reordered",[n.item])}}}};jQuery(this).repeatable_fields(i)})})},handle_repeater_group_events:function(){var t=e(".give-repeatable-field-section"),i=e("body");i.on("click",".give-row-head button",function(){var t=e(this).closest("tr");t.toggleClass("closed"),e(".give-row-body",t).toggle()}),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",function(){b(e(this))}),i.on("repeater_field_sorting_start",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(i).attr("id"))},300)})}),i.on("repeater_field_sorting_stop",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){var t=e(i).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout(function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")},100)},300)})}),t.each(function(t,i){var n=e(i);b(n),parseInt(n.data("close-tabs"))&&(e(".give-row-head button",n).trigger("click"),e(".give-template",n).removeClass("closed"),e(".give-template .give-row-body",n).show())}),t.on("repeater_field_new_row_added",function(t,i,n){e(".give-colorpicker",e(this)).each(function(t,i){var n=e(i);n.parents(".wp-picker-container").length||n.parents(".give-template").length||n.wpColorPicker()});var a=e("div[data-wp-editor]",n);a.length&&a.each(function(t,i){var n=e(i),a=e(".wp-editor-wrap",n),s=e("textarea",n),o="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),r=a.prev();s.attr("id",o),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:n.data("wp-editor"),wp_editor_id:o,textarea_name:e("textarea",n).attr("name")},function(t){a.remove(),r.after(t),tinyMCEPreInit.qtInit[s.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:o}),tinyMCEPreInit.mceInit[o]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{body_class:o+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),selector:"#"+o}),tinymce.init(tinyMCEPreInit.mceInit[o]),quicktags(tinyMCEPreInit.qtInit[o]),QTags._buttonsInit(),window.setTimeout(function(){switchEditors.go(o,"html"),e("#"+o+"-tmce").trigger("click")},100),window.wpActiveEditor||(window.wpActiveEditor=o)})})})},handle_multi_levels_repeater_group_events:function(){var t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",function(){var t=e(this).closest("tr"),i=e(".give-row-head h2 span",t),n=i.data("header-title");return(!e(this).val()||e(this).val()!==i.html())&&void(e(this).val()?i.html(n+": "+e(this).val()):i.html(n))}),e(".give-multilevel-text-field").each(function(t,i){if(t){var n=e(i),a=n.closest("tr"),s=e(".give-row-head h2 span",a),o=s.data("header-title");return(!n.val()||n.val()!==s.html())&&void(n.val()?s.html(o+": "+n.val()):s.html(o))}}),t.on("repeater_field_row_deleted",function(){var t=e(this);window.setTimeout(function(){var i=t,n=e(".give-row",i).not(".give-template"),a=e(".give-give_default_radio_inline",n),s=n.length;1===s&&a.prop("checked",!0)},200)}),t.on("repeater_field_new_row_added",function(t,i,n){var a=e(this),s=0;window.setTimeout(function(){e(".give-give_default_radio_inline",a).is(":checked")===!1&&e(".give-row",a).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)},200),e('input[type="hidden"].give-levels_id',a).each(function(t,i){var n=e(i),a=parseInt(n.val());s<a&&(s=a)}),e('input[type="hidden"].give-levels_id',n).val(++s)})}},f=function(t,i){var n=e(t).attr("data-rf-row-count"),a=e(t),s=a.parents(".give-repeatable-field-section");n++,e("*",i).each(function(){e.each(this.attributes,function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",n-1)})}),e(t).attr("data-rf-row-count",n),s.trigger("repeater_field_new_row_added",[t,i])},m=function(t){var i=e(t),n=i.parents(".give-repeatable-field-section"),a=e(t).attr("data-rf-row-count");i.attr("data-rf-row-count",--a),n.trigger("repeater_field_row_deleted")},b=function(t){if(parseInt(t.data("group-numbering"))){var i=e(".give-row-head h2 span",t),n=i.data("header-title");i.each(function(t,i){var a=e(i);a.parents(".give-template").length||a.html(n+": "+t)})}},y={init:function(){e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(){var t=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+t+'"]').text(),n=e('input[name="payment[]"]:checked').length,a=-1!==t.indexOf("set-status-"),s="",o="";if(t=a?"set-to-status":t,Object.keys(give_vars.donations_bulk_action).length)for(o in give_vars.donations_bulk_action)if(o===t)return s=a?give_vars.donations_bulk_action[t].zero.replace("{status}",i.replace("Set To ","")):give_vars.donations_bulk_action[t].zero,parseInt(n)?(s=1<n?give_vars.donations_bulk_action[t].multiple:give_vars.donations_bulk_action[t].single,window.confirm(s.replace("{payment_count}",n).replace("{status}",i.replace("Set To ","")))):(alert(s),!1);return!0}};e(function(){n(),s(),g(),o(),e.giveAjaxifyFields({type:"country_state",debug:!0}),r.init(),d.init(),c.init(),l.init(),p.init(),_.init(),v.init(),u.init(),h.init(),y.init(),e("a.give-rating-link").click(function(){jQuery(this).parent().text(jQuery(this).data("rated"))}),e(".give-ajax-user-search").on("keyup",function(){var t=e(this).val(),i="";e(this).data("exclude")&&(i=e(this).data("exclude")),e(".give-ajax").show(),data={action:"give_search_users",user_name:t,exclude:i},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".give-ajax").hide(),e(".give_user_search_results").removeClass("hidden"),e(".give_user_search_results span").html(""),e(t.results).appendTo(".give_user_search_results span"),document.body.style.cursor="default"}})}),e("body").on("click.giveSelectUser",".give_user_search_results span a",function(t){t.preventDefault();var i=e(this).data("login");e(".give-ajax-user-search").val(i),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")}),e("body").on("click.giveCancelUserSearch",".give_user_search_results a.give-ajax-user-cancel",function(t){t.preventDefault(),e(".give-ajax-user-search").val(""),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")});var i=e("#poststuff"),a=give_vars.thousands_separator,f=give_vars.decimal_separator,m="",b="",w="",k=f===a?1:0;i.on("keyup","input.give-money-field, input.give-price-field",function(){var t={label:give_vars.price_format_guide.trim()};m=(e(this).val().match(new RegExp(a,"g"))||[]).length,b=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(a)&&k<m?e(this).giveHintCss("show",t):b?e(this).giveHintCss("show",t):e(this).giveHintCss("hide",t),m=b=""}),i.on("focusout","input.give-money-field, input.give-price-field",function(){if(w=t(e(this).val(),!1),t("0",!1)===t(e(this).val(),!1)){var i=e(this).attr("placeholder");return i=i?i:"0",e(this).val(i),!1}w=w.replace(".",f),-1!==w.indexOf("-")&&(w=w.replace("-","")),e(this).val(w)}),i.on("focusout","#_give_number_of_donation_goal",function(){1>e(this).val()&&e(this).val(1)}),e(".give-settings-page").on("click","#give-show-sub-nav",function(t){t.preventDefault();var i=e(this).next();return i.is(":hover")||i.toggleClass("give-hidden"),!1}).on("blur","#give-show-sub-nav",function(){var t=e(this).next();t.is(":hover")||t.addClass("give-hidden")}),e(".give_email_api_notification_status_setting input").change(function(){var t=e(this).val(),i="enabled"===t,n={};return e(this).closest(".give_options_panel").length?n=e(this).closest(".give_options_panel").children(".give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section"):e(this).closest("table").length&&(n=e(this).closest("table").find("tr:not(.give_email_api_notification_status_setting)")),-1!==jQuery.inArray(t,["enabled","disabled","global"])&&(!!n.length&&void(i?n.show():n.hide()))}),e(".give_email_api_notification_status_setting input:checked").change(),give_render_responsive_tabs()})}(jQuery),jQuery(window).resize(function(){give_render_responsive_tabs()});
|
1 |
+
function give_render_responsive_tabs(){var e=jQuery(".give-settings-page"),t=jQuery("h2.give-nav-tab-wrapper"),i=e.width(),n=jQuery(".give-sub-nav-tab-wrapper"),a=jQuery("nav",n),s=jQuery("div.give-nav-tab-wrapper > a:not(give-not-tab)"),o=[],r=[],d=0;if(600<jQuery(window).outerWidth()&&(d=200),!e.length)return!1;t.css({height:"auto",overflow:"visible"}),s.removeClass("give-hidden");var c=new Promise(function(e,t){jQuery.each(s,function(e,t){t=jQuery(t),d+=parseInt(t.outerWidth()),d<i?o.push(t):r.push(t)}),e(!0)});c.then(function(e){if(r.length&&-1!==window.location.search.indexOf("&tab=")){var i={},s=get_url_params();r=r.filter(function(e){var t=-1!==parseInt(e.attr("href").indexOf("&tab="+s.tab));return t&&(i=e),!t}),i.length&&(r.unshift(o.pop()),o.push(i))}var d=new Promise(function(e,t){o.length&&jQuery.each(o,function(e,t){t=jQuery(t),t.hasClass("give-hidden")&&t.removeClass("give-hidden")}),e(!0)});d.then(function(e){r.length?(a.html(""),jQuery.each(r,function(e,t){t=jQuery(t),t.hasClass("nav-tab-active")||t.addClass("give-hidden"),t.clone().removeClass().appendTo(a)}),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(n),n.show()):n.hide()})})}function get_url_params(){for(var e,t=[],i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),n=0;n<i.length;n++)e=i[n].split("="),t[e[0]]=e[1];return t}function give_on_core_settings_import_start(){var e=jQuery("form.tools-setting-page-import"),t=e.find(".give-progress");give_setting_edit=!0,jQuery.ajax({type:"POST",url:ajaxurl,data:{action:give_vars.core_settings_import,fields:e.serialize()},dataType:"json",success:function(e){give_setting_edit=!1,!0===e.success?jQuery(t).find("div").width(e.percentage+"%"):alert(give_vars.error_message),window.location=e.url},error:function(){give_setting_edit=!1,alert(give_vars.error_message)}})}function give_on_donation_import_start(){give_on_donation_import_ajax()}function give_on_donation_import_ajax(){var e=jQuery("form.tools-setting-page-import");give_setting_edit=!0;var t=e.find(".give-progress"),i=jQuery(t).data("total_ajax"),n=jQuery(t).data("current"),a=jQuery(t).data("start"),s=jQuery(t).data("end"),o=jQuery(t).data("next"),r=jQuery(t).data("total"),d=jQuery(t).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:give_vars.give_donation_import,total_ajax:i,current:n,start:a,end:s,next:o,total:r,per_page:d,fields:e.serialize()},dataType:"json",success:function(e){jQuery(t).data("current",e.current),jQuery(t).find("div").width(e.percentage+"%"),1==e.next?(jQuery(t).data("start",e.start),jQuery(t).data("end",e.end),1==e.last&&jQuery(t).data("next",!1),give_on_donation_import_ajax()):(give_setting_edit=!1,window.location=e.url)},error:function(){give_setting_edit=!1,alert(give_vars.error_message)}})}jQuery.noConflict();var give_setting_edit=!1;!function(e){function t(e,t){return e=accounting.unformat(e,give_vars.decimal_separator).toString(),t="undefined"!==t&&t,e=!1!==t?parseFloat(e).toFixed(t):parseFloat(e).toFixed(give_vars.currency_decimals)}var i=function(t,i){i=jQuery.extend({wrapper:!0,show:!1},i);var n=i.wrapper?e(".give-spinner-wrapper",t):{},a=e(".give-spinner",t);return i.show?(n.length&&n.addClass("is-active"),void a.addClass("is-active")):(n.length&&n.removeClass("is-active"),void a.removeClass("is-active"))},n=function(){e("body").on("click","button.notice-dismiss",function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&a()})},a=function(){var e="give-message",t=document.location.href,i=t.split("?");if(i.length>=2){for(var n=i.shift(),a=i.join("?"),s=encodeURIComponent(e)+"=",o=a.split(/[&;]/g),r=o.length;r-- >0;)o[r].lastIndexOf(s,0)!==-1&&o.splice(r,1);t=n+"?"+o.join("&"),window.history.pushState("",document.title,t)}return t},s=function(){if(e(".give_datepicker").length>0){var t="mm/dd/yy";e(".give_datepicker").datepicker({dateFormat:t})}},o=function(){var t=e(".give-select-chosen");t.on("chosen:ready",function(){e(this).next(".chosen-container").find("input.chosen-search-input").after('<span class="spinner"></span>')}),t.on("chosen:no_results",function(){var t=e(this).next(".chosen-container"),i=t.find("li.no-results"),n="";n=t.hasClass("give-select-chosen-ajax")&&i.length?give_vars.chosen.ajax_search_msg.replace("{search_term}",'"'+e("input",t).val()+'"'):give_vars.chosen.no_results_msg.replace("{search_term}",'"'+e("input",t).val()+'"'),i.html(n)}),t.chosen({inherit_select_classes:!0,placeholder_text_single:give_vars.one_option,placeholder_text_multiple:give_vars.one_or_more_option}),e(".chosen-container").each(function(){0===e(this).width()&&e(this).css("width","100%")}),e("#post").on("click",".give-thickbox",function(){e(".give-select-chosen","#choose-give-form").css("width","100%")});var i,n=342;e(document.body).on("keyup",".give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input",function(t){var a=e(this).val(),s=e(this).closest(".give-select-chosen"),o=s.prev(),r=s.find('input[type="text"]'),d=(s.hasClass("variations"),t.which),c="give_forms_search";if(s.prev().data("search-type")){if("no_ajax"===o.data("search-type"))return;c="give_"+o.data("search-type")+"_search"}a.length<=3||!c.length||9===d||13===d||16===d||17===d||18===d||19===d||20===d||27===d||33===d||34===d||35===d||36===d||37===d||38===d||39===d||40===d||44===d||45===d||144===d||145===d||91===d||93===d||224===d||112<=d&&123>=d||(clearTimeout(i),s.addClass("give-select-chosen-ajax"),i=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:c,s:a},dataType:"json",beforeSend:function(){o.closest("ul.chosen-results").empty(),r.prop("disabled",!0)},success:function(t){s.removeClass("give-select-chosen-ajax"),e("option:not(:selected)",o).remove(),t.length?(e.each(t,function(t,i){e('option[value="'+i.id+'"]',o).length||o.prepend('<option value="'+i.id+'">'+i.name+"</option>")}),s.prev("select.give-select-chosen").trigger("chosen:updated")):s.prev("select.give-select-chosen").trigger("chosen:no_results"),r.prop("disabled",!1),r.val(a).focus()}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){r.prop("disabled",!1)})},n))}),e(".give-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.give-select-chosen").data("search-type"),i="";"form"===t?i=give_vars.search_placeholder:(t="search_placeholder_"+t,give_vars[t]&&(i=give_vars[t])),e(this).attr("placeholder",i)})},r={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){e("body").on("click",".delete-single-donation",function(){return confirm(give_vars.delete_payment)})},resendSingleDonationReceipt:function(){e("body").on("click",".resend-single-donation-receipt",function(){return confirm(give_vars.resend_receipt)})}},d={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"},e.post(ajaxurl,data,function(i){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden"),t.closest(".column-container").find(".give-column").removeClass("column-full"),t.closest(".column-container").find(".give-column").addClass("column");var n=e("#give-order-address-state-wrap");n.find("*").not(".order-data-address-line").remove(),void 0!==typeof i.states_found&&!0===i.states_found?(n.append(i.data),n.find("select").chosen()):(n.append('<input type="text" name="give-payment-address[0][state]" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!==typeof i.show_field&&!1===i.show_field&&(t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"),t.closest(".column-container").find(".give-column").addClass("column-full"),t.closest(".column-container").find(".give-column").removeClass("column")))}),!1})},add_note:function(){e("#give-add-payment-note").on("click",function(t){t.preventDefault();var i={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#give-payment-note").val()};if(i.note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#give-payment-note").css("border-color");e("#give-payment-note").css("border-color","red"),setTimeout(function(){e("#give-payment-note").css("border-color",n)},500)}})},remove_note:function(){e("body").on("click",".give-delete-payment-note",function(t){if(t.preventDefault(),confirm(give_vars.delete_payment_note)){var i={action:"give_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)})},resend_receipt:function(){e("body").on("click","#give-resend-receipt",function(e){return confirm(give_vars.resend_receipt)})},variable_price_list:function(){e("#give_payment_form_select").chosen().change(function(){var t,i=e(".give-donation-level");return!!(t=e(this).val())&&(!!i.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){t=t.trim(),t?(i.html(t),e('select[name="give-variable-price"]').chosen().change()):i.html("")}}))}),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',function(){var t=jQuery(this).data("prices"),i=e("#give-payment-total");""!==t&&e(this).val()in t&&(i.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout(function(){i.css("background-color","white")},1e3))})}},c={init:function(){this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings(),this.saveButtonTriggered(),this.changeAlert(),this.detectSettingsChange()},setting_change_country:function(){e('select[name="base_country"]').change(function(){var t=e(this),i={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,i,function(n){t.closest("tr").next().show(),void 0!=typeof n.states_found&&1==n.states_found?e(':input[name="base_state"]').replaceWith(n.data):(void 0!=typeof n.show_field&&0==n.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+i.field_name+'" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'))}),!1})},toggle_options:function(){var t=e('input[name="email_access"]',".give-setting-tab-body-general");t.on("change",function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())}).change();var i=e('input[name="form_featured_img"]',".give-setting-tab-body-display");i.on("change",function(){var t=e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val();"enabled"===t?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()}).change();var n=e('input[name="terms"]',".give-setting-tab-body-display");n.on("change",function(){var t=e('input[name="terms"]:checked',".give-setting-tab-body-display").val();"enabled"===t?(e("#agree_to_terms_label").parents("tr").show(),e("#wp-agreement_text-wrap").parents("tr").show()):(e("#agree_to_terms_label").parents("tr").hide(),e("#wp-agreement_text-wrap").parents("tr").hide())}).change();var a=e('input[name="admin_notices"]',".give-setting-tab-body-emails");a.on("change",function(){var t=e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val();"enabled"===t?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())}).change()},main_setting_update_notice:function(){var t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout(function(){t.slideUp()},5e3)},verify_settings:function(){var t=e("#success_page"),i=e("#failure_page");t.add(i).change(function(){if(t.val()===i.val()){var n='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+give_vars.matched_success_failure_page+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+give_vars.dismiss_notice_text+"</span></button> </div>",a=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),a.length)return!1;e("h1","#give-mainform").after(n),a=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",a).click(function(){a.remove()})}}).change()},saveButtonTriggered:function(){e(".give-settings-setting-page").on("click",".give-save-button",function(){e(window).unbind("beforeunload")})},changeAlert:function(){e(window).bind("beforeunload",function(e){var t=give_vars.setting_not_save_message;if(give_setting_edit)return(e||window.event).returnValue=t,t})},detectSettingsChange:function(){var t=e(".give-settings-setting-page");if(t.length>0){var i=e("#give-mainform").serialize();t.on("change keyup blur","form",function(){var t=e("#give-mainform").serialize();give_setting_edit=i!==t})}}},l={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change(function(){var t=e(this);"other"===t.val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()})},donors_export:function(){e("#give_donor_export_form").change(function(){var t=e(this),i=e("option:selected",t).val(),n=e("#give_customer_export_option");"0"===t.val()?n.show():n.hide();var a=e(".give_price_options_select");if(0!=parseInt(i)){var s={action:"give_check_for_form_price_variations",form_id:i,all_prices:!0};e.post(ajaxurl,s,function(t){a.remove(),e("#give_donor_export_form_chosen").after(t)})}else a.remove()})},recount_stats:function(){e("body").on("change","#recount-stats-type",function(){var t=e("#give-tools-recount-form"),i=e("option:selected",this).data("type"),n=e("#recount-stats-submit"),a=e(".tools-form-dropdown");if(t.find(".notice-wrap").remove(),n.removeClass("button-disabled").attr("disabled",!1),a.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===i){t.append('<div class="notice-wrap"></div>');var s=t.find(".notice-wrap");s.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.reset_stats_warn+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-test-donors"===i){t.append('<div class="notice-wrap"></div>');var s=t.find(".notice-wrap");s.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_test_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===i){t.append('<div class="notice-wrap"></div>');var s=t.find(".notice-wrap");s.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_import_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else a.hide(),a.val(0);current_forms=e(".tools-form-dropdown-"+i),current_forms.show(),current_forms.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+i).show()}),e("body").on("change","#confirm-reset",function(){var t=e(this).is(":checked");t?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),e("#give-tools-recount-form").submit(function(t){var i=e("#recount-stats-type").val(),n=e(this),a=e("option:selected",this).data("type");if("reset-stats"===a){var s=e("#confirm-reset").is(":checked");if(s)return!0;r=!0}n.find(".notice-wrap").remove(),n.append('<div class="notice-wrap"></div>');var o=n.find(".notice-wrap"),r=!1;if(null!==i&&0!==i||(o.html('<div class="updated error"><p>'+give_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-form"===a){var d=e('select[name="form_id"]').val();0==d&&(o.html('<div class="updated error"><p>'+give_vars.batch_export_no_reqs+"</p></div>"),r=!0)}if(r)return n.find(".button-disabled").removeClass("button-disabled"),!1})}},v={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".give-export-form",function(i){i.preventDefault();var n=e(this).find('input[type="submit"]');if(!n.hasClass("button-disabled")){var a=e(this).serialize();n.addClass("button-disabled"),e("form.give-export-form select").attr("disabled",!0).trigger("chosen:updated"),e(this).find(".notice-wrap").remove(),e(this).append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,a,t)}})},process_step:function(t,i,n){give_setting_edit=!0;var a=!1;e.ajax({type:"POST",url:ajaxurl,data:{form:i,action:"give_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){give_setting_edit=!1,a=!0;var s=e(".give-export-form").find(".give-progress").parent().parent(),o=s.find(".notice-wrap");if(s.find(".button-disabled").removeClass("button-disabled"),e("form.give-export-form select").attr("disabled",!1).trigger("chosen:updated"),t.error){var r=t.message;o.html('<div class="updated error"><p>'+r+"</p></div>")}else if(t.success){var d=t.message;o.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+d+'<span class="notice-dismiss"></span></p></div>')}else o.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,function(){}),n.process_step(parseInt(t.step),i,n);!0===a&&(e("#give-tools-recount-form")[0].reset(),e("#give-tools-recount-form .tools-form-dropdown").hide(),e("#give-tools-recount-form .tools-form-dropdown-recount-form-select").val("0").trigger("chosen:updated"))}}).fail(function(t){give_setting_edit=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)})},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",function(){e("#give-batch-success").parent().slideUp("fast")})}},u={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-button a",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_progress_counter=Give_Selector_Cache.get(e(".give-update-progress-count")),t.el.main_container.data("resume-update")&&(t.el.update_link.addClass("active").hide().removeClass("give-hidden"),e("#give-restart-upgrades").length||window.setTimeout(u.get_db_updates_info,1e3,t)),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+give_vars.db_update_confirmation_msg_button+"</a> "+give_vars.db_update_confirmation_msg+"</p></div>")}),e("#give-db-updates").on("click","a.give-run-update-button",function(i){return i.preventDefault(),!e(this).hasClass("active")&&(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),e.ajax({type:"POST",url:ajaxurl,data:{action:"give_run_db_updates",run_db_update:1},dataType:"json",success:function(e){}}),window.setTimeout(u.get_db_updates_info,500,t),!1)}))},get_db_updates_info:function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_db_updates_info"},dataType:"json",success:function(i){var n=Give_Selector_Cache.get(".notice-wrap",t.el.progress_container,!0);-1!==e.inArray("success",Object.keys(i))?i.success?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text("100%"),-1!==e.inArray("heading",Object.keys(i.data))&&t.el.heading.html("<strong>"+i.data.heading+"</strong>"),t.el.update_link.closest("p").remove(),n.html('<div class="notice notice-success is-dismissible"><p>'+i.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(i.data))&&t.el.heading.html("<strong>"+i.data.heading+"</strong>"),n.html('<div class="notice notice-error"><p>'+i.data.message+"</p></div>"),setTimeout(function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")},1e3)):i&&-1!==e.inArray("percentage",Object.keys(i.data))?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text(i.data.total_percentage+"%"),-1!==e.inArray("heading",Object.keys(i.data))&&t.el.heading.html("<strong>"+i.data.heading+"</strong>"),e(".give-progress div","#give-db-updates").animate({width:i.data.percentage+"%"},50,function(){}),window.setTimeout(u.get_db_updates_info,1e3,t)):(n.html('<div class="notice notice-error"><p>'+give_vars.updates.ajax_error+"</p></div>"),setTimeout(function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")},1e3))}})},process_step:function(t,i,n){give_setting_edit=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(i)},dataType:"json",success:function(t){give_setting_edit=!1;var i=Give_Selector_Cache.get(".notice-wrap",n.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout(function(){n.el.update_link.removeClass("active").show(),n.el.progress_main_container.addClass("give-hidden")},5e3)):t&&-1!==e.inArray("percentage",Object.keys(t.data))?(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,function(){}),-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",n.el.heading.data("update-count"))+"</strong>"),n.process_step(parseInt(t.data.step),t.data.update,n)):(i.html('<div class="notice notice-error"><p>'+give_vars.updates.ajax_error+"</p></div>"),setTimeout(function(){n.el.update_link.removeClass("active").show(),n.el.progress_main_container.addClass("give-hidden")},5e3))}}).fail(function(e){give_setting_edit=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",self.el.progress_container).append(e.responseText)}).always(function(){})},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",function(){e(this).parent().slideUp("fast")})}},g=function(){e('select[name="give-payment-status"]').on("change",function(){var t=e(this).val();e(".give-donation-status").removeClass(function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")}).addClass("status-"+t)})},p={init:function(){this.editDonor(),this.add_email(),this.removeUser(),this.cancelEdit(),this.add_note(),this.delete_checked(),this.addressesAction(),this.unlockDonorFields(),this.bulkDeleteDonor(),e("body").on("click",'#give-donors-filter .bulkactions input[type="submit"]',this.handleBulkActions)},unlockDonorFields:function(t){e("body").on("click",".give-lock-block",function(e){alert(give_vars.unlock_donor_fields),e.preventDefault()})},editDonor:function(){e("body").on("click","#edit-donor",function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block")})},removeUser:function(){e("body").on("click","#disconnect-donor",function(t){if(t.preventDefault(),!confirm(give_vars.disconnect_user))return!1;var i=e('input[name="customerinfo[id]"]').val(),n={give_action:"disconnect-userid",customer_id:i,_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,n,function(e){window.location.href=e.redirect},"json")})},cancelEdit:function(){e("body").on("click","#give-edit-donor-cancel",function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")})},add_note:function(){e("body").on("click","#add-donor-note",function(t){t.preventDefault();var i={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(i.donor_note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout(function(){e("#donor-note").css("border-color",n)},500)}})},delete_checked:function(){e("#give-donor-delete-confirm").change(function(){var t=e("#give-donor-delete-records"),i=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),i.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),i.attr("disabled",!0))})},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",function(t){t.preventDefault();var i=e(this),n=i.parent();n.parent().find(".notice-wrap").remove(),n.find(".spinner").css("visibility","visible"),i.attr("disabled",!0);var a=n.find('input[name="donor-id"]').val(),s=n.find('input[name="additional-email"]').val(),o=n.find('input[name="make-additional-primary"]').is(":checked"),r=n.find('input[name="add_email_nonce"]').val(),d={give_action:"add_donor_email",customer_id:a,email:s,primary:o,_wpnonce:r};e.post(ajaxurl,d,function(e){!0===e.success?window.location.href=e.redirect:(i.attr("disabled",!1),n.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),n.find(".spinner").css("visibility","hidden"))},"json")})},addressesAction:function(){var t=this,n=e("#donor-address-wrapper"),a=e(".all-address",n),s=e(".give-no-address-message",n),o=e(a).parent(),r=e(".address-form",n),d=e(".js-cancel",r),c=e('select[name="country"]',r),l=e(".add-new-address",n),v=parseInt(e('input[name="donor-id"]').val());c.on("change",function(){e(this).trigger("chosen:updated")}),a.on("click",".js-edit",function(i){var n=e(this).closest(".address");i.preventDefault(),e(".notice",o).remove(),t.__set_address_form_val(n),t.__set_address_form_action("update",n.data("address-id")),l.hide(),a.addClass("give-hidden"),r.removeClass("add-new-address-form-hidden"),r.data("process","update")}),a.on("click",".js-remove",function(i){i.preventDefault();var n=e(this).closest(".address");e(".notice",o).remove(),r.data("changed",!0),t.__set_address_form_val(n),t.__set_address_form_action("remove",n.data("address-id")),r.trigger("submit")}),l.on("click",function(i){i.preventDefault(),e(".notice",o).remove(),e(this).hide(),a.addClass("give-hidden"),r.removeClass("add-new-address-form-hidden"),t.__set_address_form_action("add"),t.__set_address_form_action()}),d.on("click",function(e){e.preventDefault(),r.find('input[type="text"]').val(""),l.show(),a.removeClass("give-hidden"),r.addClass("add-new-address-form-hidden")}),r.on("change",function(){e(this).data("changed",!0)}).on("submit",function(t){t.preventDefault();var d=e(this);return e(".notice",o).remove(),e(this).data("changed")?(e.ajax({type:"POST",url:ajaxurl,data:{action:"donor_manage_addresses",donorID:v,form:e("form",r).serialize()},beforeSend:function(){i(n,{show:!0})},success:function(t){if(i(n),t.success){var r;switch(t.data.action){case"add":e(".give-grid-row",a).append(t.data.address_html),!s.hasClass("give-hidden")&&e("div.give-grid-col-4",a).length&&s.addClass("give-hidden");break;case"remove":r=a.find('div[data-address-id*="'+t.data.id+'"]').parent(),r.length&&r.animate({"margin-left":"-999"},1e3,function(){r.remove(),s.hasClass("give-hidden")&&!e("div.give-grid-col-4",a).length&&s.removeClass("give-hidden")});break;case"update":r=a.find('div[data-address-id*="'+t.data.id+'"]').parent();var d=r.prev(),c={},l=!1;parseInt(e(".give-grid-row>div",a).length)<2?e(".give-grid-row",a).append(t.data.address_html):(d.length&&(d.after(t.data.address_html),l=!0),l||(c=r.next(),c.length&&c.before(t.data.address_html))),r.remove()}o.prepend(t.data.success_msg)}else o.prepend(t.data.error_msg)},dataType:"json"}).always(function(){d.data("changed",!1),r.find('input[type="text"]').val(""),l.show(),a.removeClass("give-hidden"),r.addClass("add-new-address-form-hidden")}),!1):(l.show(),a.removeClass("give-hidden"),r.addClass("add-new-address-form-hidden"),!1)})},__set_address_form_action:function(t,i){var n=e("#donor-address-wrapper"),a=e(".address-form",n),s=e('input[name="address-action"]',a),o=e('input[name="address-id"]',a);t=t||"add",i=i||"billing",s.val(t),o.val(i)},__set_address_form_val:function(t){var i=e("#donor-address-wrapper"),n=e(".address-form",i),a=e('[data-address-type="state"]',t).text().substr(2).trim();e('select[name="country"]',n).val().trim()!==e('[data-address-type="country"]',t).text().trim()?(e('select[name="country"]',n).val(e('[data-address-type="country"]',t).text().trim()).trigger("chosen:updated").change(),window.setTimeout(function(){e('[name="state"]',n).val(a).trigger("chosen:updated")},500)):e('[name="state"]',n).val(a).trigger("chosen:updated"),e('input[name="line1"]',n).val(e('[data-address-type="line1"]',t).text().trim()),e('input[name="line2"]',n).val(e('[data-address-type="line2"]',t).text().trim()),e('input[name="city"]',n).val(e('[data-address-type="city"]',t).text().trim()),e('input[name="zip"]',n).val(e('[data-address-type="zip"]',t).text().trim())},bulkDeleteDonor:function(){var t=e("body");t.on("click","#give-bulk-delete-cancel",function(t){
|
2 |
+
e(this).closest("tr").hide(),e(".give-skip-donor").trigger("click"),t.preventDefault()}),t.on("click","#cb-select-all-1, #cb-select-all-2",function(){var t=e(this);e.each(e(".donor-selector"),function(){var i=e(this).val(),n=e(this).data("name"),a='<div id="give-donor-'+i+'" data-id="'+i+'"><a class="give-skip-donor" title="'+give_vars.remove_from_bulk_delete+'">X</a>'+n+"</div>";t.is(":checked")&&!e(this).is(":checked")?e("#give-bulk-donors").append(a):t.is(":checked")||e("#give-bulk-donors").find("#give-donor-"+i).remove()})}),t.on("click",".donor-selector",function(){var t=e(this).val(),i=e(this).data("name"),n='<div id="give-donor-'+t+'" data-id="'+t+'"><a class="give-skip-donor" title="'+give_vars.remove_from_bulk_delete+'">X</a>'+i+"</div>";e(this).is(":checked")?e("#give-bulk-donors").prepend(n):e("#give-bulk-donors").find("#give-donor-"+t).remove()}),t.on("click","#give-delete-donor-confirm",function(){e(this).is(":checked")?e("#give-bulk-delete-button").removeAttr("disabled"):(e("#give-bulk-delete-button").attr("disabled",!0),e("#give-delete-donor-records").removeAttr("checked"))}),t.on("click","#give-delete-donor-records",function(){e(this).is(":checked")&&(e("#give-delete-donor-confirm").attr("checked","checked"),e("#give-bulk-delete-button").removeAttr("disabled"))}),t.on("click",".give-skip-donor",function(){var t=e(this).closest("div").data("id");e("#give-donor-"+t).remove(),e("#donor-"+t).find('input[type="checkbox"]').removeAttr("checked")}),t.on("click",".give-single-donor-delete",function(t){var i=e(this).data("id"),n=e("tr#donor-"+i).find(".donor-selector"),a=e('[id^="cb-select-all-"]'),s=e("#give-bulk-donors"),o=n.data("name"),r='<div id="give-donor-'+i+'" data-id="'+i+'"><a class="give-skip-donor" title="'+give_vars.remove_from_bulk_delete+'">X</a>'+o+"</div>";s.html(""),a.is(":checked")&&a.removeAttr("checked"),e(".donor-selector").removeAttr("checked"),n.attr("checked","checked"),0===e("#give-donor-"+i).length&&(s.prepend(r),e("#give-bulk-delete").slideDown()),t.preventDefault()})},handleBulkActions:function(t){var i=e(this).closest(".tablenav").find("select").val(),n=[],a=give_vars.donors_bulk_action.no_action_selected,s=give_vars.donors_bulk_action.no_donor_selected;return e.each(e(".donor-selector:checked"),function(){n.push(e(this).val())}),"-1"===i?(alert(a),!1):parseInt(n)?("delete"===i&&e("#give-bulk-delete").slideDown(),void t.preventDefault()):(alert(s),!1)}},_={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",function(e){return confirm(give_vars.revoke_api_key)})},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",function(e){return confirm(give_vars.regenerate_api_key)})}},h={init:function(){var t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_field_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){var t=this,i=e(".give-metabox-tabs a");i.on("click",function(i){i.preventDefault(),$this=e(this),t.activate_tab($this),t.update_query($this)})},activate_tab:function(t){var i=t.data("tab-id"),n=t.parent(),a=e("ul.give-metabox-sub-tabs",n),s=a.length,o=e(".give-metabox-tabs a"),r=o.parents("li"),d=e("ul.give-metabox-sub-tabs"),c=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(i),s){n.toggleClass("active"),a.removeClass("give-hidden");var l=e("li.active","ul.give-metabox-sub-tabs");d.not(a).addClass("give-hidden"),r.not(n).removeClass("active"),l.addClass("active")}else c?c&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),r.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):r.each(function(t,i){i=e(i),i.removeClass("active"),i.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",i).addClass("give-hidden")});t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){var i=t.data("tab-id"),n=e.query.set("give_tab",i).remove("message").toString();history.replaceState&&history.replaceState(null,null,n)},setup_colorpicker_fields:function(){e(document).ready(function(){var t=e(".give-colorpicker");t.length&&t.each(function(t,i){var n=e(i);n.parents(".give-template").length||n.wpColorPicker()})})},setup_media_fields:function(){var t,i,n=e("body");n.on("click",".give-upload-button",function(a){a.preventDefault();var s={};switch(i=e(this),e(this).data("field-type")){case"media":s={title:give_vars.metabox_fields.media.button_title,button:{text:give_vars.metabox_fields.media.button_title},multiple:!1,library:{type:"image"}};break;default:s={title:give_vars.metabox_fields.file.button_title,button:{text:give_vars.metabox_fields.file.button_title},multiple:!1}}var o=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing");"undefined"!=typeof o&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);var r=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");"undefined"!=typeof r&&""!==r&&(s.library={type:r}),t=wp.media(s),t.on("select",function(){var e=t.state().get("selection").first().toJSON(),a=i.prev(),s="id"===i.data("fvalue")?e.id:e.url;if(n.trigger("give_media_inserted",[e,a]),a.val(s),"id"!==i.data("fvalue")){var o='input[name="'+a.attr("name")+'_id"]',r=a.closest("tr").next("tr").find(o);r.length&&a.closest("tr").next("tr").find(o).val(e.id)}}),t.open()}),n.on("give_media_inserted",function(t,n){var a=i.parents(".give-field-wrap"),s=e(".give-image-thumb",a);return!!s.length&&("image"!==n.type?(s.addClass("give-hidden"),e("img",s).attr("src",""),!1):(s.find("img").attr("src",n.url),void s.removeClass("give-hidden")))}),e("span.give-delete-image-thumb",".give-image-thumb").on("click",function(t){t.preventDefault();var i=e(this).parents(".give-field-wrap"),n=e(this).parent(),a=e('input[type="text"]',i);n.addClass("give-hidden"),a.val(""),e("img",n).attr("src","")})},setup_repeatable_fields:function(){jQuery(function(){jQuery(".give-repeatable-field-section").each(function(){var t=e(this),i={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:give_vars.confirm_before_remove_row_text,is_sortable:!0,before_add:null,after_add:f,before_remove:null,after_remove:m,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(t,i){e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,i){e("body").trigger("repeater_field_sorting_stop",[i.item])},update:function(i,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item);var a=e(".give-row",t).not(".give-template");if(a.length){var s=1;a.each(function(t,i){var n=e(".give-field, label",e(i));n.length&&n.each(function(){var t=e(this).parents(".give-field-wrap"),i=e(this);e.each(this.attributes,function(e,n){var a=this.value.replace(/\[/g,"_").replace(/]/g,""),o=a+"_field",r="",d="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(s-1)+"]"),d=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(o)&&(r=d+"_field",t.removeClass(o).addClass(r)),a==i.attr("id")&&i.attr("id",d))})}),s++}),t.trigger("repeater_field_row_reordered",[n.item])}}}};jQuery(this).repeatable_fields(i)})})},handle_repeater_group_events:function(){var t=e(".give-repeatable-field-section"),i=e("body");i.on("click",".give-row-head button",function(){var t=e(this).closest("tr");t.toggleClass("closed"),e(".give-row-body",t).toggle()}),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",function(){b(e(this))}),i.on("repeater_field_sorting_start",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(i).attr("id"))},300)})}),i.on("repeater_field_sorting_stop",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){var t=e(i).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout(function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")},100)},300)})}),t.each(function(t,i){var n=e(i);b(n),parseInt(n.data("close-tabs"))&&(e(".give-row-head button",n).trigger("click"),e(".give-template",n).removeClass("closed"),e(".give-template .give-row-body",n).show())}),t.on("repeater_field_new_row_added",function(t,i,n){e(".give-colorpicker",e(this)).each(function(t,i){var n=e(i);n.parents(".wp-picker-container").length||n.parents(".give-template").length||n.wpColorPicker()});var a=e("div[data-wp-editor]",n);a.length&&a.each(function(t,i){var n=e(i),a=e(".wp-editor-wrap",n),s=e("textarea",n),o="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),r=a.prev();s.attr("id",o),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:n.data("wp-editor"),wp_editor_id:o,textarea_name:e("textarea",n).attr("name")},function(t){a.remove(),r.after(t),tinyMCEPreInit.qtInit[s.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:o}),tinyMCEPreInit.mceInit[o]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{body_class:o+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),selector:"#"+o}),tinymce.init(tinyMCEPreInit.mceInit[o]),quicktags(tinyMCEPreInit.qtInit[o]),QTags._buttonsInit(),window.setTimeout(function(){switchEditors.go(o,"html"),e("#"+o+"-tmce").trigger("click")},100),window.wpActiveEditor||(window.wpActiveEditor=o)})})})},handle_multi_levels_repeater_group_events:function(){var t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",function(){var t=e(this).closest("tr"),i=e(".give-row-head h2 span",t),n=i.data("header-title");return(!e(this).val()||e(this).val()!==i.html())&&void(e(this).val()?i.html(n+": "+e(this).val()):i.html(n))}),e(".give-multilevel-text-field").each(function(t,i){if(t){var n=e(i),a=n.closest("tr"),s=e(".give-row-head h2 span",a),o=s.data("header-title");return(!n.val()||n.val()!==s.html())&&void(n.val()?s.html(o+": "+n.val()):s.html(o))}}),t.on("repeater_field_row_deleted",function(){var t=e(this);window.setTimeout(function(){var i=t,n=e(".give-row",i).not(".give-template"),a=e(".give-give_default_radio_inline",n),s=n.length;1===s&&a.prop("checked",!0)},200)}),t.on("repeater_field_new_row_added",function(t,i,n){var a=e(this),s=0;window.setTimeout(function(){e(".give-give_default_radio_inline",a).is(":checked")===!1&&e(".give-row",a).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)},200),e('input[type="hidden"].give-levels_id',a).each(function(t,i){var n=e(i),a=parseInt(n.val());s<a&&(s=a)}),e('input[type="hidden"].give-levels_id',n).val(++s)})}},f=function(t,i){var n=e(t).attr("data-rf-row-count"),a=e(t),s=a.parents(".give-repeatable-field-section");n++,e("*",i).each(function(){e.each(this.attributes,function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",n-1)})}),e(t).attr("data-rf-row-count",n),s.trigger("repeater_field_new_row_added",[t,i])},m=function(t){var i=e(t),n=i.parents(".give-repeatable-field-section"),a=e(t).attr("data-rf-row-count");i.attr("data-rf-row-count",--a),n.trigger("repeater_field_row_deleted")},b=function(t){if(parseInt(t.data("group-numbering"))){var i=e(".give-row-head h2 span",t),n=i.data("header-title");i.each(function(t,i){var a=e(i);a.parents(".give-template").length||a.html(n+": "+t)})}},y={init:function(){e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(){var t=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+t+'"]').text(),n=e('input[name="payment[]"]:checked').length,a=-1!==t.indexOf("set-status-"),s="",o="";if(t=a?"set-to-status":t,Object.keys(give_vars.donations_bulk_action).length)for(o in give_vars.donations_bulk_action)if(o===t)return s=a?give_vars.donations_bulk_action[t].zero.replace("{status}",i.replace("Set To ","")):give_vars.donations_bulk_action[t].zero,parseInt(n)?(s=1<n?give_vars.donations_bulk_action[t].multiple:give_vars.donations_bulk_action[t].single,window.confirm(s.replace("{payment_count}",n).replace("{status}",i.replace("Set To ","")))):(alert(s),!1);return!0}};e(function(){n(),s(),g(),o(),e.giveAjaxifyFields({type:"country_state",debug:!0}),r.init(),d.init(),c.init(),l.init(),p.init(),_.init(),v.init(),u.init(),h.init(),y.init(),e("a.give-rating-link").click(function(){jQuery(this).parent().text(jQuery(this).data("rated"))}),e(".give-ajax-user-search").on("keyup",function(){var t=e(this).val(),i="";e(this).data("exclude")&&(i=e(this).data("exclude")),e(".give-ajax").show(),data={action:"give_search_users",user_name:t,exclude:i},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".give-ajax").hide(),e(".give_user_search_results").removeClass("hidden"),e(".give_user_search_results span").html(""),e(t.results).appendTo(".give_user_search_results span"),document.body.style.cursor="default"}})}),e("body").on("click.giveSelectUser",".give_user_search_results span a",function(t){t.preventDefault();var i=e(this).data("login");e(".give-ajax-user-search").val(i),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")}),e("body").on("click.giveCancelUserSearch",".give_user_search_results a.give-ajax-user-cancel",function(t){t.preventDefault(),e(".give-ajax-user-search").val(""),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")});var i=e("#poststuff"),a=give_vars.thousands_separator,f=give_vars.decimal_separator,m="",b="",w="",k=f===a?1:0;i.on("keyup","input.give-money-field, input.give-price-field",function(){var t={label:give_vars.price_format_guide.trim()};m=(e(this).val().match(new RegExp(a,"g"))||[]).length,b=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(a)&&k<m?e(this).giveHintCss("show",t):b?e(this).giveHintCss("show",t):e(this).giveHintCss("hide",t),m=b=""}),i.on("focusout","input.give-money-field, input.give-price-field",function(){if(w=t(e(this).val(),!1),t("0",!1)===t(e(this).val(),!1)){var i=e(this).attr("placeholder");return i=i?i:"0",e(this).val(i),!1}w=w.replace(".",f),-1!==w.indexOf("-")&&(w=w.replace("-","")),e(this).val(w)}),i.on("focusout","#_give_number_of_donation_goal",function(){1>e(this).val()&&e(this).val(1)}),e(".give-settings-page").on("click","#give-show-sub-nav",function(t){t.preventDefault();var i=e(this).next();return i.is(":hover")||i.toggleClass("give-hidden"),!1}).on("blur","#give-show-sub-nav",function(){var t=e(this).next();t.is(":hover")||t.addClass("give-hidden")}),e(".give_email_api_notification_status_setting input").change(function(){var t=e(this).val(),i="enabled"===t,n={};return e(this).closest(".give_options_panel").length?n=e(this).closest(".give_options_panel").children(".give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section"):e(this).closest("table").length&&(n=e(this).closest("table").find("tr:not(.give_email_api_notification_status_setting)")),-1!==jQuery.inArray(t,["enabled","disabled","global"])&&(!!n.length&&void(i?n.show():n.hide()))}),e(".give_email_api_notification_status_setting input:checked").change(),give_render_responsive_tabs()})}(jQuery),jQuery(window).resize(function(){give_render_responsive_tabs()});
|
assets/js/admin/admin-settings.js
CHANGED
@@ -62,6 +62,30 @@ jQuery(document).ready(function ($) {
|
|
62 |
$default_gateway.html(active_payment_option_html);
|
63 |
});
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
/**
|
66 |
* Repeater setting field event.
|
67 |
*/
|
62 |
$default_gateway.html(active_payment_option_html);
|
63 |
});
|
64 |
|
65 |
+
/**
|
66 |
+
* Change currency position symbol on changing the currency
|
67 |
+
*/
|
68 |
+
var give_settings_currency = '#give-mainform #currency';
|
69 |
+
var give_settings_position = '#give-mainform #currency_position';
|
70 |
+
$( 'body' ).on( 'change', give_settings_currency, function () {
|
71 |
+
var currency_text = $( give_settings_currency + ' option:selected' ).text(),
|
72 |
+
currency_sign = currency_text.split( '(' ).pop().split( ')' ).shift();
|
73 |
+
|
74 |
+
if ( '' === currency_sign ) {
|
75 |
+
currency_sign = give_vars.currency_sign;
|
76 |
+
}
|
77 |
+
|
78 |
+
var before_text = $( give_settings_position ).data( 'before-template' );
|
79 |
+
before_text = before_text.replace( '{currency_pos}', currency_sign );
|
80 |
+
$( give_settings_position + ' option[value="before"]' ).text( before_text );
|
81 |
+
|
82 |
+
|
83 |
+
var after_text = $( give_settings_position ).data( 'after-template' );
|
84 |
+
after_text = after_text.replace( '{currency_pos}', currency_sign );
|
85 |
+
$( give_settings_position + ' option[value="after"]' ).text( after_text );
|
86 |
+
|
87 |
+
} );
|
88 |
+
|
89 |
/**
|
90 |
* Repeater setting field event.
|
91 |
*/
|
assets/js/admin/admin-settings.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery.noConflict(),jQuery(document).ready(function(t){var
|
1 |
+
jQuery.noConflict(),jQuery(document).ready(function(t){var e=jQuery("ul.give-payment-gatways-list");e.length&&e.sortable();var i=t("input",e),a=t("#default_gateway");i.on("click",function(){if(t(this)[0].hasAttribute("readonly"))return!1;var i=a.val(),n="",s=t("input:checked",e);1===s.length?s.prop("readonly",!0):t("input[readonly]:checked",e).removeAttr("readonly"),s.each(function(e,a){a=t(a);var s=a.attr("name").match(/\[(.*?)\]/)[1];n+='<option value="'+s+'"',i===s&&(n+=' selected="selected"'),n+=">"+a.next("label").text()+"</option>"}),a.html(n)});var n="#give-mainform #currency",s="#give-mainform #currency_position";t("body").on("change",n,function(){var e=t(n+" option:selected").text(),i=e.split("(").pop().split(")").shift();""===i&&(i=give_vars.currency_sign);var a=t(s).data("before-template");a=a.replace("{currency_pos}",i),t(s+' option[value="before"]').text(a);var o=t(s).data("after-template");o=o.replace("{currency_pos}",i),t(s+' option[value="after"]').text(o)}),t("a.give-repeat-setting-field").on("click",function(e){e.preventDefault();var i=t(this).parents("td"),a=t("p:first-child",i),n=a.clone(),s=t("p",i).not(".give-field-description").length,o=t(this).data("id")+"_"+ ++s,r=t(this).prev();return t("input",r).val()&&(t(this).before(n),r=t(this).prev(),t("input",r).attr("id",o),t("input",r).val("")),!1}),t(".give-settings-page").on("click","span.give-remove-setting-field",function(e){t(this).parents("p").remove()}),t(".give-email-notification-status","table.giveemailnotifications").on("click",function(){var e=t(this),i=t("i",e),a=t(this).next(),n=t(this).hasClass("give-email-notification-enabled")?"disabled":"enabled",s=t(this).data("id");return parseInt(e.data("edit"))?void t.ajax({url:ajaxurl,method:"POST",data:{action:"give_set_notification_status",status:n,notification_id:s},beforeSend:function(){e.hide(),a.addClass("is-active")},success:function(t){t.success&&(e.removeClass("give-email-notification-"+e.data("status")),e.addClass("give-email-notification-"+n),e.data("status",n),"enabled"===n?(i.removeClass("dashicons-no-alt"),i.addClass("dashicons-yes")):(i.removeClass("dashicons-yes"),i.addClass("dashicons-no-alt")),a.removeClass("is-active"),e.show())}}):(t("div.give-email-notification-status-notice").remove(),t("hr.wp-header-end").after('<div class="updated error give-email-notification-status-notice"><p>'+t(this).closest(".give-email-notification-status").data("notice")+"</p></div>"),t("html, body").animate({scrollTop:t("div.give-email-notification-status-notice").position().top},"slow"),!1)})});
|
give.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
|
6 |
* Author: WordImpress
|
7 |
* Author URI: https://wordimpress.com
|
8 |
-
* Version: 2.0.
|
9 |
* Text Domain: give
|
10 |
* Domain Path: /languages
|
11 |
* GitHub Plugin URI: https://github.com/WordImpress/Give
|
@@ -80,7 +80,7 @@ if ( ! class_exists( 'Give' ) ) :
|
|
80 |
* @since 1.0
|
81 |
* @access public
|
82 |
*
|
83 |
-
* @var
|
84 |
*/
|
85 |
public $give_settings;
|
86 |
|
@@ -365,7 +365,7 @@ if ( ! class_exists( 'Give' ) ) :
|
|
365 |
|
366 |
// Plugin version
|
367 |
if ( ! defined( 'GIVE_VERSION' ) ) {
|
368 |
-
define( 'GIVE_VERSION', '2.0.
|
369 |
}
|
370 |
|
371 |
// Plugin Root File
|
5 |
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
|
6 |
* Author: WordImpress
|
7 |
* Author URI: https://wordimpress.com
|
8 |
+
* Version: 2.0.1
|
9 |
* Text Domain: give
|
10 |
* Domain Path: /languages
|
11 |
* GitHub Plugin URI: https://github.com/WordImpress/Give
|
80 |
* @since 1.0
|
81 |
* @access public
|
82 |
*
|
83 |
+
* @var Give_Admin_Settings object
|
84 |
*/
|
85 |
public $give_settings;
|
86 |
|
365 |
|
366 |
// Plugin version
|
367 |
if ( ! defined( 'GIVE_VERSION' ) ) {
|
368 |
+
define( 'GIVE_VERSION', '2.0.1' );
|
369 |
}
|
370 |
|
371 |
// Plugin Root File
|
includes/admin/admin-filters.php
CHANGED
@@ -86,7 +86,7 @@ add_filter( 'give_admin_settings_sanitize_option_decimal_separator', '__give_val
|
|
86 |
*
|
87 |
* @since 1.8.14
|
88 |
*
|
89 |
-
* @param string $delimiter
|
90 |
*
|
91 |
* @return string $delimiter.
|
92 |
*/
|
86 |
*
|
87 |
* @since 1.8.14
|
88 |
*
|
89 |
+
* @param string $delimiter
|
90 |
*
|
91 |
* @return string $delimiter.
|
92 |
*/
|
includes/admin/class-blank-slate.php
CHANGED
@@ -54,7 +54,7 @@ class Give_Blank_Slate {
|
|
54 |
* The content of the blank slate panel.
|
55 |
*
|
56 |
* @since 1.8.13
|
57 |
-
* @var
|
58 |
* @access private
|
59 |
*/
|
60 |
private $content = array();
|
54 |
* The content of the blank slate panel.
|
55 |
*
|
56 |
* @since 1.8.13
|
57 |
+
* @var array
|
58 |
* @access private
|
59 |
*/
|
60 |
private $content = array();
|
includes/admin/donors/class-donor-table.php
CHANGED
@@ -119,7 +119,7 @@ class Give_Donor_List_Table extends WP_List_Table {
|
|
119 |
case 'num_donations' :
|
120 |
$value = sprintf(
|
121 |
'<a href="%s">%s</a>',
|
122 |
-
admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $donor['id'] ) ),
|
123 |
esc_html( $donor['num_donations'] )
|
124 |
);
|
125 |
break;
|
119 |
case 'num_donations' :
|
120 |
$value = sprintf(
|
121 |
'<a href="%s">%s</a>',
|
122 |
+
admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&status=publish&donor=' . absint( $donor['id'] ) ),
|
123 |
esc_html( $donor['num_donations'] )
|
124 |
);
|
125 |
break;
|
includes/admin/donors/donors.php
CHANGED
@@ -459,7 +459,7 @@ function give_donor_view( $donor ) {
|
|
459 |
<div id="donor-stats-wrapper" class="donor-section postbox clear">
|
460 |
<ul>
|
461 |
<li>
|
462 |
-
<a href="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $donor->id ) ); ?>">
|
463 |
<span class="dashicons dashicons-heart"></span>
|
464 |
<?php
|
465 |
// Completed Donations.
|
459 |
<div id="donor-stats-wrapper" class="donor-section postbox clear">
|
460 |
<ul>
|
461 |
<li>
|
462 |
+
<a href="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&status=publish&donor=' . absint( $donor->id ) ); ?>">
|
463 |
<span class="dashicons dashicons-heart"></span>
|
464 |
<?php
|
465 |
// Completed Donations.
|
includes/admin/emails/class-email-notifications.php
CHANGED
@@ -118,7 +118,8 @@ class Give_Email_Notifications {
|
|
118 |
// Email notification setting.
|
119 |
$settings['email_notification_options'] = array(
|
120 |
'id' => 'email_notification_options',
|
121 |
-
'title' => __( 'Email
|
|
|
122 |
'fields' => array(
|
123 |
array(
|
124 |
'name' => __( 'Email Options', 'give' ),
|
118 |
// Email notification setting.
|
119 |
$settings['email_notification_options'] = array(
|
120 |
'id' => 'email_notification_options',
|
121 |
+
'title' => __( 'Email Notifications', 'give' ),
|
122 |
+
'icon-html' => '<span class="dashicons dashicons-email-alt"></span>',
|
123 |
'fields' => array(
|
124 |
array(
|
125 |
'name' => __( 'Email Options', 'give' ),
|
includes/admin/settings/class-settings-general.php
CHANGED
@@ -117,6 +117,9 @@ if ( ! class_exists( 'Give_Settings_General' ) ) :
|
|
117 |
break;
|
118 |
|
119 |
case 'currency-settings' :
|
|
|
|
|
|
|
120 |
$settings = array(
|
121 |
// Section 2: Currency
|
122 |
array(
|
@@ -139,17 +142,21 @@ if ( ! class_exists( 'Give_Settings_General' ) ) :
|
|
139 |
'default' => 'USD',
|
140 |
),
|
141 |
array(
|
142 |
-
'name'
|
143 |
-
'desc'
|
144 |
-
'id'
|
145 |
-
'type'
|
146 |
-
'options'
|
147 |
/* translators: %s: currency symbol */
|
148 |
-
'before' => sprintf(
|
149 |
/* translators: %s: currency symbol */
|
150 |
-
'after' => sprintf(
|
|
|
|
|
|
|
|
|
|
|
151 |
),
|
152 |
-
'default' => 'before',
|
153 |
),
|
154 |
array(
|
155 |
'name' => __( 'Thousands Separator', 'give' ),
|
@@ -187,6 +194,7 @@ if ( ! class_exists( 'Give_Settings_General' ) ) :
|
|
187 |
'id' => 'give_title_general_settings_2',
|
188 |
),
|
189 |
);
|
|
|
190 |
break;
|
191 |
|
192 |
case 'general-settings':
|
117 |
break;
|
118 |
|
119 |
case 'currency-settings' :
|
120 |
+
$currency_position_before = __( 'Before - %s‎10', 'give' );
|
121 |
+
$currency_position_after = __( 'After - 10%s‏', 'give' );
|
122 |
+
|
123 |
$settings = array(
|
124 |
// Section 2: Currency
|
125 |
array(
|
142 |
'default' => 'USD',
|
143 |
),
|
144 |
array(
|
145 |
+
'name' => __( 'Currency Position', 'give' ),
|
146 |
+
'desc' => __( 'The position of the currency symbol.', 'give' ),
|
147 |
+
'id' => 'currency_position',
|
148 |
+
'type' => 'select',
|
149 |
+
'options' => array(
|
150 |
/* translators: %s: currency symbol */
|
151 |
+
'before' => sprintf( $currency_position_before, give_currency_symbol( give_get_currency() ) ),
|
152 |
/* translators: %s: currency symbol */
|
153 |
+
'after' => sprintf( $currency_position_after, give_currency_symbol( give_get_currency() ) ),
|
154 |
+
),
|
155 |
+
'default' => 'before',
|
156 |
+
'attributes' => array(
|
157 |
+
'data-before-template' => sprintf( $currency_position_before, '{currency_pos}' ),
|
158 |
+
'data-after-template' => sprintf( $currency_position_after, '{currency_pos}' ),
|
159 |
),
|
|
|
160 |
),
|
161 |
array(
|
162 |
'name' => __( 'Thousands Separator', 'give' ),
|
194 |
'id' => 'give_title_general_settings_2',
|
195 |
),
|
196 |
);
|
197 |
+
|
198 |
break;
|
199 |
|
200 |
case 'general-settings':
|
includes/admin/tools/class-settings-logs.php
CHANGED
@@ -57,7 +57,7 @@ if ( ! class_exists( 'Give_Settings_Logs' ) ) :
|
|
57 |
'table_html' => false,
|
58 |
),
|
59 |
array(
|
60 |
-
'id' => '
|
61 |
'name' => __( 'Log', 'give' ),
|
62 |
'type' => 'logs',
|
63 |
|
@@ -93,6 +93,7 @@ if ( ! class_exists( 'Give_Settings_Logs' ) ) :
|
|
93 |
'sales' => __( 'Donations', 'give' ),
|
94 |
'gateway_errors' => __( 'Payment Errors', 'give' ),
|
95 |
'api_requests' => __( 'API Requests', 'give' ),
|
|
|
96 |
);
|
97 |
|
98 |
$sections = apply_filters( 'give_log_views', $sections );
|
57 |
'table_html' => false,
|
58 |
),
|
59 |
array(
|
60 |
+
'id' => 'logs',
|
61 |
'name' => __( 'Log', 'give' ),
|
62 |
'type' => 'logs',
|
63 |
|
93 |
'sales' => __( 'Donations', 'give' ),
|
94 |
'gateway_errors' => __( 'Payment Errors', 'give' ),
|
95 |
'api_requests' => __( 'API Requests', 'give' ),
|
96 |
+
'updates' => __( 'Updates', 'give' ),
|
97 |
);
|
98 |
|
99 |
$sections = apply_filters( 'give_log_views', $sections );
|
includes/admin/tools/import/class-give-import-core-settings.php
CHANGED
@@ -347,20 +347,20 @@ if ( ! class_exists( 'Give_Import_Core_Settings' ) ) {
|
|
347 |
<tr valign="top">
|
348 |
<th colspan="2">
|
349 |
<h2 id="give-import-title"><?php esc_html_e( 'Import Core Settings from a JSON file', 'give' ) ?></h2>
|
350 |
-
<p class="give-field-description"><?php esc_html_e( 'This tool allows you to
|
351 |
</th>
|
352 |
</tr>
|
353 |
|
354 |
<tr valign="top">
|
355 |
<th scope="row" class="titledesc">
|
356 |
-
<label for="json"
|
357 |
</th>
|
358 |
<td class="give-forminp">
|
359 |
<div class="give-field-wrap">
|
360 |
<label for="json">
|
361 |
<input type="file" name="json" class="give-upload-json-file" value="<?php echo $json; ?>"
|
362 |
accept=".json">
|
363 |
-
<p class="give-field-description"
|
364 |
</label>
|
365 |
</div>
|
366 |
</td>
|
@@ -370,7 +370,7 @@ if ( ! class_exists( 'Give_Import_Core_Settings' ) ) {
|
|
370 |
array(
|
371 |
'id' => 'type',
|
372 |
'name' => __( 'Merge Type:', 'give' ),
|
373 |
-
'description' => __( '
|
374 |
'default' => $type,
|
375 |
'type' => 'radio_inline',
|
376 |
'options' => array(
|
347 |
<tr valign="top">
|
348 |
<th colspan="2">
|
349 |
<h2 id="give-import-title"><?php esc_html_e( 'Import Core Settings from a JSON file', 'give' ) ?></h2>
|
350 |
+
<p class="give-field-description"><?php esc_html_e( 'This tool allows you to import Give settings from another Give installation. Settings imported contain data from Give core as well as any of our Premium Add-ons.', 'give' ) ?></p>
|
351 |
</th>
|
352 |
</tr>
|
353 |
|
354 |
<tr valign="top">
|
355 |
<th scope="row" class="titledesc">
|
356 |
+
<label for="json"><?php esc_html_e( 'Choose a JSON file:', 'give' ) ?></label>
|
357 |
</th>
|
358 |
<td class="give-forminp">
|
359 |
<div class="give-field-wrap">
|
360 |
<label for="json">
|
361 |
<input type="file" name="json" class="give-upload-json-file" value="<?php echo $json; ?>"
|
362 |
accept=".json">
|
363 |
+
<p class="give-field-description"><?php esc_html_e( 'The file type must be JSON.', 'give' )?></p>
|
364 |
</label>
|
365 |
</div>
|
366 |
</td>
|
370 |
array(
|
371 |
'id' => 'type',
|
372 |
'name' => __( 'Merge Type:', 'give' ),
|
373 |
+
'description' => __( 'Select "Merge" to retain existing settings, or "Replace" to overwrite with the settings from the JSON file', 'give' ),
|
374 |
'default' => $type,
|
375 |
'type' => 'radio_inline',
|
376 |
'options' => array(
|
includes/admin/tools/import/class-give-import-donations.php
CHANGED
@@ -847,8 +847,8 @@ if ( ! class_exists( 'Give_Import_Donations' ) ) {
|
|
847 |
* @since 1.8.14
|
848 |
* @access public
|
849 |
*
|
850 |
-
* @param
|
851 |
-
* @param string
|
852 |
*
|
853 |
* @return bool $has_error CSV is valid or not.
|
854 |
*/
|
847 |
* @since 1.8.14
|
848 |
* @access public
|
849 |
*
|
850 |
+
* @param mixed $csv ID of the CSV files.
|
851 |
+
* @param string $match_url ID of the CSV files.
|
852 |
*
|
853 |
* @return bool $has_error CSV is valid or not.
|
854 |
*/
|
includes/admin/tools/logs/class-update-logs-list-table.php
ADDED
@@ -0,0 +1,268 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Update Log View Class
|
4 |
+
*
|
5 |
+
* @package Give
|
6 |
+
* @subpackage Admin/Reports
|
7 |
+
* @copyright Copyright (c) 2016, WordImpress
|
8 |
+
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
9 |
+
* @since 2.0.1
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly.
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
// Load WP_List_Table if not loaded
|
18 |
+
if ( ! class_exists( 'WP_List_Table' ) ) {
|
19 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Give_Update_Log_Table List Table Class
|
24 |
+
*
|
25 |
+
* Renders the update log list table
|
26 |
+
*
|
27 |
+
* @since 2.0.1
|
28 |
+
*/
|
29 |
+
class Give_Update_Log_Table extends WP_List_Table {
|
30 |
+
/**
|
31 |
+
* Number of items per page
|
32 |
+
*
|
33 |
+
* @var int
|
34 |
+
* @since 2.0.1
|
35 |
+
*/
|
36 |
+
public $per_page = 30;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get things started
|
40 |
+
*
|
41 |
+
* @since 2.0.1
|
42 |
+
* @see WP_List_Table::__construct()
|
43 |
+
*/
|
44 |
+
public function __construct() {
|
45 |
+
global $status, $page;
|
46 |
+
|
47 |
+
// Set parent defaults
|
48 |
+
parent::__construct( array(
|
49 |
+
'singular' => give_get_forms_label_singular(), // Singular name of the listed records
|
50 |
+
'plural' => give_get_forms_label_plural(), // Plural name of the listed records
|
51 |
+
'ajax' => false,// Does this table support ajax?
|
52 |
+
) );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Show the search field
|
57 |
+
*
|
58 |
+
* @since 2.0.1
|
59 |
+
* @access public
|
60 |
+
*
|
61 |
+
* @param string $text Label for the search box
|
62 |
+
* @param string $input_id ID of the search box
|
63 |
+
*
|
64 |
+
* @return void
|
65 |
+
*/
|
66 |
+
public function search_box( $text, $input_id ) {
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Retrieve the table columns
|
71 |
+
*
|
72 |
+
* @access public
|
73 |
+
* @since 2.0.1
|
74 |
+
*
|
75 |
+
* @return array $columns Array of all the list table columns
|
76 |
+
*/
|
77 |
+
public function get_columns() {
|
78 |
+
$columns = array(
|
79 |
+
'ID' => __( 'Log ID', 'give' ),
|
80 |
+
'date' => __( 'Date', 'give' ),
|
81 |
+
'details' => __( 'Process Details', 'give' ),
|
82 |
+
);
|
83 |
+
|
84 |
+
return $columns;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* This function renders most of the columns in the list table.
|
89 |
+
*
|
90 |
+
* @access public
|
91 |
+
* @since 2.0.1
|
92 |
+
*
|
93 |
+
* @param array $item Contains all the data of the discount code
|
94 |
+
* @param string $column_name The name of the column
|
95 |
+
*
|
96 |
+
* @return string Column Name
|
97 |
+
*/
|
98 |
+
public function column_default( $item, $column_name ) {
|
99 |
+
switch ( $column_name ) {
|
100 |
+
case 'ID':
|
101 |
+
return sprintf(
|
102 |
+
'<span class="give-item-label give-item-label-gray">%1$s</span> %2$s',
|
103 |
+
esc_attr( $item[ $column_name ] ),
|
104 |
+
esc_attr( $item['title'] )
|
105 |
+
);
|
106 |
+
|
107 |
+
default:
|
108 |
+
return esc_attr( $item[ $column_name ] );
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Output Error Message column
|
114 |
+
*
|
115 |
+
* @access public
|
116 |
+
* @since 2.0.1
|
117 |
+
*
|
118 |
+
* @param array $item Contains all the data of the log
|
119 |
+
*
|
120 |
+
* @return void
|
121 |
+
*/
|
122 |
+
public function column_details( $item ) {
|
123 |
+
echo Give()->tooltips->render_link( array(
|
124 |
+
'label' => __( 'View Update Log', 'give' ),
|
125 |
+
'tag_content' => '<span class="dashicons dashicons-visibility"></span>',
|
126 |
+
'link' => "#TB_inline?width=640&inlineId=log-details-{$item['ID']}",
|
127 |
+
'attributes' => array(
|
128 |
+
'class' => 'thickbox give-error-log-details-link button button-small',
|
129 |
+
),
|
130 |
+
) );
|
131 |
+
?>
|
132 |
+
<div id="log-details-<?php echo $item['ID']; ?>" style="display:none;">
|
133 |
+
<?php
|
134 |
+
|
135 |
+
// Print Log Content, if not empty.
|
136 |
+
if ( ! empty( $item['log_content'] ) ) {
|
137 |
+
echo sprintf(
|
138 |
+
'<p><pre>%1$s</pre></div>',
|
139 |
+
esc_html( $item['log_content'] )
|
140 |
+
);
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
</div>
|
144 |
+
<?php
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Display Tablenav (extended)
|
150 |
+
*
|
151 |
+
* Display the table navigation above or below the table even when no items in the logs, so nav doesn't disappear
|
152 |
+
*
|
153 |
+
* @see : https://github.com/WordImpress/Give/issues/564
|
154 |
+
*
|
155 |
+
* @since 1.4.1
|
156 |
+
* @access protected
|
157 |
+
*
|
158 |
+
* @param string $which
|
159 |
+
*/
|
160 |
+
protected function display_tablenav( $which ) {
|
161 |
+
if ( 'top' === $which ) {
|
162 |
+
wp_nonce_field( 'bulk-' . $this->_args['plural'] );
|
163 |
+
}
|
164 |
+
?>
|
165 |
+
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
166 |
+
|
167 |
+
<div class="alignleft actions bulkactions">
|
168 |
+
<?php $this->bulk_actions( $which ); ?>
|
169 |
+
</div>
|
170 |
+
<?php
|
171 |
+
$this->extra_tablenav( $which );
|
172 |
+
$this->pagination( $which );
|
173 |
+
?>
|
174 |
+
|
175 |
+
<br class="clear"/>
|
176 |
+
</div>
|
177 |
+
<?php
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Retrieve the current page number
|
182 |
+
*
|
183 |
+
* @access public
|
184 |
+
* @since 2.0.1
|
185 |
+
*
|
186 |
+
* @return int Current page number
|
187 |
+
*/
|
188 |
+
public function get_paged() {
|
189 |
+
return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Outputs the log views
|
194 |
+
*
|
195 |
+
* @param string $which Top or Bottom.
|
196 |
+
*
|
197 |
+
* @access public
|
198 |
+
* @since 2.0.1
|
199 |
+
*
|
200 |
+
* @return void
|
201 |
+
*/
|
202 |
+
function bulk_actions( $which = '' ) {
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Gets the log entries for the current view
|
207 |
+
*
|
208 |
+
* @access public
|
209 |
+
* @since 2.0.1
|
210 |
+
*
|
211 |
+
* @return array $logs_data Array of all the Log entires
|
212 |
+
*/
|
213 |
+
public function get_logs() {
|
214 |
+
$logs_data = array();
|
215 |
+
$paged = $this->get_paged();
|
216 |
+
$log_query = array(
|
217 |
+
'log_type' => 'update',
|
218 |
+
'paged' => $paged,
|
219 |
+
'posts_per_page' => $this->per_page,
|
220 |
+
);
|
221 |
+
|
222 |
+
$logs = Give()->logs->get_connected_logs( $log_query );
|
223 |
+
|
224 |
+
if ( $logs ) {
|
225 |
+
foreach ( $logs as $log ) {
|
226 |
+
|
227 |
+
$logs_data[] = array(
|
228 |
+
'ID' => $log->ID,
|
229 |
+
'title' => $log->log_title,
|
230 |
+
'date' => $log->log_date,
|
231 |
+
'log_content' => $log->log_content,
|
232 |
+
'log_date' => $log->log_date,
|
233 |
+
);
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
return $logs_data;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Setup the final data for the table
|
242 |
+
*
|
243 |
+
* @access public
|
244 |
+
* @since 2.0.1
|
245 |
+
* @uses Give_Update_Log_Table::get_columns()
|
246 |
+
* @uses WP_List_Table::get_sortable_columns()
|
247 |
+
* @uses Give_Update_Log_Table::get_pagenum()
|
248 |
+
* @uses Give_Update_Log_Table::get_logs()
|
249 |
+
* @uses Give_Update_Log_Table::get_log_count()
|
250 |
+
*
|
251 |
+
* @return void
|
252 |
+
*/
|
253 |
+
public function prepare_items() {
|
254 |
+
$columns = $this->get_columns();
|
255 |
+
$hidden = array(); // No hidden columns
|
256 |
+
$sortable = $this->get_sortable_columns();
|
257 |
+
$this->_column_headers = array( $columns, $hidden, $sortable );
|
258 |
+
$this->items = $this->get_logs();
|
259 |
+
$total_items = Give()->logs->get_log_count( 0, 'update' );
|
260 |
+
|
261 |
+
$this->set_pagination_args( array(
|
262 |
+
'total_items' => $total_items,
|
263 |
+
'per_page' => $this->per_page,
|
264 |
+
'total_pages' => ceil( $total_items / $this->per_page ),
|
265 |
+
)
|
266 |
+
);
|
267 |
+
}
|
268 |
+
}
|
includes/admin/tools/logs/logs.php
CHANGED
@@ -82,6 +82,49 @@ function give_logs_view_sales() {
|
|
82 |
|
83 |
add_action( 'give_logs_view_sales', 'give_logs_view_sales' );
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
/**
|
87 |
* Gateway Error Logs
|
82 |
|
83 |
add_action( 'give_logs_view_sales', 'give_logs_view_sales' );
|
84 |
|
85 |
+
/**
|
86 |
+
* Update Logs
|
87 |
+
*
|
88 |
+
* @since 2.0.1
|
89 |
+
*
|
90 |
+
* @return void
|
91 |
+
*/
|
92 |
+
function give_logs_view_updates() {
|
93 |
+
include( GIVE_PLUGIN_DIR . 'includes/admin/tools/logs/class-update-logs-list-table.php' );
|
94 |
+
|
95 |
+
$logs_table = new Give_Update_Log_Table();
|
96 |
+
$logs_table->prepare_items();
|
97 |
+
?>
|
98 |
+
<div class="wrap">
|
99 |
+
|
100 |
+
<?php
|
101 |
+
/**
|
102 |
+
* Fires before displaying Payment Error logs.
|
103 |
+
*
|
104 |
+
* @since 2.0.1
|
105 |
+
*/
|
106 |
+
do_action( 'give_logs_update_top' );
|
107 |
+
|
108 |
+
$logs_table->display(); ?>
|
109 |
+
<input type="hidden" name="post_type" value="give_forms"/>
|
110 |
+
<input type="hidden" name="page" value="give-tools"/>
|
111 |
+
<input type="hidden" name="tab" value="logs"/>
|
112 |
+
<input type="hidden" name="section" value="update"/>
|
113 |
+
|
114 |
+
<?php
|
115 |
+
/**
|
116 |
+
* Fires after displaying update logs.
|
117 |
+
*
|
118 |
+
* @since 2.0.1
|
119 |
+
*/
|
120 |
+
do_action( 'give_logs_update_bottom' );
|
121 |
+
?>
|
122 |
+
|
123 |
+
</div>
|
124 |
+
<?php
|
125 |
+
}
|
126 |
+
|
127 |
+
add_action( 'give_logs_view_updates', 'give_logs_view_updates' );
|
128 |
|
129 |
/**
|
130 |
* Gateway Error Logs
|
includes/admin/tools/views/html-admin-page-system-info.php
CHANGED
@@ -136,6 +136,11 @@ $give_updates = Give_Updates::get_instance();
|
|
136 |
<td><?php echo 0 !== $blog_page_id ? esc_html( get_the_title( $blog_page_id ) . ' (#' . $blog_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
|
137 |
</tr>
|
138 |
<?php endif;?>
|
|
|
|
|
|
|
|
|
|
|
139 |
<tr>
|
140 |
<td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix Length', 'give' ); ?>:</td>
|
141 |
<td class="help"><?php echo Give()->tooltips->render_help( __( 'The length of the table prefix used in your WordPress database.', 'give' ) ); ?></td>
|
@@ -455,7 +460,13 @@ $give_updates = Give_Updates::get_instance();
|
|
455 |
$pending_updates = $give_updates->get_total_new_db_update_count();
|
456 |
$total_updates = $give_updates->get_total_db_update_count();
|
457 |
|
458 |
-
if(
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
|
460 |
// When all the db updates are pending.
|
461 |
$updates_text = sprintf(
|
136 |
<td><?php echo 0 !== $blog_page_id ? esc_html( get_the_title( $blog_page_id ) . ' (#' . $blog_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
|
137 |
</tr>
|
138 |
<?php endif;?>
|
139 |
+
<tr>
|
140 |
+
<td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix', 'give' ); ?>:</td>
|
141 |
+
<td class="help"><?php echo Give()->tooltips->render_help( __( 'The table prefix used in your WordPress database.', 'give' ) ); ?></td>
|
142 |
+
<td><?php echo esc_html( $wpdb->prefix ); ?></td>
|
143 |
+
</tr>
|
144 |
<tr>
|
145 |
<td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix Length', 'give' ); ?>:</td>
|
146 |
<td class="help"><?php echo Give()->tooltips->render_help( __( 'The length of the table prefix used in your WordPress database.', 'give' ) ); ?></td>
|
460 |
$pending_updates = $give_updates->get_total_new_db_update_count();
|
461 |
$total_updates = $give_updates->get_total_db_update_count();
|
462 |
|
463 |
+
if( Give_Updates::$background_updater->is_paused_process() ) {
|
464 |
+
// When all the db updates are pending.
|
465 |
+
$updates_text = sprintf(
|
466 |
+
__( '%1$s updates still need to run. (Paused) ', 'give' ),
|
467 |
+
count( $give_updates->get_updates('database', 'new' ) )
|
468 |
+
);
|
469 |
+
} elseif( $pending_updates === $total_updates ) {
|
470 |
|
471 |
// When all the db updates are pending.
|
472 |
$updates_text = sprintf(
|
includes/admin/upgrades/class-give-updates.php
CHANGED
@@ -20,10 +20,10 @@ class Give_Updates {
|
|
20 |
* Instance.
|
21 |
*
|
22 |
* @since
|
23 |
-
* @access
|
24 |
* @var Give_Background_Updater
|
25 |
*/
|
26 |
-
static
|
27 |
|
28 |
/**
|
29 |
* Updates
|
@@ -149,7 +149,10 @@ class Give_Updates {
|
|
149 |
add_action( 'wp_ajax_give_db_updates_info', array( $this, '__give_db_updates_info' ) );
|
150 |
add_action( 'wp_ajax_give_run_db_updates', array( $this, '__give_start_updating' ) );
|
151 |
add_action( 'admin_init', array( $this, '__redirect_admin' ) );
|
|
|
|
|
152 |
add_action( 'admin_notices', array( $this, '__show_notice' ) );
|
|
|
153 |
|
154 |
if ( is_admin() ) {
|
155 |
add_action( 'admin_init', array( $this, '__change_donations_label' ), 9999 );
|
@@ -210,6 +213,8 @@ class Give_Updates {
|
|
210 |
return;
|
211 |
}
|
212 |
|
|
|
|
|
213 |
foreach ( $menu as $index => $menu_item ) {
|
214 |
if ( 'edit.php?post_type=give_forms' !== $menu_item[2] ) {
|
215 |
continue;
|
@@ -218,10 +223,10 @@ class Give_Updates {
|
|
218 |
$menu[ $index ][0] = sprintf(
|
219 |
'%1$s <span class="update-plugins"><span class="plugin-count give-update-progress-count">%2$s%3$s</span></span>',
|
220 |
__( 'Donations', 'give' ),
|
221 |
-
$
|
222 |
$this->get_db_update_processing_percentage() :
|
223 |
$this->get_total_update_count(),
|
224 |
-
$
|
225 |
);
|
226 |
|
227 |
break;
|
@@ -261,17 +266,20 @@ class Give_Updates {
|
|
261 |
return;
|
262 |
}
|
263 |
|
|
|
|
|
264 |
// Upgrades
|
265 |
add_submenu_page(
|
266 |
'edit.php?post_type=give_forms',
|
267 |
esc_html__( 'Give Updates', 'give' ),
|
268 |
sprintf(
|
269 |
-
'%1$s <span class="update-plugins"><span class="plugin-count give-update-progress-count">%
|
270 |
__( 'Updates', 'give' ),
|
271 |
-
$
|
|
|
272 |
$this->get_db_update_processing_percentage() :
|
273 |
$this->get_total_update_count(),
|
274 |
-
$
|
275 |
),
|
276 |
'manage_give_settings',
|
277 |
'give-updates',
|
@@ -302,6 +310,171 @@ class Give_Updates {
|
|
302 |
}
|
303 |
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
/**
|
306 |
* Show update related notices
|
307 |
*
|
@@ -310,7 +483,7 @@ class Give_Updates {
|
|
310 |
*/
|
311 |
public function __show_notice() {
|
312 |
// Bailout.
|
313 |
-
if ( ! current_user_can( 'manage_give_settings' )
|
314 |
return;
|
315 |
}
|
316 |
|
@@ -325,13 +498,48 @@ class Give_Updates {
|
|
325 |
return;
|
326 |
}
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
// Show notice if ajax is not working.
|
329 |
if ( ! give_test_ajax_works() ) {
|
330 |
Give()->notices->register_notice(
|
331 |
array(
|
332 |
'id' => 'give_db_upgrade_ajax_inaccessible',
|
333 |
'type' => 'error',
|
334 |
-
'description' => __( 'Give needs to upgrade the database but cannot because AJAX
|
335 |
'show' => true,
|
336 |
)
|
337 |
);
|
@@ -362,12 +570,12 @@ class Give_Updates {
|
|
362 |
</p>
|
363 |
<p class="submit">
|
364 |
<a href="<?php echo esc_url( add_query_arg( array( 'give-run-db-update' => 1 ), admin_url( 'edit.php?post_type=give_forms&page=give-updates' ) ) ); ?>" class="button button-primary give-run-update-now">
|
365 |
-
<?php _e( 'Run the updater', '
|
366 |
</a>
|
367 |
</p>
|
368 |
<script type="text/javascript">
|
369 |
jQuery('.give-run-update-now').click('click', function () {
|
370 |
-
return window.confirm('<?php echo esc_js( __( 'It is
|
371 |
});
|
372 |
</script>
|
373 |
<?php
|
@@ -493,7 +701,7 @@ class Give_Updates {
|
|
493 |
$update_info = get_option( 'give_doing_upgrade' );
|
494 |
$response_type = '';
|
495 |
|
496 |
-
if ( empty( $update_info )
|
497 |
$update_info = array(
|
498 |
'message' => __( 'Give database updates completed successfully. Thank you for updating to the latest version!', 'give' ),
|
499 |
'heading' => __( 'Updates Completed.', 'give' ),
|
@@ -623,15 +831,15 @@ class Give_Updates {
|
|
623 |
*/
|
624 |
public function has_valid_dependency( $update ) {
|
625 |
$is_valid_dependency = true;
|
626 |
-
$update_ids = wp_list_pluck( $this->get_updates( 'database' ), 'id' );
|
627 |
-
|
628 |
-
foreach ( $update['depend'] as $depend ) {
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
}
|
635 |
|
636 |
return $is_valid_dependency;
|
637 |
}
|
20 |
* Instance.
|
21 |
*
|
22 |
* @since
|
23 |
+
* @access public
|
24 |
* @var Give_Background_Updater
|
25 |
*/
|
26 |
+
static public $background_updater;
|
27 |
|
28 |
/**
|
29 |
* Updates
|
149 |
add_action( 'wp_ajax_give_db_updates_info', array( $this, '__give_db_updates_info' ) );
|
150 |
add_action( 'wp_ajax_give_run_db_updates', array( $this, '__give_start_updating' ) );
|
151 |
add_action( 'admin_init', array( $this, '__redirect_admin' ) );
|
152 |
+
add_action( 'admin_init', array( $this, '__pause_db_update' ), -1 );
|
153 |
+
add_action( 'admin_init', array( $this, '__restart_db_update' ), -1 );
|
154 |
add_action( 'admin_notices', array( $this, '__show_notice' ) );
|
155 |
+
add_action( 'give_restart_db_upgrade', array( $this, '__health_background_update' ) );
|
156 |
|
157 |
if ( is_admin() ) {
|
158 |
add_action( 'admin_init', array( $this, '__change_donations_label' ), 9999 );
|
213 |
return;
|
214 |
}
|
215 |
|
216 |
+
$is_update = ( $this->is_doing_updates() && ! self::$background_updater->is_paused_process() );
|
217 |
+
|
218 |
foreach ( $menu as $index => $menu_item ) {
|
219 |
if ( 'edit.php?post_type=give_forms' !== $menu_item[2] ) {
|
220 |
continue;
|
223 |
$menu[ $index ][0] = sprintf(
|
224 |
'%1$s <span class="update-plugins"><span class="plugin-count give-update-progress-count">%2$s%3$s</span></span>',
|
225 |
__( 'Donations', 'give' ),
|
226 |
+
$is_update ?
|
227 |
$this->get_db_update_processing_percentage() :
|
228 |
$this->get_total_update_count(),
|
229 |
+
$is_update ? '%' : ''
|
230 |
);
|
231 |
|
232 |
break;
|
266 |
return;
|
267 |
}
|
268 |
|
269 |
+
$is_update = ( $this->is_doing_updates() && ! self::$background_updater->is_paused_process() );
|
270 |
+
|
271 |
// Upgrades
|
272 |
add_submenu_page(
|
273 |
'edit.php?post_type=give_forms',
|
274 |
esc_html__( 'Give Updates', 'give' ),
|
275 |
sprintf(
|
276 |
+
'%1$s <span class="update-plugins"%2$s><span class="plugin-count give-update-progress-count">%3$s%4$s</span></span>',
|
277 |
__( 'Updates', 'give' ),
|
278 |
+
isset( $_GET['give-pause-db-upgrades'] ) ? ' style="display:none;"' : '',
|
279 |
+
$is_update ?
|
280 |
$this->get_db_update_processing_percentage() :
|
281 |
$this->get_total_update_count(),
|
282 |
+
$is_update ? '%' : ''
|
283 |
),
|
284 |
'manage_give_settings',
|
285 |
'give-updates',
|
310 |
}
|
311 |
|
312 |
|
313 |
+
/**
|
314 |
+
* Pause db upgrade
|
315 |
+
*
|
316 |
+
* @since 2.0.1
|
317 |
+
* @access public
|
318 |
+
*
|
319 |
+
* @return bool
|
320 |
+
*/
|
321 |
+
public function __pause_db_update() {
|
322 |
+
// Bailout.
|
323 |
+
if (
|
324 |
+
wp_doing_ajax() ||
|
325 |
+
! isset( $_GET['page'] ) ||
|
326 |
+
'give-updates' !== $_GET['page'] ||
|
327 |
+
! isset( $_GET['give-pause-db-upgrades'] ) ||
|
328 |
+
self::$background_updater->is_paused_process()
|
329 |
+
) {
|
330 |
+
return false;
|
331 |
+
}
|
332 |
+
|
333 |
+
$batch = self::$background_updater->get_all_batch();
|
334 |
+
|
335 |
+
if ( ! empty( $batch ) ) {
|
336 |
+
update_option( 'give_paused_batches', $batch, 'no' );
|
337 |
+
delete_option( $batch->key );
|
338 |
+
delete_site_transient( self::$background_updater->get_identifier() . '_process_lock' );
|
339 |
+
wp_clear_scheduled_hook( self::$background_updater->get_cron_identifier() );
|
340 |
+
|
341 |
+
Give()->logs->add( 'Update Pause', print_r( $batch, true ), 0, 'update' );
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Fire action when pause db updates
|
345 |
+
*
|
346 |
+
* @since 2.0.1
|
347 |
+
*/
|
348 |
+
do_action( 'give_pause_db_upgrade', $this );
|
349 |
+
}
|
350 |
+
|
351 |
+
return true;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Restart db upgrade
|
356 |
+
*
|
357 |
+
* @since 2.0.1
|
358 |
+
* @access public
|
359 |
+
*
|
360 |
+
* @return bool
|
361 |
+
*/
|
362 |
+
public function __restart_db_update() {
|
363 |
+
// Bailout.
|
364 |
+
if (
|
365 |
+
wp_doing_ajax() ||
|
366 |
+
! isset( $_GET['page'] ) ||
|
367 |
+
'give-updates' !== $_GET['page'] ||
|
368 |
+
! isset( $_GET['give-restart-db-upgrades'] ) ||
|
369 |
+
! self::$background_updater->is_paused_process()
|
370 |
+
) {
|
371 |
+
return false;
|
372 |
+
}
|
373 |
+
|
374 |
+
$batch = get_option( 'give_paused_batches' );
|
375 |
+
|
376 |
+
if ( ! empty( $batch ) ) {
|
377 |
+
update_option( $batch->key, $batch->data );
|
378 |
+
delete_option( 'give_paused_batches' );
|
379 |
+
|
380 |
+
Give()->logs->add( 'Update Restart', print_r( $batch, true ), 0, 'update' );
|
381 |
+
|
382 |
+
|
383 |
+
/** Fire action when restart db updates
|
384 |
+
*
|
385 |
+
* @since 2.0.1
|
386 |
+
*/
|
387 |
+
do_action( 'give_restart_db_upgrade', $this );
|
388 |
+
|
389 |
+
self::$background_updater->dispatch();
|
390 |
+
}
|
391 |
+
|
392 |
+
return true;
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Health check for updates.
|
397 |
+
*
|
398 |
+
* @since 2.0
|
399 |
+
* @access public
|
400 |
+
*
|
401 |
+
* @param Give_Updates $give_updates
|
402 |
+
*/
|
403 |
+
public function __health_background_update( $give_updates ) {
|
404 |
+
if( ! $this->is_doing_updates() ) {
|
405 |
+
return;
|
406 |
+
}
|
407 |
+
|
408 |
+
$batch = Give_Updates::$background_updater->get_all_batch();
|
409 |
+
$batch_data_count = count( $batch->data );
|
410 |
+
$all_updates = $give_updates->get_updates( 'database', 'all' );
|
411 |
+
$all_update_ids = wp_list_pluck( $all_updates, 'id' );
|
412 |
+
$all_batch_update_ids = ! empty( $batch ) ? wp_list_pluck( $batch->data, 'id' ) : array();
|
413 |
+
$log_data = '';
|
414 |
+
|
415 |
+
if ( ! empty( $batch ) ) {
|
416 |
+
|
417 |
+
foreach ( $batch->data as $index => $update ) {
|
418 |
+
$log_data = print_r( $update, true ) . "\n";
|
419 |
+
|
420 |
+
if ( ! is_callable( $update['callback'] ) ) {
|
421 |
+
$log_data .= 'Removing missing callback update: ' . "{$update['id']}\n";
|
422 |
+
unset( $batch->data[ $index ] );
|
423 |
+
}
|
424 |
+
|
425 |
+
if ( ! empty( $update['depend'] ) ) {
|
426 |
+
|
427 |
+
foreach ( $update['depend'] as $depend ) {
|
428 |
+
if ( give_has_upgrade_completed( $depend ) ) {
|
429 |
+
$log_data .= 'Completed update: ' . "{$depend}\n";
|
430 |
+
continue;
|
431 |
+
}
|
432 |
+
|
433 |
+
if ( in_array( $depend, $all_update_ids ) && ! in_array( $depend, $all_batch_update_ids ) ) {
|
434 |
+
$log_data .= 'Adding missing update: ' . "{$depend}\n";
|
435 |
+
array_unshift( $batch->data, $all_updates[ array_search( $depend, $all_update_ids ) ] );
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
if( $new_updates = $this->get_updates( 'database', 'new' ) ){
|
443 |
+
$all_batch_update_ids = ! empty( $batch ) ? wp_list_pluck( $batch->data, 'id' ) : array();
|
444 |
+
|
445 |
+
foreach ( $new_updates as $index => $new_update ) {
|
446 |
+
if( give_has_upgrade_completed( $new_update['id'] ) || in_array( $new_update['id'], $all_batch_update_ids ) ) {
|
447 |
+
unset( $new_updates[$index] );
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
if( ! empty( $new_updates ) ) {
|
452 |
+
$log_data .= 'Adding new update: ' . "\n";
|
453 |
+
$log_data .= print_r( $new_updates, true ) . "\n";
|
454 |
+
|
455 |
+
$batch->data = array_merge( $batch->data, $new_updates );
|
456 |
+
update_option( 'give_db_update_count', ( absint( get_option( 'give_db_update_count' ) ) + count( $new_updates ) ) );
|
457 |
+
}
|
458 |
+
}
|
459 |
+
|
460 |
+
if ( $batch_data_count !== count( $batch->data ) ) {
|
461 |
+
$log_data .= 'Updating batch' . "\n";
|
462 |
+
$log_data .= print_r( $batch, true );
|
463 |
+
|
464 |
+
update_option( $batch->key, $batch->data );
|
465 |
+
|
466 |
+
// Reset update info.
|
467 |
+
$doing_upgrade_args = get_option( 'give_doing_upgrade' );
|
468 |
+
// $doing_upgrade_args['update'] = $give_updates->update;
|
469 |
+
$doing_upgrade_args['heading'] = sprintf( 'Update %s of %s', $doing_upgrade_args['update'], get_option( 'give_db_update_count' ) );
|
470 |
+
$doing_upgrade_args['total_percentage'] = $this->get_db_update_processing_percentage();
|
471 |
+
update_option( 'give_doing_upgrade', $doing_upgrade_args );
|
472 |
+
|
473 |
+
Give()->logs->add( 'Update Health Check', $log_data, 0, 'update' );
|
474 |
+
}
|
475 |
+
}
|
476 |
+
|
477 |
+
|
478 |
/**
|
479 |
* Show update related notices
|
480 |
*
|
483 |
*/
|
484 |
public function __show_notice() {
|
485 |
// Bailout.
|
486 |
+
if ( ! current_user_can( 'manage_give_settings' ) ) {
|
487 |
return;
|
488 |
}
|
489 |
|
498 |
return;
|
499 |
}
|
500 |
|
501 |
+
// Show notice if upgrade paused.
|
502 |
+
if ( self::$background_updater->is_paused_process() ) {
|
503 |
+
ob_start();
|
504 |
+
?>
|
505 |
+
<p>
|
506 |
+
<strong><?php _e( 'Database Update', 'give' ); ?></strong>
|
507 |
+
– <?php _e( 'GiveWP needs to update your database to the latest version. The following process will make updates to your site\'s database. Please create a backup before proceeding.', 'give' ); ?>
|
508 |
+
</p>
|
509 |
+
<p class="submit">
|
510 |
+
<a href="<?php echo esc_url( add_query_arg( array( 'give-restart-db-upgrades' => 1 ), admin_url( 'edit.php?post_type=give_forms&page=give-updates' ) ) ); ?>" class="button button-primary give-restart-updater-btn">
|
511 |
+
<?php _e( 'Restart the updater', 'give' ); ?>
|
512 |
+
</a>
|
513 |
+
</p>
|
514 |
+
<script type="text/javascript">
|
515 |
+
jQuery('.give-restart-updater-btn').click('click', function () {
|
516 |
+
return window.confirm('<?php echo esc_js( __( 'It is recommended that you backup your database before proceeding. Do you want to run the update now?', 'give' ) ); ?>'); // jshint ignore:line
|
517 |
+
});
|
518 |
+
</script>
|
519 |
+
<?php
|
520 |
+
$desc_html = ob_get_clean();
|
521 |
+
|
522 |
+
|
523 |
+
Give()->notices->register_notice( array(
|
524 |
+
'id' => 'give_upgrade_db',
|
525 |
+
'type' => 'error',
|
526 |
+
'dismissible' => false,
|
527 |
+
'description' => $desc_html,
|
528 |
+
) );
|
529 |
+
}
|
530 |
+
|
531 |
+
// Bailout if doing upgrades.
|
532 |
+
if( $this->is_doing_updates() ) {
|
533 |
+
return;
|
534 |
+
}
|
535 |
+
|
536 |
// Show notice if ajax is not working.
|
537 |
if ( ! give_test_ajax_works() ) {
|
538 |
Give()->notices->register_notice(
|
539 |
array(
|
540 |
'id' => 'give_db_upgrade_ajax_inaccessible',
|
541 |
'type' => 'error',
|
542 |
+
'description' => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Give needs to upgrade the database but cannot because AJAX does not appear accessible. This could be because your website is password protected, in maintenance mode, or has a specific hosting configuration or plugin active that is preventing access.', 'give' ), 'http://docs.givewp.com/admin-ajax-error', __( 'Read More', 'give' ) . ' »' ),
|
543 |
'show' => true,
|
544 |
)
|
545 |
);
|
570 |
</p>
|
571 |
<p class="submit">
|
572 |
<a href="<?php echo esc_url( add_query_arg( array( 'give-run-db-update' => 1 ), admin_url( 'edit.php?post_type=give_forms&page=give-updates' ) ) ); ?>" class="button button-primary give-run-update-now">
|
573 |
+
<?php _e( 'Run the updater', 'give' ); ?>
|
574 |
</a>
|
575 |
</p>
|
576 |
<script type="text/javascript">
|
577 |
jQuery('.give-run-update-now').click('click', function () {
|
578 |
+
return window.confirm('<?php echo esc_js( __( 'It is recommended that you backup your database before proceeding. Do you want to run the update now?', 'give' ) ); ?>'); // jshint ignore:line
|
579 |
});
|
580 |
</script>
|
581 |
<?php
|
701 |
$update_info = get_option( 'give_doing_upgrade' );
|
702 |
$response_type = '';
|
703 |
|
704 |
+
if ( empty( $update_info ) ) {
|
705 |
$update_info = array(
|
706 |
'message' => __( 'Give database updates completed successfully. Thank you for updating to the latest version!', 'give' ),
|
707 |
'heading' => __( 'Updates Completed.', 'give' ),
|
831 |
*/
|
832 |
public function has_valid_dependency( $update ) {
|
833 |
$is_valid_dependency = true;
|
834 |
+
// $update_ids = wp_list_pluck( $this->get_updates( 'database', 'all' ), 'id' );
|
835 |
+
//
|
836 |
+
// foreach ( $update['depend'] as $depend ) {
|
837 |
+
// // Check if dependency is valid or not.
|
838 |
+
// if ( ! in_array( $depend, $update_ids ) ) {
|
839 |
+
// $is_valid_dependency = false;
|
840 |
+
// break;
|
841 |
+
// }
|
842 |
+
// }
|
843 |
|
844 |
return $is_valid_dependency;
|
845 |
}
|
includes/admin/upgrades/upgrade-functions.php
CHANGED
@@ -77,6 +77,16 @@ function give_do_automatic_upgrades() {
|
|
77 |
case version_compare( $give_version, '2.0', '<' ) :
|
78 |
give_v20_upgrades();
|
79 |
$did_upgrade = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
if ( $did_upgrade ) {
|
@@ -264,6 +274,45 @@ function give_show_upgrade_notices( $give_updates ) {
|
|
264 |
),
|
265 |
)
|
266 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
}
|
268 |
|
269 |
add_action( 'give_register_updates', 'give_show_upgrade_notices' );
|
@@ -2105,4 +2154,409 @@ function give_v20_rename_donor_tables_callback() {
|
|
2105 |
// Re initiate donor classes.
|
2106 |
Give()->donors = new Give_DB_Donors();
|
2107 |
Give()->donor_meta = new Give_DB_Donor_Meta();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2108 |
}
|
77 |
case version_compare( $give_version, '2.0', '<' ) :
|
78 |
give_v20_upgrades();
|
79 |
$did_upgrade = true;
|
80 |
+
|
81 |
+
case version_compare( $give_version, '2.0.1', '<' ) :
|
82 |
+
// Do nothing on fresh install.
|
83 |
+
if( ! doing_action( 'give_upgrades' ) ) {
|
84 |
+
give_v201_create_tables();
|
85 |
+
Give_Updates::get_instance()->__health_background_update( Give_Updates::get_instance() );
|
86 |
+
Give_Updates::$background_updater->dispatch();
|
87 |
+
}
|
88 |
+
|
89 |
+
$did_upgrade = true;
|
90 |
}
|
91 |
|
92 |
if ( $did_upgrade ) {
|
274 |
),
|
275 |
)
|
276 |
);
|
277 |
+
|
278 |
+
|
279 |
+
// v2.0.1 Upgrades
|
280 |
+
$give_updates->register(
|
281 |
+
array(
|
282 |
+
'id' => 'v201_upgrades_payment_metadata',
|
283 |
+
'version' => '2.0.1',
|
284 |
+
'callback' => 'give_v201_upgrades_payment_metadata_callback',
|
285 |
+
)
|
286 |
+
);
|
287 |
+
|
288 |
+
// v2.0.1 Upgrades
|
289 |
+
$give_updates->register(
|
290 |
+
array(
|
291 |
+
'id' => 'v201_add_missing_donors',
|
292 |
+
'version' => '2.0.1',
|
293 |
+
'callback' => 'give_v201_add_missing_donors_callback',
|
294 |
+
)
|
295 |
+
);
|
296 |
+
|
297 |
+
// Run v2.0.0 Upgrades again in 2.0.1
|
298 |
+
$give_updates->register(
|
299 |
+
array(
|
300 |
+
'id' => 'v201_move_metadata_into_new_table',
|
301 |
+
'version' => '2.0.1',
|
302 |
+
'callback' => 'give_v201_move_metadata_into_new_table_callback',
|
303 |
+
'depend' => array( 'v201_upgrades_payment_metadata', 'v201_add_missing_donors' ),
|
304 |
+
)
|
305 |
+
);
|
306 |
+
|
307 |
+
// Run v2.0.0 Upgrades again in 2.0.1
|
308 |
+
$give_updates->register(
|
309 |
+
array(
|
310 |
+
'id' => 'v201_logs_upgrades',
|
311 |
+
'version' => '2.0.1',
|
312 |
+
'callback' => 'give_v201_logs_upgrades_callback',
|
313 |
+
|
314 |
+
)
|
315 |
+
);
|
316 |
}
|
317 |
|
318 |
add_action( 'give_register_updates', 'give_show_upgrade_notices' );
|
2154 |
// Re initiate donor classes.
|
2155 |
Give()->donors = new Give_DB_Donors();
|
2156 |
Give()->donor_meta = new Give_DB_Donor_Meta();
|
2157 |
+
}
|
2158 |
+
|
2159 |
+
|
2160 |
+
/**
|
2161 |
+
* Create missing meta tables.
|
2162 |
+
*
|
2163 |
+
* @since 2.0.1
|
2164 |
+
* @global wpdb $wpdb
|
2165 |
+
* @return void
|
2166 |
+
*/
|
2167 |
+
function give_v201_create_tables(){
|
2168 |
+
global $wpdb;
|
2169 |
+
|
2170 |
+
if ( ! $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", "{$wpdb->prefix}give_paymentmeta" ) ) ) {
|
2171 |
+
Give()->payment_meta->create_table();
|
2172 |
+
}
|
2173 |
+
|
2174 |
+
if ( ! $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", "{$wpdb->prefix}give_formmeta" ) ) ) {
|
2175 |
+
Give()->form_meta->create_table();
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
if ( ! $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", "{$wpdb->prefix}give_logs" ) ) ) {
|
2179 |
+
Give()->logs->log_db->create_table();
|
2180 |
+
}
|
2181 |
+
|
2182 |
+
if ( ! $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", "{$wpdb->prefix}give_logmeta" ) ) ) {
|
2183 |
+
Give()->logs->logmeta_db->create_table();
|
2184 |
+
}
|
2185 |
+
}
|
2186 |
+
|
2187 |
+
/**
|
2188 |
+
* Upgrade payment metadata for new metabox settings.
|
2189 |
+
*
|
2190 |
+
* @since 2.0.1
|
2191 |
+
* @global wpdb $wpdb
|
2192 |
+
* @return void
|
2193 |
+
*/
|
2194 |
+
function give_v201_upgrades_payment_metadata_callback() {
|
2195 |
+
global $wpdb;
|
2196 |
+
$give_updates = Give_Updates::get_instance();
|
2197 |
+
|
2198 |
+
// form query
|
2199 |
+
$forms = new WP_Query( array(
|
2200 |
+
'paged' => $give_updates->step,
|
2201 |
+
'status' => 'any',
|
2202 |
+
'order' => 'ASC',
|
2203 |
+
'post_type' => 'give_payment',
|
2204 |
+
'posts_per_page' => 100,
|
2205 |
+
'date_query' => array(
|
2206 |
+
'after' => array(
|
2207 |
+
'year' => 2018,
|
2208 |
+
'month' => 1,
|
2209 |
+
'day' => 8,
|
2210 |
+
),
|
2211 |
+
'inclusive' => true,
|
2212 |
+
)
|
2213 |
+
)
|
2214 |
+
);
|
2215 |
+
|
2216 |
+
if ( $forms->have_posts() ) {
|
2217 |
+
$give_updates->set_percentage( $forms->found_posts, ( $give_updates->step * 100 ) );
|
2218 |
+
|
2219 |
+
while ( $forms->have_posts() ) {
|
2220 |
+
$forms->the_post();
|
2221 |
+
global $post;
|
2222 |
+
|
2223 |
+
// Do not add new meta keys if already refactored.
|
2224 |
+
if ( $wpdb->get_var( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id=%d AND meta_key=%s", $post->ID, '_give_payment_donor_id' ) ) ) {
|
2225 |
+
continue;
|
2226 |
+
}
|
2227 |
+
|
2228 |
+
|
2229 |
+
// Split _give_payment_meta meta.
|
2230 |
+
// @todo Remove _give_payment_meta after releases 2.0
|
2231 |
+
$payment_meta = give_get_meta( $post->ID, '_give_payment_meta', true );
|
2232 |
+
|
2233 |
+
if ( ! empty( $payment_meta ) ) {
|
2234 |
+
_give_20_bc_split_and_save_give_payment_meta( $post->ID, $payment_meta );
|
2235 |
+
}
|
2236 |
+
|
2237 |
+
$deprecated_meta_keys = array(
|
2238 |
+
'_give_payment_customer_id' => '_give_payment_donor_id',
|
2239 |
+
'_give_payment_user_email' => '_give_payment_donor_email',
|
2240 |
+
'_give_payment_user_ip' => '_give_payment_donor_ip',
|
2241 |
+
);
|
2242 |
+
|
2243 |
+
foreach ( $deprecated_meta_keys as $old_meta_key => $new_meta_key ) {
|
2244 |
+
// Do not add new meta key if already exist.
|
2245 |
+
if ( $wpdb->get_var( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id=%d AND meta_key=%s", $post->ID, $new_meta_key ) ) ) {
|
2246 |
+
continue;
|
2247 |
+
}
|
2248 |
+
|
2249 |
+
$wpdb->insert(
|
2250 |
+
$wpdb->postmeta,
|
2251 |
+
array(
|
2252 |
+
'post_id' => $post->ID,
|
2253 |
+
'meta_key' => $new_meta_key,
|
2254 |
+
'meta_value' => give_get_meta( $post->ID, $old_meta_key, true )
|
2255 |
+
)
|
2256 |
+
);
|
2257 |
+
}
|
2258 |
+
|
2259 |
+
// Bailout
|
2260 |
+
if ( $donor_id = give_get_meta( $post->ID, '_give_payment_donor_id', true ) ) {
|
2261 |
+
/* @var Give_Donor $donor */
|
2262 |
+
$donor = new Give_Donor( $donor_id );
|
2263 |
+
|
2264 |
+
$address['line1'] = give_get_meta( $post->ID, '_give_donor_billing_address1', true, '' );
|
2265 |
+
$address['line2'] = give_get_meta( $post->ID, '_give_donor_billing_address2', true, '' );
|
2266 |
+
$address['city'] = give_get_meta( $post->ID, '_give_donor_billing_city', true, '' );
|
2267 |
+
$address['state'] = give_get_meta( $post->ID, '_give_donor_billing_state', true, '' );
|
2268 |
+
$address['zip'] = give_get_meta( $post->ID, '_give_donor_billing_zip', true, '' );
|
2269 |
+
$address['country'] = give_get_meta( $post->ID, '_give_donor_billing_country', true, '' );
|
2270 |
+
|
2271 |
+
// Save address.
|
2272 |
+
$donor->add_address( 'billing[]', $address );
|
2273 |
+
}
|
2274 |
+
|
2275 |
+
}// End while().
|
2276 |
+
|
2277 |
+
wp_reset_postdata();
|
2278 |
+
} else {
|
2279 |
+
// @todo Delete user id meta after releases 2.0
|
2280 |
+
// $wpdb->get_var( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key=%s", '_give_payment_user_id' ) );
|
2281 |
+
|
2282 |
+
// No more forms found, finish up.
|
2283 |
+
give_set_upgrade_complete( 'v201_upgrades_payment_metadata' );
|
2284 |
+
}
|
2285 |
+
}
|
2286 |
+
|
2287 |
+
/**
|
2288 |
+
* Move payment and form metadata to new table
|
2289 |
+
*
|
2290 |
+
* @since 2.0.1
|
2291 |
+
* @return void
|
2292 |
+
*/
|
2293 |
+
function give_v201_move_metadata_into_new_table_callback() {
|
2294 |
+
global $wpdb;
|
2295 |
+
$give_updates = Give_Updates::get_instance();
|
2296 |
+
|
2297 |
+
// form query
|
2298 |
+
$payments = new WP_Query( array(
|
2299 |
+
'paged' => $give_updates->step,
|
2300 |
+
'status' => 'any',
|
2301 |
+
'order' => 'ASC',
|
2302 |
+
'post_type' => array( 'give_forms', 'give_payment' ),
|
2303 |
+
'posts_per_page' => 100,
|
2304 |
+
)
|
2305 |
+
);
|
2306 |
+
|
2307 |
+
if ( $payments->have_posts() ) {
|
2308 |
+
$give_updates->set_percentage( $payments->found_posts, $give_updates->step * 100 );
|
2309 |
+
|
2310 |
+
while ( $payments->have_posts() ) {
|
2311 |
+
$payments->the_post();
|
2312 |
+
global $post;
|
2313 |
+
|
2314 |
+
$meta_data = $wpdb->get_results(
|
2315 |
+
$wpdb->prepare(
|
2316 |
+
"SELECT * FROM $wpdb->postmeta where post_id=%d",
|
2317 |
+
get_the_ID()
|
2318 |
+
),
|
2319 |
+
ARRAY_A
|
2320 |
+
);
|
2321 |
+
|
2322 |
+
if ( ! empty( $meta_data ) ) {
|
2323 |
+
foreach ( $meta_data as $index => $data ) {
|
2324 |
+
// Check for duplicate meta values.
|
2325 |
+
if( $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . ( 'give_forms' === $post->post_type ? $wpdb->formmeta : $wpdb->paymentmeta ) . " WHERE meta_id=%d", $data['meta_id'] ), ARRAY_A ) ) {
|
2326 |
+
continue;
|
2327 |
+
}
|
2328 |
+
|
2329 |
+
switch ( $post->post_type ) {
|
2330 |
+
case 'give_forms':
|
2331 |
+
$data['form_id'] = $data['post_id'];
|
2332 |
+
unset( $data['post_id'] );
|
2333 |
+
|
2334 |
+
Give()->form_meta->insert( $data );
|
2335 |
+
// @todo: delete form meta from post meta table after releases 2.0.
|
2336 |
+
/*delete_post_meta( get_the_ID(), $data['meta_key'] );*/
|
2337 |
+
|
2338 |
+
break;
|
2339 |
+
|
2340 |
+
case 'give_payment':
|
2341 |
+
$data['payment_id'] = $data['post_id'];
|
2342 |
+
unset( $data['post_id'] );
|
2343 |
+
|
2344 |
+
Give()->payment_meta->insert( $data );
|
2345 |
+
|
2346 |
+
// @todo: delete donation meta from post meta table after releases 2.0.
|
2347 |
+
/*delete_post_meta( get_the_ID(), $data['meta_key'] );*/
|
2348 |
+
|
2349 |
+
break;
|
2350 |
+
}
|
2351 |
+
}
|
2352 |
+
}
|
2353 |
+
|
2354 |
+
}// End while().
|
2355 |
+
|
2356 |
+
wp_reset_postdata();
|
2357 |
+
} else {
|
2358 |
+
// No more forms found, finish up.
|
2359 |
+
give_set_upgrade_complete( 'v201_move_metadata_into_new_table' );
|
2360 |
+
}
|
2361 |
+
|
2362 |
+
}
|
2363 |
+
|
2364 |
+
/**
|
2365 |
+
* Move data to new log table.
|
2366 |
+
*
|
2367 |
+
* @since 2.0.1
|
2368 |
+
* @return void
|
2369 |
+
*/
|
2370 |
+
function give_v201_logs_upgrades_callback() {
|
2371 |
+
global $wpdb;
|
2372 |
+
$give_updates = Give_Updates::get_instance();
|
2373 |
+
|
2374 |
+
// form query
|
2375 |
+
$forms = new WP_Query( array(
|
2376 |
+
'paged' => $give_updates->step,
|
2377 |
+
'order' => 'DESC',
|
2378 |
+
'post_type' => 'give_log',
|
2379 |
+
'post_status' => 'any',
|
2380 |
+
'posts_per_page' => 100,
|
2381 |
+
)
|
2382 |
+
);
|
2383 |
+
|
2384 |
+
if ( $forms->have_posts() ) {
|
2385 |
+
$give_updates->set_percentage( $forms->found_posts, $give_updates->step * 100 );
|
2386 |
+
|
2387 |
+
while ( $forms->have_posts() ) {
|
2388 |
+
$forms->the_post();
|
2389 |
+
global $post;
|
2390 |
+
|
2391 |
+
if( $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}give_logs WHERE ID=%d", $post->ID ) ) ) {
|
2392 |
+
continue;
|
2393 |
+
}
|
2394 |
+
|
2395 |
+
$term = get_the_terms( $post->ID, 'give_log_type' );
|
2396 |
+
$term = ! is_wp_error( $term ) && ! empty( $term ) ? $term[0] : array();
|
2397 |
+
$term_name = ! empty( $term ) ? $term->slug : '';
|
2398 |
+
|
2399 |
+
$log_data = array(
|
2400 |
+
'ID' => $post->ID,
|
2401 |
+
'log_title' => $post->post_title,
|
2402 |
+
'log_content' => $post->post_content,
|
2403 |
+
'log_parent' => 0,
|
2404 |
+
'log_type' => $term_name,
|
2405 |
+
'log_date' => $post->post_date,
|
2406 |
+
'log_date_gmt' => $post->post_date_gmt,
|
2407 |
+
);
|
2408 |
+
$log_meta = array();
|
2409 |
+
|
2410 |
+
if ( $old_log_meta = get_post_meta( $post->ID ) ) {
|
2411 |
+
foreach ( $old_log_meta as $meta_key => $meta_value ) {
|
2412 |
+
switch ( $meta_key ) {
|
2413 |
+
case '_give_log_payment_id':
|
2414 |
+
$log_data['log_parent'] = current( $meta_value );
|
2415 |
+
$log_meta['_give_log_form_id'] = $post->post_parent;
|
2416 |
+
break;
|
2417 |
+
|
2418 |
+
default:
|
2419 |
+
$log_meta[ $meta_key ] = current( $meta_value );
|
2420 |
+
}
|
2421 |
+
}
|
2422 |
+
}
|
2423 |
+
|
2424 |
+
if ( 'api_request' === $term_name ) {
|
2425 |
+
$log_meta['_give_log_api_query'] = $post->post_excerpt;
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
$wpdb->insert( "{$wpdb->prefix}give_logs", $log_data );
|
2429 |
+
|
2430 |
+
if ( ! empty( $log_meta ) ) {
|
2431 |
+
foreach ( $log_meta as $meta_key => $meta_value ) {
|
2432 |
+
Give()->logs->logmeta_db->update_meta( $post->ID, $meta_key, $meta_value );
|
2433 |
+
}
|
2434 |
+
}
|
2435 |
+
|
2436 |
+
$logIDs[] = $post->ID;
|
2437 |
+
}// End while().
|
2438 |
+
|
2439 |
+
wp_reset_postdata();
|
2440 |
+
} else {
|
2441 |
+
// Delete log cache.
|
2442 |
+
Give()->logs->delete_cache();
|
2443 |
+
|
2444 |
+
// No more forms found, finish up.
|
2445 |
+
give_set_upgrade_complete( 'v201_logs_upgrades' );
|
2446 |
+
}
|
2447 |
+
}
|
2448 |
+
|
2449 |
+
|
2450 |
+
/**
|
2451 |
+
* Add missing donor.
|
2452 |
+
*
|
2453 |
+
* @since 2.0.1
|
2454 |
+
* @return void
|
2455 |
+
*/
|
2456 |
+
function give_v201_add_missing_donors_callback(){
|
2457 |
+
global $wpdb;
|
2458 |
+
|
2459 |
+
if ( $wpdb->query( $wpdb->prepare( "SHOW TABLES LIKE %s", "{$wpdb->prefix}give_customers" ) ) ) {
|
2460 |
+
$customers = wp_list_pluck( $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}give_customers" ), 'id' );
|
2461 |
+
$donors = wp_list_pluck( $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}give_donors" ), 'id' );
|
2462 |
+
$donor_data = array();
|
2463 |
+
|
2464 |
+
if ( $missing_donors = array_diff( $customers, $donors ) ) {
|
2465 |
+
foreach ( $missing_donors as $donor_id ) {
|
2466 |
+
$donor_data[] = array(
|
2467 |
+
'info' => $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}give_customers WHERE id=%d", $donor_id ) ),
|
2468 |
+
'meta' => $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}give_customermeta WHERE customer_id=%d", $donor_id ) ),
|
2469 |
+
|
2470 |
+
);
|
2471 |
+
}
|
2472 |
+
}
|
2473 |
+
|
2474 |
+
if( ! empty( $donor_data ) ) {
|
2475 |
+
$donor_table_name = Give()->donors->table_name;
|
2476 |
+
$donor_meta_table_name = Give()->donor_meta->table_name;
|
2477 |
+
|
2478 |
+
Give()->donors->table_name = "{$wpdb->prefix}give_donors";
|
2479 |
+
Give()->donor_meta->table_name = "{$wpdb->prefix}give_donormeta";
|
2480 |
+
|
2481 |
+
foreach ( $donor_data as $donor ) {
|
2482 |
+
$donor['info'][0] = (array) $donor['info'][0];
|
2483 |
+
|
2484 |
+
// Prevent duplicate meta id issue.
|
2485 |
+
if( $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}give_donors WHERE id=%d", $donor['info'][0]['id'] ) ) ){
|
2486 |
+
continue;
|
2487 |
+
}
|
2488 |
+
|
2489 |
+
$donor_id = Give()->donors->add( $donor['info'][0] );
|
2490 |
+
|
2491 |
+
if( ! empty( $donor['meta'] ) ) {
|
2492 |
+
foreach ( $donor['meta'] as $donor_meta ) {
|
2493 |
+
$donor_meta = (array) $donor_meta;
|
2494 |
+
|
2495 |
+
// Prevent duplicate meta id issue.
|
2496 |
+
if( $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}give_donormeta WHERE meta_id=%d", $donor_meta['meta_id'] ) ) ){
|
2497 |
+
unset( $donor_meta['meta_id'] );
|
2498 |
+
}
|
2499 |
+
|
2500 |
+
$donor_meta['donor_id'] = $donor_meta['customer_id'];
|
2501 |
+
unset( $donor_meta['customer_id'] );
|
2502 |
+
|
2503 |
+
Give()->donor_meta->insert( $donor_meta );
|
2504 |
+
}
|
2505 |
+
}
|
2506 |
+
|
2507 |
+
/**
|
2508 |
+
* Fix donor name and address
|
2509 |
+
*/
|
2510 |
+
$address = $wpdb->get_var(
|
2511 |
+
$wpdb->prepare(
|
2512 |
+
"
|
2513 |
+
SELECT meta_value FROM {$wpdb->usermeta}
|
2514 |
+
WHERE user_id=%s
|
2515 |
+
AND meta_key=%s
|
2516 |
+
",
|
2517 |
+
$donor['info'][0]['user_id'],
|
2518 |
+
'_give_user_address'
|
2519 |
+
)
|
2520 |
+
);
|
2521 |
+
|
2522 |
+
$donor = new Give_Donor( $donor_id );
|
2523 |
+
|
2524 |
+
if ( ! empty( $address ) ) {
|
2525 |
+
$address = maybe_unserialize( $address );
|
2526 |
+
$donor->add_address( 'personal', $address );
|
2527 |
+
$donor->add_address( 'billing[]', $address );
|
2528 |
+
}
|
2529 |
+
|
2530 |
+
$donor_name = explode( ' ', $donor->name, 2 );
|
2531 |
+
$donor_first_name = Give()->donor_meta->get_meta( $donor->id, '_give_donor_first_name' );
|
2532 |
+
$donor_last_name = Give()->donor_meta->get_meta( $donor->id, '_give_donor_last_name' );
|
2533 |
+
|
2534 |
+
// If first name meta of donor is not created, then create it.
|
2535 |
+
if ( ! $donor_first_name && isset( $donor_name[0] ) ) {
|
2536 |
+
Give()->donor_meta->add_meta( $donor->id, '_give_donor_first_name', $donor_name[0] );
|
2537 |
+
}
|
2538 |
+
|
2539 |
+
// If last name meta of donor is not created, then create it.
|
2540 |
+
if ( ! $donor_last_name && isset( $donor_name[1] ) ) {
|
2541 |
+
Give()->donor_meta->add_meta( $donor->id, '_give_donor_last_name', $donor_name[1] );
|
2542 |
+
}
|
2543 |
+
|
2544 |
+
// If Donor is connected with WP User then update user meta.
|
2545 |
+
if ( $donor->user_id ) {
|
2546 |
+
if ( isset( $donor_name[0] ) ) {
|
2547 |
+
update_user_meta( $donor->user_id, 'first_name', $donor_name[0] );
|
2548 |
+
}
|
2549 |
+
if ( isset( $donor_name[1] ) ) {
|
2550 |
+
update_user_meta( $donor->user_id, 'last_name', $donor_name[1] );
|
2551 |
+
}
|
2552 |
+
}
|
2553 |
+
}
|
2554 |
+
|
2555 |
+
Give()->donors->table_name = $donor_table_name;
|
2556 |
+
Give()->donor_meta->table_name = $donor_meta_table_name;
|
2557 |
+
}
|
2558 |
+
}
|
2559 |
+
|
2560 |
+
Give_Updates::get_instance()->percentage = 100;
|
2561 |
+
give_set_upgrade_complete('v201_add_missing_donors' );
|
2562 |
}
|
includes/admin/upgrades/views/upgrades.php
CHANGED
@@ -40,7 +40,8 @@ $give_updates = Give_Updates::get_instance();
|
|
40 |
<div class="inside">
|
41 |
<div class="panel-content">
|
42 |
<p class="give-update-button">
|
43 |
-
<?php echo
|
|
|
44 |
__( '%1$s <a href="%2$s" class="%3$s">%4$s</a>', 'give' ),
|
45 |
$is_doing_updates ?
|
46 |
__( 'Give is currently updating the database in the background.', 'give' ) :
|
@@ -50,6 +51,35 @@ $give_updates = Give_Updates::get_instance();
|
|
50 |
__( 'Update now', 'give' )
|
51 |
);
|
52 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</p>
|
54 |
</div>
|
55 |
<div class="progress-container<?php echo $is_doing_updates ? '' : ' give-hidden'; ?>">
|
@@ -65,9 +95,13 @@ $give_updates = Give_Updates::get_instance();
|
|
65 |
</strong>
|
66 |
</p>
|
67 |
<div class="progress-content">
|
68 |
-
<?php if ( $is_doing_updates
|
69 |
<div class="notice-wrap give-clearfix">
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
<div class="give-progress">
|
72 |
<div style="width: <?php echo $width ?>%;"></div>
|
73 |
</div>
|
@@ -76,7 +110,7 @@ $give_updates = Give_Updates::get_instance();
|
|
76 |
</div>
|
77 |
</div>
|
78 |
|
79 |
-
<?php if( ! $is_doing_updates ) : ?>
|
80 |
<div class="give-run-database-update"></div>
|
81 |
<?php endif; ?>
|
82 |
</div>
|
40 |
<div class="inside">
|
41 |
<div class="panel-content">
|
42 |
<p class="give-update-button">
|
43 |
+
<span class="give-doing-update-text-p" <?php echo Give_Updates::$background_updater->is_paused_process() ? 'style="display:none;"' : ''; ?>>
|
44 |
+
<?php echo sprintf(
|
45 |
__( '%1$s <a href="%2$s" class="%3$s">%4$s</a>', 'give' ),
|
46 |
$is_doing_updates ?
|
47 |
__( 'Give is currently updating the database in the background.', 'give' ) :
|
51 |
__( 'Update now', 'give' )
|
52 |
);
|
53 |
?>
|
54 |
+
</span>
|
55 |
+
<span class="give-update-paused-text-p" <?php echo ! Give_Updates::$background_updater->is_paused_process() ? 'style="display:none;"' : ''; ?>>
|
56 |
+
<?php _e('The updates have been paused.', 'give'); ?>
|
57 |
+
</span>
|
58 |
+
|
59 |
+
<?php if ( Give_Updates::$background_updater->is_paused_process() ) : ?>
|
60 |
+
<button id="give-restart-upgrades" class="button button-primary alignright" data-redirect-url="<?php echo esc_url( admin_url( '/edit.php?post_type=give_forms&page=give-updates&give-restart-db-upgrades=1' ) ); ?>"><?php _e( 'Restart Upgrades', 'give' ); ?></button>
|
61 |
+
<?php elseif( $give_updates->is_doing_updates() ): ?>
|
62 |
+
<button id="give-pause-upgrades" class="button button-primary alignright" data-redirect-url="<?php echo esc_url( admin_url( '/edit.php?post_type=give_forms&page=give-updates&give-pause-db-upgrades=1' ) ); ?>"><?php _e( 'Pause Upgrades', 'give' ); ?></button>
|
63 |
+
<?php endif; ?>
|
64 |
+
|
65 |
+
<script type="text/javascript">
|
66 |
+
jQuery('#give-pause-upgrades').click('click', function (e) {
|
67 |
+
e.preventDefault();
|
68 |
+
jQuery('.give-doing-update-text-p').hide();
|
69 |
+
jQuery('.give-update-paused-text-p').show();
|
70 |
+
if (window.confirm('<?php echo esc_js( __( 'Do you want to stop the update process now?', 'give' ) ); ?>')) {
|
71 |
+
window.location.assign(jQuery(this).data('redirect-url'));
|
72 |
+
}
|
73 |
+
});
|
74 |
+
jQuery('#give-restart-upgrades').click('click', function (e) {
|
75 |
+
e.preventDefault();
|
76 |
+
jQuery('.give-doing-update-text-p').show();
|
77 |
+
jQuery('.give-update-paused-text-p').hide();
|
78 |
+
if (window.confirm('<?php echo esc_js( __( 'Do you want to restart the update process?', 'give' ) ); ?>')) {
|
79 |
+
window.location.assign(jQuery(this).data('redirect-url'));
|
80 |
+
}
|
81 |
+
});
|
82 |
+
</script>
|
83 |
</p>
|
84 |
</div>
|
85 |
<div class="progress-container<?php echo $is_doing_updates ? '' : ' give-hidden'; ?>">
|
95 |
</strong>
|
96 |
</p>
|
97 |
<div class="progress-content">
|
98 |
+
<?php if ( $is_doing_updates ) : ?>
|
99 |
<div class="notice-wrap give-clearfix">
|
100 |
+
|
101 |
+
<?php if ( ! Give_Updates::$background_updater->is_paused_process() ) : ?>
|
102 |
+
<span class="spinner is-active"></span>
|
103 |
+
<?php endif; ?>
|
104 |
+
|
105 |
<div class="give-progress">
|
106 |
<div style="width: <?php echo $width ?>%;"></div>
|
107 |
</div>
|
110 |
</div>
|
111 |
</div>
|
112 |
|
113 |
+
<?php if ( ! $is_doing_updates ) : ?>
|
114 |
<div class="give-run-database-update"></div>
|
115 |
<?php endif; ?>
|
116 |
</div>
|
includes/ajax-functions.php
CHANGED
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
26 |
*/
|
27 |
function give_test_ajax_works() {
|
28 |
// Handle ajax.
|
29 |
-
if( doing_action( 'wp_ajax_nopriv_give_test_ajax' ) ) {
|
30 |
wp_die( 0, 200 );
|
31 |
}
|
32 |
|
@@ -93,7 +93,7 @@ function give_test_ajax_works() {
|
|
93 |
Give_Cache::set( '_give_ajax_works', '1', DAY_IN_SECONDS, true );
|
94 |
}
|
95 |
|
96 |
-
return $works;
|
97 |
}
|
98 |
|
99 |
add_action( 'wp_ajax_nopriv_give_test_ajax', 'give_test_ajax_works' );
|
@@ -117,7 +117,7 @@ function give_get_ajax_url( $query = array() ) {
|
|
117 |
$ajax_url = preg_replace( '/^http/', 'https', $ajax_url );
|
118 |
}
|
119 |
|
120 |
-
if( ! empty( $query ) ) {
|
121 |
$ajax_url = add_query_arg( $query, $ajax_url );
|
122 |
}
|
123 |
|
26 |
*/
|
27 |
function give_test_ajax_works() {
|
28 |
// Handle ajax.
|
29 |
+
if ( doing_action( 'wp_ajax_nopriv_give_test_ajax' ) ) {
|
30 |
wp_die( 0, 200 );
|
31 |
}
|
32 |
|
93 |
Give_Cache::set( '_give_ajax_works', '1', DAY_IN_SECONDS, true );
|
94 |
}
|
95 |
|
96 |
+
return apply_filters( 'give_test_ajax_works', $works );
|
97 |
}
|
98 |
|
99 |
add_action( 'wp_ajax_nopriv_give_test_ajax', 'give_test_ajax_works' );
|
117 |
$ajax_url = preg_replace( '/^http/', 'https', $ajax_url );
|
118 |
}
|
119 |
|
120 |
+
if ( ! empty( $query ) ) {
|
121 |
$ajax_url = add_query_arg( $query, $ajax_url );
|
122 |
}
|
123 |
|
includes/api/class-give-api.php
CHANGED
@@ -105,7 +105,7 @@ class Give_API {
|
|
105 |
/**
|
106 |
* All versions of the API
|
107 |
*
|
108 |
-
* @var
|
109 |
* @access protected
|
110 |
* @since 1.1
|
111 |
*/
|
105 |
/**
|
106 |
* All versions of the API
|
107 |
*
|
108 |
+
* @var array
|
109 |
* @access protected
|
110 |
* @since 1.1
|
111 |
*/
|
includes/class-give-background-updater.php
CHANGED
@@ -35,6 +35,18 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
35 |
parent::dispatch();
|
36 |
}
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
/**
|
39 |
* Handle cron healthcheck
|
40 |
*
|
@@ -42,7 +54,7 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
42 |
* and data exists in the queue.
|
43 |
*/
|
44 |
public function handle_cron_healthcheck() {
|
45 |
-
if ( $this->is_process_running() ) {
|
46 |
// Background process already running.
|
47 |
return;
|
48 |
}
|
@@ -61,7 +73,7 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
61 |
* Schedule fallback event.
|
62 |
*/
|
63 |
protected function schedule_event() {
|
64 |
-
if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) {
|
65 |
wp_schedule_event( time() + 10, $this->cron_interval_identifier, $this->cron_hook_identifier );
|
66 |
}
|
67 |
}
|
@@ -79,6 +91,11 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
79 |
* @return mixed
|
80 |
*/
|
81 |
protected function task( $update ) {
|
|
|
|
|
|
|
|
|
|
|
82 |
if ( empty( $update ) ) {
|
83 |
return false;
|
84 |
}
|
@@ -99,7 +116,7 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
99 |
);
|
100 |
|
101 |
// Continuously skip update if previous update does not complete yet.
|
102 |
-
if(
|
103 |
$resume_update['update_info']['id'] !== $update['id'] &&
|
104 |
! give_has_upgrade_completed( $resume_update['update_info']['id'] )
|
105 |
) {
|
@@ -112,6 +129,7 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
112 |
$give_updates->update = absint( $resume_update['update'] );
|
113 |
$is_parent_update_completed = $give_updates->is_parent_updates_completed( $update );
|
114 |
|
|
|
115 |
// Skip update if dependency update does not complete yet.
|
116 |
if ( empty( $is_parent_update_completed ) ) {
|
117 |
// @todo: set error when you have only one update with invalid dependency
|
@@ -163,11 +181,22 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
163 |
* performed, or, call parent::complete().
|
164 |
*/
|
165 |
protected function complete() {
|
|
|
|
|
|
|
|
|
166 |
parent::complete();
|
167 |
|
168 |
delete_option( 'give_db_update_count' );
|
169 |
delete_option( 'give_doing_upgrade' );
|
170 |
add_option( 'give_show_db_upgrade_complete_notice', 1, '', 'no' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
/**
|
@@ -190,4 +219,71 @@ class Give_Background_Updater extends WP_Background_Process {
|
|
190 |
|
191 |
return intval( $memory_limit ) * 1024 * 1024;
|
192 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
35 |
parent::dispatch();
|
36 |
}
|
37 |
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get all batches.
|
41 |
+
*
|
42 |
+
* @since 2.0
|
43 |
+
* @access public
|
44 |
+
* @return stdClass
|
45 |
+
*/
|
46 |
+
public function get_all_batch() {
|
47 |
+
return parent::get_batch();
|
48 |
+
}
|
49 |
+
|
50 |
/**
|
51 |
* Handle cron healthcheck
|
52 |
*
|
54 |
* and data exists in the queue.
|
55 |
*/
|
56 |
public function handle_cron_healthcheck() {
|
57 |
+
if ( $this->is_process_running() || $this->is_paused_process() ) {
|
58 |
// Background process already running.
|
59 |
return;
|
60 |
}
|
73 |
* Schedule fallback event.
|
74 |
*/
|
75 |
protected function schedule_event() {
|
76 |
+
if ( ! wp_next_scheduled( $this->cron_hook_identifier ) && ! $this->is_paused_process() ) {
|
77 |
wp_schedule_event( time() + 10, $this->cron_interval_identifier, $this->cron_hook_identifier );
|
78 |
}
|
79 |
}
|
91 |
* @return mixed
|
92 |
*/
|
93 |
protected function task( $update ) {
|
94 |
+
// Pause upgrade immediately if admin pausing upgrades.
|
95 |
+
if( $this->is_paused_process() ) {
|
96 |
+
wp_die();
|
97 |
+
}
|
98 |
+
|
99 |
if ( empty( $update ) ) {
|
100 |
return false;
|
101 |
}
|
116 |
);
|
117 |
|
118 |
// Continuously skip update if previous update does not complete yet.
|
119 |
+
if (
|
120 |
$resume_update['update_info']['id'] !== $update['id'] &&
|
121 |
! give_has_upgrade_completed( $resume_update['update_info']['id'] )
|
122 |
) {
|
129 |
$give_updates->update = absint( $resume_update['update'] );
|
130 |
$is_parent_update_completed = $give_updates->is_parent_updates_completed( $update );
|
131 |
|
132 |
+
|
133 |
// Skip update if dependency update does not complete yet.
|
134 |
if ( empty( $is_parent_update_completed ) ) {
|
135 |
// @todo: set error when you have only one update with invalid dependency
|
181 |
* performed, or, call parent::complete().
|
182 |
*/
|
183 |
protected function complete() {
|
184 |
+
if( $this->is_paused_process() ) {
|
185 |
+
return false;
|
186 |
+
}
|
187 |
+
|
188 |
parent::complete();
|
189 |
|
190 |
delete_option( 'give_db_update_count' );
|
191 |
delete_option( 'give_doing_upgrade' );
|
192 |
add_option( 'give_show_db_upgrade_complete_notice', 1, '', 'no' );
|
193 |
+
|
194 |
+
// Flush cache.
|
195 |
+
Give_Cache::get_instance()->flush_cache();
|
196 |
+
|
197 |
+
if( $cache_keys = Give_Cache::get_options_like('') ) {
|
198 |
+
Give_Cache::delete( $cache_keys );
|
199 |
+
}
|
200 |
}
|
201 |
|
202 |
/**
|
219 |
|
220 |
return intval( $memory_limit ) * 1024 * 1024;
|
221 |
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Maybe process queue
|
225 |
+
*
|
226 |
+
* Checks whether data exists within the queue and that
|
227 |
+
* the process is not already running.
|
228 |
+
*/
|
229 |
+
public function maybe_handle() {
|
230 |
+
// Don't lock up other requests while processing
|
231 |
+
session_write_close();
|
232 |
+
|
233 |
+
if ( $this->is_process_running() || $this->is_paused_process() ) {
|
234 |
+
// Background process already running.
|
235 |
+
wp_die();
|
236 |
+
}
|
237 |
+
|
238 |
+
if ( $this->is_queue_empty() ) {
|
239 |
+
// No data to process.
|
240 |
+
wp_die();
|
241 |
+
}
|
242 |
+
|
243 |
+
check_ajax_referer( $this->identifier, 'nonce' );
|
244 |
+
|
245 |
+
$this->handle();
|
246 |
+
|
247 |
+
wp_die();
|
248 |
+
}
|
249 |
+
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Check if backgound upgrade paused or not.
|
253 |
+
*
|
254 |
+
* @since 2.0
|
255 |
+
* @access public
|
256 |
+
* @return bool
|
257 |
+
*/
|
258 |
+
public function is_paused_process(){
|
259 |
+
// Not using get_option because i am facing some caching releated issue.
|
260 |
+
global $wpdb;
|
261 |
+
|
262 |
+
$options = $wpdb->get_results( "SELECT * FROM $wpdb->options WHERE option_name='give_paused_batches' LIMIT 1" );
|
263 |
+
|
264 |
+
return ! empty( $options );
|
265 |
+
}
|
266 |
+
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Get identifier
|
270 |
+
*
|
271 |
+
* @since 2.0
|
272 |
+
* @access public
|
273 |
+
* @return mixed|string
|
274 |
+
*/
|
275 |
+
public function get_identifier() {
|
276 |
+
return $this->identifier;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Get cron identifier
|
281 |
+
*
|
282 |
+
* @since 2.0
|
283 |
+
* @access public
|
284 |
+
* @return mixed|string
|
285 |
+
*/
|
286 |
+
public function get_cron_identifier() {
|
287 |
+
return $this->cron_hook_identifier;
|
288 |
+
}
|
289 |
}
|
includes/class-give-cache.php
CHANGED
@@ -297,10 +297,6 @@ class Give_Cache {
|
|
297 |
public static function get_options_like( $option_name, $fields = false ) {
|
298 |
global $wpdb;
|
299 |
|
300 |
-
if ( empty( $option_name ) ) {
|
301 |
-
return array();
|
302 |
-
}
|
303 |
-
|
304 |
$field_names = $fields ? 'option_name, option_value' : 'option_name';
|
305 |
|
306 |
if ( $fields ) {
|
@@ -632,7 +628,7 @@ class Give_Cache {
|
|
632 |
*
|
633 |
* @return string
|
634 |
*/
|
635 |
-
private function get_incrementer( $refresh = false, $incrementer_key = 'give-
|
636 |
$incrementer_value = wp_cache_get( $incrementer_key );
|
637 |
|
638 |
if ( false === $incrementer_value || true === $refresh ) {
|
@@ -658,7 +654,7 @@ class Give_Cache {
|
|
658 |
give_is_setting_enabled( give_clean( $_POST['cache'] ) )
|
659 |
) {
|
660 |
$this->get_incrementer( true );
|
661 |
-
$this->get_incrementer( true, 'give-
|
662 |
}
|
663 |
}
|
664 |
|
@@ -675,7 +671,7 @@ class Give_Cache {
|
|
675 |
*/
|
676 |
private function filter_group_name( $group ) {
|
677 |
if ( ! empty( $group ) ) {
|
678 |
-
$incrementer = self::$instance->get_incrementer( false, 'give-
|
679 |
|
680 |
if ( 'give-db-queries' === $group ) {
|
681 |
$incrementer = self::$instance->get_incrementer();
|
297 |
public static function get_options_like( $option_name, $fields = false ) {
|
298 |
global $wpdb;
|
299 |
|
|
|
|
|
|
|
|
|
300 |
$field_names = $fields ? 'option_name, option_value' : 'option_name';
|
301 |
|
302 |
if ( $fields ) {
|
628 |
*
|
629 |
* @return string
|
630 |
*/
|
631 |
+
private function get_incrementer( $refresh = false, $incrementer_key = 'give-cache-incrementer-db-queries' ) {
|
632 |
$incrementer_value = wp_cache_get( $incrementer_key );
|
633 |
|
634 |
if ( false === $incrementer_value || true === $refresh ) {
|
654 |
give_is_setting_enabled( give_clean( $_POST['cache'] ) )
|
655 |
) {
|
656 |
$this->get_incrementer( true );
|
657 |
+
$this->get_incrementer( true, 'give-cache-incrementer' );
|
658 |
}
|
659 |
}
|
660 |
|
671 |
*/
|
672 |
private function filter_group_name( $group ) {
|
673 |
if ( ! empty( $group ) ) {
|
674 |
+
$incrementer = self::$instance->get_incrementer( false, 'give-cache-incrementer' );
|
675 |
|
676 |
if ( 'give-db-queries' === $group ) {
|
677 |
$incrementer = self::$instance->get_incrementer();
|
includes/class-give-db-donor-meta.php
CHANGED
@@ -99,33 +99,6 @@ class Give_DB_Donor_Meta extends Give_DB_Meta {
|
|
99 |
}
|
100 |
}
|
101 |
|
102 |
-
/**
|
103 |
-
* Create the table
|
104 |
-
*
|
105 |
-
* @access public
|
106 |
-
* @since 1.6
|
107 |
-
*
|
108 |
-
* @return void
|
109 |
-
*/
|
110 |
-
public function create_table() {
|
111 |
-
|
112 |
-
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
113 |
-
|
114 |
-
$sql = "CREATE TABLE {$this->table_name} (
|
115 |
-
meta_id bigint(20) NOT NULL AUTO_INCREMENT,
|
116 |
-
donor_id bigint(20) NOT NULL,
|
117 |
-
meta_key varchar(255) DEFAULT NULL,
|
118 |
-
meta_value longtext,
|
119 |
-
PRIMARY KEY (meta_id),
|
120 |
-
KEY donor_id (donor_id),
|
121 |
-
KEY meta_key (meta_key)
|
122 |
-
) CHARACTER SET utf8 COLLATE utf8_general_ci;";
|
123 |
-
|
124 |
-
dbDelta( $sql );
|
125 |
-
|
126 |
-
update_option( $this->table_name . '_db_version', $this->version );
|
127 |
-
}
|
128 |
-
|
129 |
/**
|
130 |
* Add backward compatibility for old table name
|
131 |
*
|
99 |
}
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* Add backward compatibility for old table name
|
104 |
*
|
includes/class-give-db-form-meta.php
CHANGED
@@ -76,35 +76,6 @@ class Give_DB_Form_Meta extends Give_DB_Meta {
|
|
76 |
);
|
77 |
}
|
78 |
|
79 |
-
/**
|
80 |
-
* Create the table
|
81 |
-
*
|
82 |
-
* @access public
|
83 |
-
* @since 2.0
|
84 |
-
*
|
85 |
-
* @return void
|
86 |
-
*/
|
87 |
-
public function create_table() {
|
88 |
-
global $wpdb;
|
89 |
-
|
90 |
-
$charset_collate = $wpdb->get_charset_collate();
|
91 |
-
|
92 |
-
$sql = "CREATE TABLE {$this->table_name} (
|
93 |
-
meta_id bigint(20) NOT NULL AUTO_INCREMENT,
|
94 |
-
form_id bigint(20) NOT NULL,
|
95 |
-
meta_key varchar(255) DEFAULT NULL,
|
96 |
-
meta_value longtext,
|
97 |
-
PRIMARY KEY (meta_id),
|
98 |
-
KEY form_id (form_id),
|
99 |
-
KEY meta_key (meta_key)
|
100 |
-
) {$charset_collate};";
|
101 |
-
|
102 |
-
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
103 |
-
dbDelta( $sql );
|
104 |
-
|
105 |
-
update_option( $this->table_name . '_db_version', $this->version );
|
106 |
-
}
|
107 |
-
|
108 |
/**
|
109 |
* check if custom meta table enabled or not.
|
110 |
*
|
76 |
);
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* check if custom meta table enabled or not.
|
81 |
*
|
includes/class-give-db-logs-meta.php
CHANGED
@@ -104,34 +104,6 @@ class Give_DB_Log_Meta extends Give_DB_Meta {
|
|
104 |
return true;
|
105 |
}
|
106 |
|
107 |
-
/**
|
108 |
-
* Create the table
|
109 |
-
*
|
110 |
-
* @access public
|
111 |
-
* @since 2.0
|
112 |
-
*
|
113 |
-
* @return void
|
114 |
-
*/
|
115 |
-
public function create_table() {
|
116 |
-
global $wpdb;
|
117 |
-
$charset_collate = $wpdb->get_charset_collate();
|
118 |
-
|
119 |
-
$sql = "CREATE TABLE {$wpdb->logmeta} (
|
120 |
-
meta_id bigint(20) NOT NULL AUTO_INCREMENT,
|
121 |
-
log_id bigint(20) NOT NULL,
|
122 |
-
meta_key varchar(255) DEFAULT NULL,
|
123 |
-
meta_value longtext,
|
124 |
-
PRIMARY KEY (meta_id),
|
125 |
-
KEY log_id (log_id),
|
126 |
-
KEY meta_key (meta_key)
|
127 |
-
) {$charset_collate};";
|
128 |
-
|
129 |
-
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
130 |
-
dbDelta( $sql );
|
131 |
-
|
132 |
-
update_option( $this->table_name . '_db_version', $this->version );
|
133 |
-
}
|
134 |
-
|
135 |
/**
|
136 |
* Check if current id is valid
|
137 |
*
|
104 |
return true;
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/**
|
108 |
* Check if current id is valid
|
109 |
*
|
includes/class-give-db-logs.php
CHANGED
@@ -289,7 +289,7 @@ class Give_DB_Logs extends Give_DB {
|
|
289 |
$this->validate_params( $args );
|
290 |
|
291 |
if ( $args['number'] < 1 ) {
|
292 |
-
$args['number'] =
|
293 |
}
|
294 |
|
295 |
// Where clause for primary table.
|
289 |
$this->validate_params( $args );
|
290 |
|
291 |
if ( $args['number'] < 1 ) {
|
292 |
+
$args['number'] = 99999999999;
|
293 |
}
|
294 |
|
295 |
// Where clause for primary table.
|
includes/class-give-db-meta.php
CHANGED
@@ -265,42 +265,57 @@ class Give_DB_Meta extends Give_DB {
|
|
265 |
* @return string
|
266 |
*/
|
267 |
public function __rename_meta_table_name_in_query( $clause, $wp_query ) {
|
268 |
-
global $wpdb;
|
269 |
-
|
270 |
// Add new table to sql query.
|
271 |
if ( $this->is_post_type_query( $wp_query ) && ! empty( $wp_query->meta_query->queries ) ) {
|
272 |
-
$clause =
|
273 |
-
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
$joins = array( 'INNER JOIN', 'LEFT JOIN' );
|
278 |
|
279 |
-
foreach ( $joins as $join ) {
|
280 |
-
if( false !== strpos( $clause, $join ) ) {
|
281 |
-
$clause = explode( $join, $clause );
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
-
|
|
|
|
|
289 |
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
293 |
}
|
294 |
|
295 |
-
$
|
|
|
|
|
|
|
|
|
296 |
}
|
|
|
|
|
297 |
}
|
298 |
-
|
|
|
299 |
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
}
|
304 |
}
|
305 |
|
306 |
return $clause;
|
@@ -461,4 +476,31 @@ class Give_DB_Meta extends Give_DB {
|
|
461 |
return $this->delete_meta( $id, $meta_key, $meta_value, $delete_all );
|
462 |
}
|
463 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
}
|
265 |
* @return string
|
266 |
*/
|
267 |
public function __rename_meta_table_name_in_query( $clause, $wp_query ) {
|
|
|
|
|
268 |
// Add new table to sql query.
|
269 |
if ( $this->is_post_type_query( $wp_query ) && ! empty( $wp_query->meta_query->queries ) ) {
|
270 |
+
$clause = $this->__rename_meta_table_name( $clause, current_filter() );
|
271 |
+
}
|
272 |
|
273 |
+
return $clause;
|
274 |
+
}
|
|
|
275 |
|
|
|
|
|
|
|
276 |
|
277 |
+
/**
|
278 |
+
* Rename query clauses for new meta table
|
279 |
+
*
|
280 |
+
* @param $clause
|
281 |
+
* @param $filter
|
282 |
+
*
|
283 |
+
* @return mixed
|
284 |
+
*/
|
285 |
+
public function __rename_meta_table_name( $clause, $filter ){
|
286 |
+
global $wpdb;
|
287 |
+
|
288 |
+
$clause = str_replace( "{$wpdb->postmeta}.post_id", "{$this->table_name}.{$this->meta_type}_id", $clause );
|
289 |
+
$clause = str_replace( $wpdb->postmeta, $this->table_name, $clause );
|
290 |
|
291 |
+
switch( $filter ) {
|
292 |
+
case 'posts_join':
|
293 |
+
$joins = array( 'INNER JOIN', 'LEFT JOIN' );
|
294 |
|
295 |
+
foreach ( $joins as $join ) {
|
296 |
+
if( false !== strpos( $clause, $join ) ) {
|
297 |
+
$clause = explode( $join, $clause );
|
298 |
+
|
299 |
+
foreach ( $clause as $key => $clause_part ) {
|
300 |
+
if( empty( $clause_part ) ) {
|
301 |
+
continue;
|
302 |
}
|
303 |
|
304 |
+
preg_match( '/' . $wpdb->prefix . 'give_' . $this->meta_type . 'meta AS (.*) ON/', $clause_part, $alias_table_name );
|
305 |
+
|
306 |
+
if( isset( $alias_table_name[1] ) ) {
|
307 |
+
$clause[$key] = str_replace( "{$alias_table_name[1]}.post_id", "{$alias_table_name[1]}.{$this->meta_type}_id", $clause_part );
|
308 |
+
}
|
309 |
}
|
310 |
+
|
311 |
+
$clause = implode( "{$join} ", $clause );
|
312 |
}
|
313 |
+
}
|
314 |
+
break;
|
315 |
|
316 |
+
case 'posts_where':
|
317 |
+
$clause = str_replace( array( 'mt2.post_id', 'mt1.post_id' ), array( "mt2.{$this->meta_type}_id", "mt1.{$this->meta_type}_id" ), $clause );
|
318 |
+
break;
|
|
|
319 |
}
|
320 |
|
321 |
return $clause;
|
476 |
return $this->delete_meta( $id, $meta_key, $meta_value, $delete_all );
|
477 |
}
|
478 |
}
|
479 |
+
|
480 |
+
/**
|
481 |
+
* Create Meta Tables.
|
482 |
+
*
|
483 |
+
* @since 2.0.1
|
484 |
+
* @access public
|
485 |
+
*/
|
486 |
+
public function create_table() {
|
487 |
+
global $wpdb;
|
488 |
+
|
489 |
+
$charset_collate = $wpdb->get_charset_collate();
|
490 |
+
|
491 |
+
$sql = "CREATE TABLE {$this->table_name} (
|
492 |
+
meta_id bigint(20) NOT NULL AUTO_INCREMENT,
|
493 |
+
{$this->meta_type}_id bigint(20) NOT NULL,
|
494 |
+
meta_key varchar(255) DEFAULT NULL,
|
495 |
+
meta_value longtext,
|
496 |
+
PRIMARY KEY (meta_id),
|
497 |
+
KEY {$this->meta_type}_id ({$this->meta_type}_id),
|
498 |
+
KEY meta_key (meta_key({$this->min_index_length}))
|
499 |
+
) {$charset_collate};";
|
500 |
+
|
501 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
502 |
+
dbDelta( $sql );
|
503 |
+
|
504 |
+
update_option( $this->table_name . '_db_version', $this->version );
|
505 |
+
}
|
506 |
}
|
includes/class-give-db-payment-meta.php
CHANGED
@@ -76,35 +76,6 @@ class Give_DB_Payment_Meta extends Give_DB_Meta {
|
|
76 |
);
|
77 |
}
|
78 |
|
79 |
-
/**
|
80 |
-
* Create the table
|
81 |
-
*
|
82 |
-
* @access public
|
83 |
-
* @since 2.0
|
84 |
-
*
|
85 |
-
* @return void
|
86 |
-
*/
|
87 |
-
public function create_table() {
|
88 |
-
global $wpdb;
|
89 |
-
|
90 |
-
$charset_collate = $wpdb->get_charset_collate();
|
91 |
-
|
92 |
-
$sql = "CREATE TABLE {$this->table_name} (
|
93 |
-
meta_id bigint(20) NOT NULL AUTO_INCREMENT,
|
94 |
-
payment_id bigint(20) NOT NULL,
|
95 |
-
meta_key varchar(255) DEFAULT NULL,
|
96 |
-
meta_value longtext,
|
97 |
-
PRIMARY KEY (meta_id),
|
98 |
-
KEY payment_id (payment_id),
|
99 |
-
KEY meta_key (meta_key)
|
100 |
-
) {$charset_collate};";
|
101 |
-
|
102 |
-
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
103 |
-
dbDelta( $sql );
|
104 |
-
|
105 |
-
update_option( $this->table_name . '_db_version', $this->version );
|
106 |
-
}
|
107 |
-
|
108 |
/**
|
109 |
* check if custom meta table enabled or not.
|
110 |
*
|
76 |
);
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* check if custom meta table enabled or not.
|
81 |
*
|
includes/class-give-db.php
CHANGED
@@ -33,6 +33,16 @@ abstract class Give_DB {
|
|
33 |
*/
|
34 |
public $table_name;
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/**
|
37 |
* The version of our database table
|
38 |
*
|
33 |
*/
|
34 |
public $table_name;
|
35 |
|
36 |
+
/**
|
37 |
+
* Set Minimum Index Length
|
38 |
+
*
|
39 |
+
* @since 2.0.1
|
40 |
+
* @access public
|
41 |
+
*
|
42 |
+
* @var int
|
43 |
+
*/
|
44 |
+
public $min_index_length = 191;
|
45 |
+
|
46 |
/**
|
47 |
* The version of our database table
|
48 |
*
|
includes/class-give-donate-form.php
CHANGED
@@ -334,8 +334,8 @@ class Give_Donate_Form {
|
|
334 |
* @since 1.0
|
335 |
* @access public
|
336 |
*
|
337 |
-
* @param bool
|
338 |
-
* @param array
|
339 |
*/
|
340 |
public function __construct( $_id = false, $_args = array() ) {
|
341 |
|
334 |
* @since 1.0
|
335 |
* @access public
|
336 |
*
|
337 |
+
* @param int|bool $_id Post id. Default is false.
|
338 |
+
* @param array $_args Arguments passed.
|
339 |
*/
|
340 |
public function __construct( $_id = false, $_args = array() ) {
|
341 |
|
includes/class-give-donor.php
CHANGED
@@ -146,8 +146,8 @@ class Give_Donor {
|
|
146 |
/**
|
147 |
* Give_Donor constructor.
|
148 |
*
|
149 |
-
* @param bool $_id_or_email
|
150 |
-
* @param bool
|
151 |
*/
|
152 |
public function __construct( $_id_or_email = false, $by_user_id = false ) {
|
153 |
|
146 |
/**
|
147 |
* Give_Donor constructor.
|
148 |
*
|
149 |
+
* @param int|bool $_id_or_email
|
150 |
+
* @param bool $by_user_id
|
151 |
*/
|
152 |
public function __construct( $_id_or_email = false, $by_user_id = false ) {
|
153 |
|
includes/class-give-logging.php
CHANGED
@@ -142,6 +142,7 @@ class Give_Logging {
|
|
142 |
'sale',
|
143 |
'gateway_error',
|
144 |
'api_request',
|
|
|
145 |
);
|
146 |
|
147 |
return apply_filters( 'give_log_types', $terms );
|
142 |
'sale',
|
143 |
'gateway_error',
|
144 |
'api_request',
|
145 |
+
'update',
|
146 |
);
|
147 |
|
148 |
return apply_filters( 'give_log_types', $terms );
|
includes/donors/class-give-donors-query.php
CHANGED
@@ -189,7 +189,7 @@ class Give_Donors_Query {
|
|
189 |
global $wpdb;
|
190 |
|
191 |
if ( $this->args['number'] < 1 ) {
|
192 |
-
$this->args['number'] =
|
193 |
}
|
194 |
|
195 |
$where = $this->get_where_query();
|
189 |
global $wpdb;
|
190 |
|
191 |
if ( $this->args['number'] < 1 ) {
|
192 |
+
$this->args['number'] = 99999999999;
|
193 |
}
|
194 |
|
195 |
$where = $this->get_where_query();
|
includes/emails/class-give-email-tags.php
CHANGED
@@ -692,29 +692,15 @@ function give_email_tag_billing_address( $tag_args ) {
|
|
692 |
|
693 |
switch ( true ) {
|
694 |
case give_check_variable( $tag_args, 'isset', 0, 'payment_id' ):
|
695 |
-
$
|
696 |
-
$
|
697 |
-
$user_info,
|
698 |
-
'isset',
|
699 |
-
array(
|
700 |
-
'line1' => '',
|
701 |
-
'line2' => '',
|
702 |
-
'city' => '',
|
703 |
-
'country' => '',
|
704 |
-
'state' => '',
|
705 |
-
'zip' => '',
|
706 |
-
),
|
707 |
-
'address'
|
708 |
-
);
|
709 |
-
|
710 |
-
$address = $user_address['line1'] . "\n";
|
711 |
|
712 |
-
if ( ! empty( $
|
713 |
-
$address .= $
|
714 |
}
|
715 |
|
716 |
-
$address .= $
|
717 |
-
$address .= $
|
718 |
break;
|
719 |
}
|
720 |
|
692 |
|
693 |
switch ( true ) {
|
694 |
case give_check_variable( $tag_args, 'isset', 0, 'payment_id' ):
|
695 |
+
$donation = new Give_Payment( $tag_args['payment_id'] );
|
696 |
+
$address = $donation->address['line1'] . "\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
|
698 |
+
if ( ! empty( $donation->address['line2'] ) ) {
|
699 |
+
$address .= $donation->address['line2'] . "\n";
|
700 |
}
|
701 |
|
702 |
+
$address .= $donation->address['city'] . ' ' . $donation->address['zip'] . ' ' . $donation->address['state'] . "\n";
|
703 |
+
$address .= $donation->address['country'];
|
704 |
break;
|
705 |
}
|
706 |
|
includes/formatting.php
CHANGED
@@ -731,7 +731,7 @@ function give_verify_donation_form_nonce( $nonce = '' ) {
|
|
731 |
*
|
732 |
* @param $variable
|
733 |
* @param string (optional) $conditional default value: isset
|
734 |
-
* @param
|
735 |
* @param string (optional) $array_key_name default value: false
|
736 |
*
|
737 |
* @return mixed
|
731 |
*
|
732 |
* @param $variable
|
733 |
* @param string (optional) $conditional default value: isset
|
734 |
+
* @param mixed (optional) $default default value: false
|
735 |
* @param string (optional) $array_key_name default value: false
|
736 |
*
|
737 |
* @return mixed
|
includes/forms/functions.php
CHANGED
@@ -155,7 +155,7 @@ function give_send_to_success_page( $query_string = null ) {
|
|
155 |
*
|
156 |
* Used to redirect a user back to the donation form if there are errors present.
|
157 |
*
|
158 |
-
* @param array $args
|
159 |
*
|
160 |
* @access public
|
161 |
* @since 1.0
|
155 |
*
|
156 |
* Used to redirect a user back to the donation form if there are errors present.
|
157 |
*
|
158 |
+
* @param array|string $args
|
159 |
*
|
160 |
* @access public
|
161 |
* @since 1.0
|
includes/gateways/functions.php
CHANGED
@@ -285,7 +285,7 @@ function give_record_gateway_error( $title = '', $message = '', $parent = 0 ) {
|
|
285 |
* @since 1.0
|
286 |
*
|
287 |
* @param string $gateway_id
|
288 |
-
* @param string $status
|
289 |
*
|
290 |
* @return int
|
291 |
*/
|
285 |
* @since 1.0
|
286 |
*
|
287 |
* @param string $gateway_id
|
288 |
+
* @param array|string $status
|
289 |
*
|
290 |
* @return int
|
291 |
*/
|
includes/import-functions.php
CHANGED
@@ -207,9 +207,9 @@ function give_import_get_form_data_from_csv( $data, $import_setting = array() )
|
|
207 |
* @return bool|false|WP_User
|
208 |
*/
|
209 |
function give_import_get_user_from_csv( $data, $import_setting = array() ) {
|
210 |
-
$report
|
211 |
-
$donor_data
|
212 |
-
$
|
213 |
|
214 |
// check if donor id is not empty
|
215 |
if ( ! empty( $data['donor_id'] ) ) {
|
@@ -289,17 +289,17 @@ function give_import_get_user_from_csv( $data, $import_setting = array() ) {
|
|
289 |
|
290 |
// This action was added to remove the login when using the give register function.
|
291 |
add_filter( 'give_log_user_in_on_register', 'give_log_user_in_on_register_callback', 11 );
|
292 |
-
$
|
293 |
remove_filter( 'give_log_user_in_on_register', 'give_log_user_in_on_register_callback', 11 );
|
294 |
|
295 |
-
update_user_meta( $
|
296 |
-
$donor_data = new Give_Donor( $
|
297 |
} else {
|
298 |
-
$
|
299 |
}
|
300 |
|
301 |
-
if ( ! empty( $
|
302 |
-
$donor_data = new Give_Donor( $
|
303 |
|
304 |
if ( empty( $donor_data->id ) ) {
|
305 |
|
@@ -313,8 +313,8 @@ function give_import_get_user_from_csv( $data, $import_setting = array() ) {
|
|
313 |
'email' => $data['email'],
|
314 |
);
|
315 |
|
316 |
-
if ( ! empty( $
|
317 |
-
$donor_args['user_id'] = $
|
318 |
}
|
319 |
|
320 |
$donor_data->create( $donor_args );
|
@@ -544,7 +544,7 @@ function give_log_user_in_on_register_callback( $value ) {
|
|
544 |
function give_save_import_donation_to_db( $raw_key, $row_data, $main_key = array(), $import_setting = array() ) {
|
545 |
$data = array_combine( $raw_key, $row_data );
|
546 |
$price_id = false;
|
547 |
-
$
|
548 |
$import_setting['create_user'] = ( isset( $import_setting['create_user'] ) ? $import_setting['create_user'] : 1 );
|
549 |
|
550 |
$data = (array) apply_filters( 'give_save_import_donation_to_db', $data );
|
@@ -555,9 +555,9 @@ function give_save_import_donation_to_db( $raw_key, $row_data, $main_key = array
|
|
555 |
$donor_data = give_import_get_user_from_csv( $data, $import_setting );
|
556 |
if ( ! empty( $donor_data->id ) ) {
|
557 |
if ( ! empty( $donor_data->user_id ) ) {
|
558 |
-
$
|
559 |
} elseif ( ! empty( $data['user_id'] ) ) {
|
560 |
-
$
|
561 |
}
|
562 |
} else {
|
563 |
return false;
|
@@ -588,10 +588,10 @@ function give_save_import_donation_to_db( $raw_key, $row_data, $main_key = array
|
|
588 |
'status' => ( ! empty( $data['post_status'] ) ? $data['post_status'] : 'publish' ),
|
589 |
'currency' => give_get_currency(),
|
590 |
'user_info' => array(
|
591 |
-
'id' => $
|
592 |
'email' => ( ! empty( $data['email'] ) ? $data['email'] : ( isset( $donor_data->email ) ? $donor_data->email : false ) ),
|
593 |
-
'first_name' => ( ! empty( $data['first_name'] ) ? $data['first_name'] : ( ! empty( $
|
594 |
-
'last_name' => ( ! empty( $data['last_name'] ) ? $data['last_name'] : ( ! empty( $
|
595 |
'address' => $address,
|
596 |
),
|
597 |
'gateway' => ( ! empty( $data['gateway'] ) && 'offline' != strtolower( $data['gateway'] ) ? strtolower( $data['gateway'] ) : 'manual' ),
|
207 |
* @return bool|false|WP_User
|
208 |
*/
|
209 |
function give_import_get_user_from_csv( $data, $import_setting = array() ) {
|
210 |
+
$report = give_import_donation_report();
|
211 |
+
$donor_data = false;
|
212 |
+
$donor_id = false;
|
213 |
|
214 |
// check if donor id is not empty
|
215 |
if ( ! empty( $data['donor_id'] ) ) {
|
289 |
|
290 |
// This action was added to remove the login when using the give register function.
|
291 |
add_filter( 'give_log_user_in_on_register', 'give_log_user_in_on_register_callback', 11 );
|
292 |
+
$donor_id = give_register_and_login_new_user( $donor_args );
|
293 |
remove_filter( 'give_log_user_in_on_register', 'give_log_user_in_on_register_callback', 11 );
|
294 |
|
295 |
+
update_user_meta( $donor_id, '_give_payment_import', true );
|
296 |
+
$donor_data = new Give_Donor( $donor_id, true );
|
297 |
} else {
|
298 |
+
$donor_id = ( ! empty( $donor_data->ID ) ? $donor_data->ID : false );
|
299 |
}
|
300 |
|
301 |
+
if ( ! empty( $donor_id ) || ( isset( $import_setting['create_user'] ) && 0 === absint( $import_setting['create_user'] ) ) ) {
|
302 |
+
$donor_data = new Give_Donor( $donor_id, true );
|
303 |
|
304 |
if ( empty( $donor_data->id ) ) {
|
305 |
|
313 |
'email' => $data['email'],
|
314 |
);
|
315 |
|
316 |
+
if ( ! empty( $donor_id ) ) {
|
317 |
+
$donor_args['user_id'] = $donor_id;
|
318 |
}
|
319 |
|
320 |
$donor_data->create( $donor_args );
|
544 |
function give_save_import_donation_to_db( $raw_key, $row_data, $main_key = array(), $import_setting = array() ) {
|
545 |
$data = array_combine( $raw_key, $row_data );
|
546 |
$price_id = false;
|
547 |
+
$donor_id = 0;
|
548 |
$import_setting['create_user'] = ( isset( $import_setting['create_user'] ) ? $import_setting['create_user'] : 1 );
|
549 |
|
550 |
$data = (array) apply_filters( 'give_save_import_donation_to_db', $data );
|
555 |
$donor_data = give_import_get_user_from_csv( $data, $import_setting );
|
556 |
if ( ! empty( $donor_data->id ) ) {
|
557 |
if ( ! empty( $donor_data->user_id ) ) {
|
558 |
+
$donor_id = $donor_data->user_id;
|
559 |
} elseif ( ! empty( $data['user_id'] ) ) {
|
560 |
+
$donor_id = $data['user_id'];
|
561 |
}
|
562 |
} else {
|
563 |
return false;
|
588 |
'status' => ( ! empty( $data['post_status'] ) ? $data['post_status'] : 'publish' ),
|
589 |
'currency' => give_get_currency(),
|
590 |
'user_info' => array(
|
591 |
+
'id' => $donor_id,
|
592 |
'email' => ( ! empty( $data['email'] ) ? $data['email'] : ( isset( $donor_data->email ) ? $donor_data->email : false ) ),
|
593 |
+
'first_name' => ( ! empty( $data['first_name'] ) ? $data['first_name'] : ( ! empty( $donor_id ) && ( $first_name = get_user_meta( $donor_id, 'first_name', true ) ) ? $first_name : $donor_data->name ) ),
|
594 |
+
'last_name' => ( ! empty( $data['last_name'] ) ? $data['last_name'] : ( ! empty( $donor_id ) && ( $last_name = get_user_meta( $donor_id, 'last_name', true ) ) ? $last_name : $donor_data->name ) ),
|
595 |
'address' => $address,
|
596 |
),
|
597 |
'gateway' => ( ! empty( $data['gateway'] ) && 'offline' != strtolower( $data['gateway'] ) ? strtolower( $data['gateway'] ) : 'manual' ),
|
includes/install.php
CHANGED
@@ -141,7 +141,11 @@ function give_run_install() {
|
|
141 |
'v20_rename_donor_tables',
|
142 |
'v20_upgrades_donor_name',
|
143 |
'v20_upgrades_user_address',
|
144 |
-
'v20_upgrades_payment_metadata'
|
|
|
|
|
|
|
|
|
145 |
);
|
146 |
|
147 |
foreach ( $upgrade_routines as $upgrade ) {
|
141 |
'v20_rename_donor_tables',
|
142 |
'v20_upgrades_donor_name',
|
143 |
'v20_upgrades_user_address',
|
144 |
+
'v20_upgrades_payment_metadata',
|
145 |
+
'v201_upgrades_payment_metadata',
|
146 |
+
'v201_add_missing_donors',
|
147 |
+
'v201_move_metadata_into_new_table',
|
148 |
+
'v201_logs_upgrades'
|
149 |
);
|
150 |
|
151 |
foreach ( $upgrade_routines as $upgrade ) {
|
includes/libraries/wp-background-process.php
CHANGED
@@ -212,7 +212,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
|
|
212 |
* Check whether the current process is already running
|
213 |
* in a background process.
|
214 |
*/
|
215 |
-
|
216 |
if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
|
217 |
// Process already running.
|
218 |
return true;
|
212 |
* Check whether the current process is already running
|
213 |
* in a background process.
|
214 |
*/
|
215 |
+
public function is_process_running() {
|
216 |
if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
|
217 |
// Process already running.
|
218 |
return true;
|
includes/payments/actions.php
CHANGED
@@ -358,37 +358,37 @@ function give_bc_v20_get_payment_meta( $check, $object_id, $meta_key, $single )
|
|
358 |
$donor_data['address'] = false;
|
359 |
|
360 |
// Address1.
|
361 |
-
$address1 = ! empty( $payment_meta['
|
362 |
if ( $address1 ) {
|
363 |
$donor_data['address']['line1'] = $address1;
|
364 |
}
|
365 |
|
366 |
// Address2.
|
367 |
-
$address2 = ! empty( $payment_meta['
|
368 |
if ( $address2 ) {
|
369 |
$donor_data['address']['line2'] = $address2;
|
370 |
}
|
371 |
|
372 |
// City.
|
373 |
-
$city = ! empty( $payment_meta['
|
374 |
if ( $city ) {
|
375 |
$donor_data['address']['city'] = $city;
|
376 |
}
|
377 |
|
378 |
// Zip.
|
379 |
-
$zip = ! empty( $payment_meta['
|
380 |
if ( $zip ) {
|
381 |
$donor_data['address']['zip'] = $zip;
|
382 |
}
|
383 |
|
384 |
// State.
|
385 |
-
$state = ! empty( $payment_meta['
|
386 |
if ( $state ) {
|
387 |
$donor_data['address']['state'] = $state;
|
388 |
}
|
389 |
|
390 |
// Country.
|
391 |
-
$country = ! empty( $payment_meta['
|
392 |
if ( $country ) {
|
393 |
$donor_data['address']['country'] = $country;
|
394 |
}
|
358 |
$donor_data['address'] = false;
|
359 |
|
360 |
// Address1.
|
361 |
+
$address1 = ! empty( $payment_meta['_give_donor_billing_address1'] ) ? $payment_meta['_give_donor_billing_address1'] : '';
|
362 |
if ( $address1 ) {
|
363 |
$donor_data['address']['line1'] = $address1;
|
364 |
}
|
365 |
|
366 |
// Address2.
|
367 |
+
$address2 = ! empty( $payment_meta['_give_donor_billing_address2'] ) ? $payment_meta['_give_donor_billing_address2'] : '';
|
368 |
if ( $address2 ) {
|
369 |
$donor_data['address']['line2'] = $address2;
|
370 |
}
|
371 |
|
372 |
// City.
|
373 |
+
$city = ! empty( $payment_meta['_give_donor_billing_city'] ) ? $payment_meta['_give_donor_billing_city'] : '';
|
374 |
if ( $city ) {
|
375 |
$donor_data['address']['city'] = $city;
|
376 |
}
|
377 |
|
378 |
// Zip.
|
379 |
+
$zip = ! empty( $payment_meta['_give_donor_billing_zip'] ) ? $payment_meta['_give_donor_billing_zip'] : '';
|
380 |
if ( $zip ) {
|
381 |
$donor_data['address']['zip'] = $zip;
|
382 |
}
|
383 |
|
384 |
// State.
|
385 |
+
$state = ! empty( $payment_meta['_give_donor_billing_state'] ) ? $payment_meta['_give_donor_billing_state'] : '';
|
386 |
if ( $state ) {
|
387 |
$donor_data['address']['state'] = $state;
|
388 |
}
|
389 |
|
390 |
// Country.
|
391 |
+
$country = ! empty( $payment_meta['_give_donor_billing_country'] ) ? $payment_meta['_give_donor_billing_country'] : '';
|
392 |
if ( $country ) {
|
393 |
$donor_data['address']['country'] = $country;
|
394 |
}
|
includes/payments/class-give-payment.php
CHANGED
@@ -729,6 +729,22 @@ final class Give_Payment {
|
|
729 |
|
730 |
$this->payment_meta = apply_filters( 'give_payment_meta', $this->payment_meta, $payment_data );
|
731 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
$this->new = true;
|
733 |
}// End if().
|
734 |
|
729 |
|
730 |
$this->payment_meta = apply_filters( 'give_payment_meta', $this->payment_meta, $payment_data );
|
731 |
|
732 |
+
/*
|
733 |
+
* _give_payment_meta backward compatibility.
|
734 |
+
*
|
735 |
+
* @since 2.0.1
|
736 |
+
*/
|
737 |
+
$custom_payment_meta = array_diff(
|
738 |
+
array_map( 'maybe_serialize', $this->payment_meta ),
|
739 |
+
array_map( 'maybe_serialize', $payment_data )
|
740 |
+
);
|
741 |
+
|
742 |
+
if( ! empty( $custom_payment_meta ) ) {
|
743 |
+
give_doing_it_wrong( '_give_payment_meta', __( 'This custom meta key deprecated. We are not using this meta key for storing payment meta but your custom meta data will be store because we added backward compatibility. Please change your logic because in future we can remove it.', 'give' ), '2.0.0' );
|
744 |
+
|
745 |
+
$this->update_meta( '_give_payment_meta', array_map( 'maybe_unserialize', $custom_payment_meta ) );
|
746 |
+
}
|
747 |
+
|
748 |
$this->new = true;
|
749 |
}// End if().
|
750 |
|
includes/payments/class-payments-query.php
CHANGED
@@ -838,13 +838,14 @@ class Give_Payments_Query extends Give_Stats {
|
|
838 |
if ( ! empty( $this->args['meta_query'] ) ) {
|
839 |
$meta_query_obj = new WP_Meta_Query( $this->args['meta_query'] );
|
840 |
$where = implode( ' ', $meta_query_obj->get_sql( 'post', $wpdb->posts, 'ID' ) ) . " {$where}";
|
|
|
841 |
}
|
842 |
|
843 |
// Set sql query.
|
844 |
$sql = $wpdb->prepare(
|
845 |
"SELECT {$fields} FROM {$wpdb->posts} LIMIT %d,%d;",
|
846 |
absint( $this->args['offset'] ),
|
847 |
-
( empty( $this->args['nopaging'] ) ? absint( $this->args['posts_per_page'] ) :
|
848 |
);
|
849 |
|
850 |
// $where, $orderby and order already prepared query they can generate notice if you re prepare them in above.
|
838 |
if ( ! empty( $this->args['meta_query'] ) ) {
|
839 |
$meta_query_obj = new WP_Meta_Query( $this->args['meta_query'] );
|
840 |
$where = implode( ' ', $meta_query_obj->get_sql( 'post', $wpdb->posts, 'ID' ) ) . " {$where}";
|
841 |
+
$where = Give()->payment_meta->__rename_meta_table_name( $where, 'posts_where' );
|
842 |
}
|
843 |
|
844 |
// Set sql query.
|
845 |
$sql = $wpdb->prepare(
|
846 |
"SELECT {$fields} FROM {$wpdb->posts} LIMIT %d,%d;",
|
847 |
absint( $this->args['offset'] ),
|
848 |
+
( empty( $this->args['nopaging'] ) ? absint( $this->args['posts_per_page'] ) : 99999999999 )
|
849 |
);
|
850 |
|
851 |
// $where, $orderby and order already prepared query they can generate notice if you re prepare them in above.
|
includes/payments/functions.php
CHANGED
@@ -1786,7 +1786,7 @@ function give_get_donation_form_title( $donation, $args = array() ) {
|
|
1786 |
$custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true );
|
1787 |
$level_label = ! empty( $custom_amount_text ) ? $custom_amount_text : __( 'Custom Amount', 'give' );
|
1788 |
} elseif ( give_has_variable_prices( $form_id ) ) {
|
1789 |
-
$level_label = give_get_price_option_name( $form_id, $price_id );
|
1790 |
}
|
1791 |
|
1792 |
// Only add separator if there is a form title.
|
1786 |
$custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true );
|
1787 |
$level_label = ! empty( $custom_amount_text ) ? $custom_amount_text : __( 'Custom Amount', 'give' );
|
1788 |
} elseif ( give_has_variable_prices( $form_id ) ) {
|
1789 |
+
$level_label = give_get_price_option_name( $form_id, $price_id, $donation->ID, false );
|
1790 |
}
|
1791 |
|
1792 |
// Only add separator if there is a form title.
|
languages/give.pot
CHANGED
@@ -314,7 +314,7 @@ msgstr ""
|
|
314 |
msgid "Donation Failed Page"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: includes/admin/admin-pages.php:511, includes/admin/class-give-settings.php:230, includes/admin/settings/class-settings-general.php:
|
318 |
msgid "Donation History Page"
|
319 |
msgstr ""
|
320 |
|
@@ -458,7 +458,7 @@ msgstr ""
|
|
458 |
msgid "When your first donation arrives, the donor will appear here."
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: includes/admin/class-give-settings.php:94, includes/admin/settings/class-settings-general.php:30, includes/admin/settings/class-settings-general.php:
|
462 |
msgid "General"
|
463 |
msgstr ""
|
464 |
|
@@ -494,67 +494,67 @@ msgstr ""
|
|
494 |
msgid "Save Settings"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: includes/admin/class-give-settings.php:199, includes/admin/class-give-settings.php:203, includes/admin/settings/class-settings-general.php:
|
498 |
msgid "General Settings"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: includes/admin/class-give-settings.php:209, includes/admin/settings/class-settings-general.php:
|
502 |
msgid "Success Page"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: includes/admin/class-give-settings.php:211, includes/admin/settings/class-settings-general.php:
|
506 |
msgid "The page donors are sent to after completing their donations. The %s shortcode should be on this page."
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: includes/admin/class-give-settings.php:220, includes/admin/settings/class-settings-general.php:
|
510 |
msgid "Failed Donation Page"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/admin/class-give-settings.php:221, includes/admin/settings/class-settings-general.php:
|
514 |
msgid "The page donors are sent to if their donation is cancelled or fails."
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: includes/admin/class-give-settings.php:232, includes/admin/settings/class-settings-general.php:
|
518 |
msgid "The page showing a complete donation history for the current user. The %s shortcode should be on this page."
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: includes/admin/class-give-settings.php:241, includes/admin/settings/class-settings-general.php:
|
522 |
msgid "Base Country"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: includes/admin/class-give-settings.php:242, includes/admin/settings/class-settings-general.php:
|
526 |
msgid "The country your site operates from."
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: includes/admin/class-give-settings.php:248, includes/admin/settings/class-settings-general.php:
|
530 |
msgid "Currency Settings"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: includes/admin/class-give-settings.php:254, includes/admin/settings/class-settings-general.php:
|
534 |
msgid "Currency"
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: includes/admin/class-give-settings.php:255, includes/admin/settings/class-settings-general.php:
|
538 |
msgid "The donation currency. Note that some payment gateways have currency restrictions."
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: includes/admin/class-give-settings.php:262, includes/admin/settings/class-settings-general.php:
|
542 |
msgid "Currency Position"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: includes/admin/class-give-settings.php:263, includes/admin/settings/class-settings-general.php:
|
546 |
msgid "The position of the currency symbol."
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: includes/admin/class-give-settings.php:268, includes/admin/settings/class-settings-general.php:
|
550 |
msgid "Before - %s‎10"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: includes/admin/class-give-settings.php:270, includes/admin/settings/class-settings-general.php:
|
554 |
msgid "After - 10%s‏"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: includes/admin/class-give-settings.php:275, includes/admin/settings/class-settings-general.php:
|
558 |
msgid "Thousands Separator"
|
559 |
msgstr ""
|
560 |
|
@@ -562,19 +562,19 @@ msgstr ""
|
|
562 |
msgid "The symbol (usually , or .) to separate thousands."
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: includes/admin/class-give-settings.php:283, includes/admin/settings/class-settings-general.php:
|
566 |
msgid "Decimal Separator"
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: includes/admin/class-give-settings.php:284, includes/admin/settings/class-settings-general.php:
|
570 |
msgid "The symbol (usually , or .) to separate decimal points."
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: includes/admin/class-give-settings.php:290, includes/admin/settings/class-settings-general.php:
|
574 |
msgid "Number of Decimals"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: includes/admin/class-give-settings.php:291, includes/admin/settings/class-settings-general.php:
|
578 |
msgid "The number of decimal points displayed in amounts."
|
579 |
msgstr ""
|
580 |
|
@@ -582,7 +582,7 @@ msgstr ""
|
|
582 |
msgid "Gateways Settings"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: includes/admin/class-give-settings.php:315, includes/admin/settings/class-settings-gateways.php:164, includes/admin/tools/views/html-admin-page-system-info.php:
|
586 |
msgid "Test Mode"
|
587 |
msgstr ""
|
588 |
|
@@ -794,7 +794,7 @@ msgstr ""
|
|
794 |
msgid "Email Settings"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: includes/admin/class-give-settings.php:533, includes/admin/emails/class-email-notifications.php:
|
798 |
msgid "Email Template"
|
799 |
msgstr ""
|
800 |
|
@@ -802,15 +802,15 @@ msgstr ""
|
|
802 |
msgid "Choose a template. Click \"Save Changes\" then \"Preview Donation Receipt\" to see the new template."
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: includes/admin/class-give-settings.php:540, includes/admin/emails/class-email-notifications.php:
|
806 |
msgid "Logo"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: includes/admin/class-give-settings.php:541, includes/admin/emails/class-email-notifications.php:
|
810 |
msgid "Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only."
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: includes/admin/class-give-settings.php:546, includes/admin/emails/class-email-notifications.php:
|
814 |
msgid "From Name"
|
815 |
msgstr ""
|
816 |
|
@@ -818,7 +818,7 @@ msgstr ""
|
|
818 |
msgid "The name that appears in the \"From\" field in donation receipt emails."
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: includes/admin/class-give-settings.php:553, includes/admin/emails/class-email-notifications.php:
|
822 |
msgid "From Email"
|
823 |
msgstr ""
|
824 |
|
@@ -890,7 +890,7 @@ msgstr ""
|
|
890 |
msgid "Advanced Options"
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: includes/admin/class-give-settings.php:645, includes/admin/settings/class-settings-general.php:109, includes/admin/settings/class-settings-general.php:
|
894 |
msgid "Access Control"
|
895 |
msgstr ""
|
896 |
|
@@ -1137,7 +1137,7 @@ msgstr[1] ""
|
|
1137 |
msgid "Unnamed Donor"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: includes/admin/donors/class-donor-table.php:193, includes/admin/forms/dashboard-columns.php:35, includes/admin/reports/class-donor-reports-table.php:215, includes/admin/tools/export/class-batch-export-forms.php:46, includes/admin/tools/views/html-admin-page-exports.php:200, includes/admin/tools/views/html-admin-page-system-info.php:
|
1141 |
msgid "Name"
|
1142 |
msgstr ""
|
1143 |
|
@@ -1145,7 +1145,7 @@ msgstr ""
|
|
1145 |
msgid "Email"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: includes/admin/donors/class-donor-table.php:195, includes/admin/forms/dashboard-columns.php:40, includes/admin/reports/class-donor-reports-table.php:217, includes/admin/reports/class-form-reports-table.php:121, includes/admin/reports/graphing.php:180, includes/admin/reports/graphing.php:427, includes/admin/tools/class-settings-logs.php:93, includes/admin/tools/export/class-batch-export-forms.php:56, includes/admin/tools/export/class-export-earnings.php:61, includes/admin/tools/export/pdf-reports.php:304, includes/admin/tools/import/class-give-import-donations.php:492, includes/admin/upgrades/class-give-updates.php:
|
1149 |
msgid "Donations"
|
1150 |
msgstr ""
|
1151 |
|
@@ -1201,7 +1201,7 @@ msgstr ""
|
|
1201 |
msgid "You do not have permission to edit this donor."
|
1202 |
msgstr ""
|
1203 |
|
1204 |
-
#: includes/admin/donors/donor-actions.php:31, includes/admin/donors/donor-actions.php:45, includes/admin/donors/donor-actions.php:144, includes/admin/donors/donor-actions.php:158, includes/admin/donors/donor-actions.php:226, includes/admin/donors/donor-actions.php:241, includes/admin/donors/donor-actions.php:325, includes/admin/donors/donor-actions.php:339, includes/admin/donors/donor-actions.php:418, includes/admin/donors/donor-actions.php:514, includes/admin/donors/donor-actions.php:561, includes/admin/donors/donor-actions.php:599, includes/admin/donors/donor-actions.php:615, includes/admin/EDD_SL_Plugin_Updater.php:396, includes/admin/emails/class-donation-receipt-email.php:300, includes/admin/forms/dashboard-columns.php:244, includes/admin/payments/actions.php:31, includes/admin/payments/actions.php:85, includes/admin/payments/actions.php:98, includes/admin/payments/actions.php:333, includes/admin/payments/actions.php:353, includes/admin/payments/actions.php:386, includes/admin/payments/actions.php:408, includes/admin/payments/view-payment-details.php:19, includes/admin/payments/view-payment-details.php:32, includes/admin/payments/view-payment-details.php:42, includes/admin/reports/reports.php:143, includes/admin/tools/data/class-give-tools-delete-import-donors.php:257, includes/admin/tools/data/class-give-tools-delete-test-donors.php:228, includes/admin/tools/data/class-give-tools-delete-test-transactions.php:120, includes/admin/tools/data/class-give-tools-recount-all-stats.php:239, includes/admin/tools/data/class-give-tools-recount-donor-stats.php:195, includes/admin/tools/data/class-give-tools-recount-form-stats.php:182, includes/admin/tools/data/class-give-tools-recount-income.php:156, includes/admin/tools/data/class-give-tools-recount-single-donor-stats.php:151, includes/admin/tools/data/class-give-tools-reset-stats.php:189, includes/admin/tools/export/class-batch-export.php:145, includes/admin/tools/export/class-core-settings-export.php:68, includes/admin/tools/export/class-export.php:173, includes/admin/tools/export/export-actions.php:26, includes/admin/tools/export/pdf-reports.php:31, includes/admin/tools/export/pdf-reports.php:35, includes/admin/tools/export/pdf-reports.php:39, includes/admin/tools/logs/class-api-requests-logs-list-table.php:154, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:136, includes/admin/upgrades/upgrade-functions.php:
|
1205 |
msgid "Error"
|
1206 |
msgstr ""
|
1207 |
|
@@ -1459,7 +1459,7 @@ msgstr ""
|
|
1459 |
msgid "Amount"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
-
#: includes/admin/donors/donors.php:781, includes/admin/forms/dashboard-columns.php:43, includes/admin/payments/class-payments-table.php:390, includes/admin/tools/export/class-batch-export-payments.php:59, includes/admin/tools/export/class-export-earnings.php:60, includes/admin/tools/export/class-export.php:69, includes/admin/tools/logs/class-api-requests-logs-list-table.php:96, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:139, includes/admin/tools/logs/class-sales-logs-list-table.php:142, includes/import-functions.php:380, templates/history-donations.php:51, templates/shortcode-receipt.php:44
|
1463 |
msgid "Date"
|
1464 |
msgstr ""
|
1465 |
|
@@ -1539,7 +1539,7 @@ msgstr ""
|
|
1539 |
msgid "Download Receipt"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
-
#: includes/admin/emails/abstract-email-notification.php:845, includes/emails/class-give-email-tags.php:
|
1543 |
msgid "View your donation history »"
|
1544 |
msgstr ""
|
1545 |
|
@@ -1552,7 +1552,7 @@ msgid "You do not have permission to edit donations."
|
|
1552 |
msgstr ""
|
1553 |
|
1554 |
#: includes/admin/emails/class-donor-register-email.php:36
|
1555 |
-
msgid "
|
1556 |
msgstr ""
|
1557 |
|
1558 |
#: includes/admin/emails/class-donor-register-email.php:37
|
@@ -1579,15 +1579,19 @@ msgstr ""
|
|
1579 |
msgid "Click Here to Login »"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
-
#: includes/admin/emails/class-donor-register-email.php:
|
|
|
|
|
|
|
|
|
1583 |
msgid "No donor(s) found."
|
1584 |
msgstr ""
|
1585 |
|
1586 |
-
#: includes/admin/emails/class-donor-register-email.php:
|
1587 |
msgid "- Select a donor -"
|
1588 |
msgstr ""
|
1589 |
|
1590 |
-
#: includes/admin/emails/class-donor-register-email.php:
|
1591 |
msgid "Preview email with a donor:"
|
1592 |
msgstr ""
|
1593 |
|
@@ -1655,39 +1659,43 @@ msgstr ""
|
|
1655 |
msgid "Plain"
|
1656 |
msgstr ""
|
1657 |
|
1658 |
-
#: includes/admin/emails/class-email-notifications.php:121
|
1659 |
-
msgid "Email
|
1660 |
msgstr ""
|
1661 |
|
1662 |
-
#: includes/admin/emails/class-email-notifications.php:
|
1663 |
msgid "Email Options"
|
1664 |
msgstr ""
|
1665 |
|
1666 |
-
#: includes/admin/emails/class-email-notifications.php:
|
1667 |
msgid ""
|
1668 |
msgstr ""
|
1669 |
|
1670 |
-
#: includes/admin/emails/class-email-notifications.php:
|
1671 |
msgid "Customize"
|
1672 |
msgstr ""
|
1673 |
|
1674 |
-
#: includes/admin/emails/class-email-notifications.php:
|
1675 |
msgid "Choose your template from the available registered template types."
|
1676 |
msgstr ""
|
1677 |
|
1678 |
-
#: includes/admin/emails/class-email-notifications.php:
|
1679 |
msgid "The name which appears in the \"From\" field in all Give donation emails."
|
1680 |
msgstr ""
|
1681 |
|
1682 |
-
#: includes/admin/emails/class-email-notifications.php:
|
1683 |
msgid "Email address from which all Give emails are sent from. This will act as the \"from\" and \"reply-to\" email address."
|
1684 |
msgstr ""
|
1685 |
|
1686 |
-
#: includes/admin/emails/class-email-
|
|
|
|
|
|
|
|
|
1687 |
msgid "Enabled"
|
1688 |
msgstr ""
|
1689 |
|
1690 |
-
#: includes/admin/emails/class-email-setting-field.php:169, includes/admin/emails/class-email-setting-field.php:179, includes/admin/forms/class-metabox-form-data.php:150, includes/admin/forms/class-metabox-form-data.php:285, includes/admin/forms/class-metabox-form-data.php:310, includes/admin/forms/class-metabox-form-data.php:343, includes/admin/forms/class-metabox-form-data.php:401, includes/admin/forms/class-metabox-form-data.php:441, includes/admin/settings/class-settings-advanced.php:84, includes/admin/settings/class-settings-advanced.php:106, includes/admin/settings/class-settings-advanced.php:139, includes/admin/settings/class-settings-display.php:63, includes/admin/settings/class-settings-display.php:80, includes/admin/settings/class-settings-display.php:97, includes/admin/settings/class-settings-display.php:128, includes/admin/settings/class-settings-display.php:144, includes/admin/settings/class-settings-display.php:155, includes/admin/settings/class-settings-display.php:166, includes/admin/settings/class-settings-display.php:185, includes/admin/settings/class-settings-display.php:216, includes/admin/settings/class-settings-display.php:227, includes/admin/settings/class-settings-display.php:258, includes/admin/settings/class-settings-gateways.php:86, includes/admin/settings/class-settings-gateways.php:97, includes/admin/settings/class-settings-gateways.php:129, includes/admin/settings/class-settings-gateways.php:171, includes/admin/settings/class-settings-general.php:87, includes/admin/tools/import/class-give-import-donations.php:764, includes/admin/tools/import/class-give-import-donations.php:775, includes/admin/tools/import/class-give-import-donations.php:786, includes/admin/tools/views/html-admin-page-system-info.php:
|
1691 |
msgid "Disabled"
|
1692 |
msgstr ""
|
1693 |
|
@@ -1771,12 +1779,8 @@ msgstr ""
|
|
1771 |
msgid "New Donation!"
|
1772 |
msgstr ""
|
1773 |
|
1774 |
-
#: includes/admin/emails/class-new-donor-register-email.php:36
|
1775 |
-
msgid "New Donor Registration"
|
1776 |
-
msgstr ""
|
1777 |
-
|
1778 |
#: includes/admin/emails/class-new-donor-register-email.php:37
|
1779 |
-
msgid "Sent to designated recipient(s) when a new
|
1780 |
msgstr ""
|
1781 |
|
1782 |
#: includes/admin/emails/class-new-donor-register-email.php:45
|
@@ -2231,7 +2235,7 @@ msgstr ""
|
|
2231 |
msgid "Error creating new donor."
|
2232 |
msgstr ""
|
2233 |
|
2234 |
-
#: includes/admin/payments/class-payments-table.php:164, includes/admin/tools/logs/logs.php:
|
2235 |
msgid "Search"
|
2236 |
msgstr ""
|
2237 |
|
@@ -2243,7 +2247,7 @@ msgstr ""
|
|
2243 |
msgid "End Date"
|
2244 |
msgstr ""
|
2245 |
|
2246 |
-
#: includes/admin/payments/class-payments-table.php:210, includes/admin/tools/logs/logs.php:
|
2247 |
msgid "Apply"
|
2248 |
msgstr ""
|
2249 |
|
@@ -2419,7 +2423,7 @@ msgstr ""
|
|
2419 |
msgid "Donation %s"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
-
#: includes/admin/payments/view-payment-details.php:70, includes/admin/tools/views/html-admin-page-system-info.php:
|
2423 |
msgid "Test Donation"
|
2424 |
msgstr ""
|
2425 |
|
@@ -2927,7 +2931,7 @@ msgstr ""
|
|
2927 |
msgid "This option will enable the billing details section for PayPal Standard which requires the donor's address to complete the donation. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data."
|
2928 |
msgstr ""
|
2929 |
|
2930 |
-
#: includes/admin/settings/class-settings-gateways.php:90, includes/admin/tools/views/html-admin-page-system-info.php:
|
2931 |
msgid "PayPal IPN Verification"
|
2932 |
msgstr ""
|
2933 |
|
@@ -2975,27 +2979,27 @@ msgstr ""
|
|
2975 |
msgid "Access Control Docs Link"
|
2976 |
msgstr ""
|
2977 |
|
2978 |
-
#: includes/admin/settings/class-settings-general.php:
|
2979 |
msgid "The symbol (typically , or .) to separate thousands."
|
2980 |
msgstr ""
|
2981 |
|
2982 |
-
#: includes/admin/settings/class-settings-general.php:
|
2983 |
msgid "Currency Options Docs Link"
|
2984 |
msgstr ""
|
2985 |
|
2986 |
-
#: includes/admin/settings/class-settings-general.php:
|
2987 |
msgid "Base State/Province"
|
2988 |
msgstr ""
|
2989 |
|
2990 |
-
#: includes/admin/settings/class-settings-general.php:
|
2991 |
msgid "The state/province your site operates from."
|
2992 |
msgstr ""
|
2993 |
|
2994 |
-
#: includes/admin/settings/class-settings-general.php:
|
2995 |
msgid "General Options Docs Link"
|
2996 |
msgstr ""
|
2997 |
|
2998 |
-
#: includes/admin/settings/class-settings-general.php:
|
2999 |
msgid "General Options"
|
3000 |
msgstr ""
|
3001 |
|
@@ -3203,6 +3207,10 @@ msgstr ""
|
|
3203 |
msgid "API Requests"
|
3204 |
msgstr ""
|
3205 |
|
|
|
|
|
|
|
|
|
3206 |
#: includes/admin/tools/data/class-give-tools-delete-import-donors.php:257
|
3207 |
msgid "You do not have permission to delete Import transactions."
|
3208 |
msgstr ""
|
@@ -3508,7 +3516,15 @@ msgid "Import Core Settings from a JSON file"
|
|
3508 |
msgstr ""
|
3509 |
|
3510 |
#: includes/admin/tools/import/class-give-import-core-settings.php:350
|
3511 |
-
msgid "This tool allows you to
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3512 |
msgstr ""
|
3513 |
|
3514 |
#: includes/admin/tools/import/class-give-import-core-settings.php:372
|
@@ -3516,7 +3532,7 @@ msgid "Merge Type:"
|
|
3516 |
msgstr ""
|
3517 |
|
3518 |
#: includes/admin/tools/import/class-give-import-core-settings.php:373
|
3519 |
-
msgid "
|
3520 |
msgstr ""
|
3521 |
|
3522 |
#: includes/admin/tools/import/class-give-import-core-settings.php:377
|
@@ -3713,7 +3729,7 @@ msgstr ""
|
|
3713 |
msgid "Please upload or provide a valid CSV file."
|
3714 |
msgstr ""
|
3715 |
|
3716 |
-
#: includes/admin/tools/logs/class-api-requests-logs-list-table.php:94, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:135, includes/admin/tools/logs/class-sales-logs-list-table.php:137
|
3717 |
msgid "Log ID"
|
3718 |
msgstr ""
|
3719 |
|
@@ -3765,6 +3781,14 @@ msgstr ""
|
|
3765 |
msgid "Donation Amount"
|
3766 |
msgstr ""
|
3767 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3768 |
#: includes/admin/tools/views/html-admin-page-data.php:24
|
3769 |
msgid "Recount Stats"
|
3770 |
msgstr ""
|
@@ -4082,623 +4106,647 @@ msgid "The page set to display your posts."
|
|
4082 |
msgstr ""
|
4083 |
|
4084 |
#: includes/admin/tools/views/html-admin-page-system-info.php:140
|
4085 |
-
msgid "Table Prefix
|
4086 |
msgstr ""
|
4087 |
|
4088 |
#: includes/admin/tools/views/html-admin-page-system-info.php:141
|
4089 |
-
msgid "The
|
4090 |
msgstr ""
|
4091 |
|
4092 |
#: includes/admin/tools/views/html-admin-page-system-info.php:145
|
4093 |
-
msgid "Table Prefix
|
4094 |
msgstr ""
|
4095 |
|
4096 |
#: includes/admin/tools/views/html-admin-page-system-info.php:146
|
4097 |
-
msgid "The
|
4098 |
msgstr ""
|
4099 |
|
4100 |
#: includes/admin/tools/views/html-admin-page-system-info.php:150
|
4101 |
-
msgid "
|
4102 |
msgstr ""
|
4103 |
|
4104 |
#: includes/admin/tools/views/html-admin-page-system-info.php:151
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4105 |
msgid "Whether Admin AJAX is accessible."
|
4106 |
msgstr ""
|
4107 |
|
4108 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4109 |
msgid "Accessible"
|
4110 |
msgstr ""
|
4111 |
|
4112 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4113 |
msgid "Inaccessible"
|
4114 |
msgstr ""
|
4115 |
|
4116 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4117 |
msgid "Registered Post Statuses"
|
4118 |
msgstr ""
|
4119 |
|
4120 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4121 |
msgid "A list of all registered post statuses."
|
4122 |
msgstr ""
|
4123 |
|
4124 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4125 |
msgid "Server Environment"
|
4126 |
msgstr ""
|
4127 |
|
4128 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4129 |
msgid "Hosting Provider"
|
4130 |
msgstr ""
|
4131 |
|
4132 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4133 |
msgid "The hosting provider for this WordPress installation."
|
4134 |
msgstr ""
|
4135 |
|
4136 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4137 |
msgid "Unknown"
|
4138 |
msgstr ""
|
4139 |
|
4140 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4141 |
msgid "TLS Connection"
|
4142 |
msgstr ""
|
4143 |
|
4144 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4145 |
msgid "Most payment gateway APIs only support connections using the TLS 1.2 security protocol."
|
4146 |
msgstr ""
|
4147 |
|
4148 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4149 |
msgid "Connection uses %s"
|
4150 |
msgstr ""
|
4151 |
|
4152 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4153 |
msgid "TLS Rating"
|
4154 |
msgstr ""
|
4155 |
|
4156 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4157 |
msgid "The server's connection as rated by https://www.howsmyssl.com/"
|
4158 |
msgstr ""
|
4159 |
|
4160 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4161 |
msgid "Server Info"
|
4162 |
msgstr ""
|
4163 |
|
4164 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4165 |
msgid "Information about the web server that is currently hosting your site."
|
4166 |
msgstr ""
|
4167 |
|
4168 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4169 |
msgid "PHP Version"
|
4170 |
msgstr ""
|
4171 |
|
4172 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4173 |
msgid "The version of PHP installed on your hosting server."
|
4174 |
msgstr ""
|
4175 |
|
4176 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4177 |
msgid "%s - We recommend a minimum PHP version of 5.6. See: %s"
|
4178 |
msgstr ""
|
4179 |
|
4180 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4181 |
msgid "PHP Requirements in Give"
|
4182 |
msgstr ""
|
4183 |
|
4184 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4185 |
msgid "Couldn't determine PHP version because phpversion() doesn't exist."
|
4186 |
msgstr ""
|
4187 |
|
4188 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4189 |
msgid "PHP Post Max Size"
|
4190 |
msgstr ""
|
4191 |
|
4192 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4193 |
msgid "The largest filesize that can be contained in one post."
|
4194 |
msgstr ""
|
4195 |
|
4196 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4197 |
msgid "PHP Time Limit"
|
4198 |
msgstr ""
|
4199 |
|
4200 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4201 |
msgid "The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)."
|
4202 |
msgstr ""
|
4203 |
|
4204 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4205 |
msgid "PHP Max Input Vars"
|
4206 |
msgstr ""
|
4207 |
|
4208 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4209 |
msgid "The maximum number of variables your server can use for a single function to avoid overloads."
|
4210 |
msgstr ""
|
4211 |
|
4212 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4213 |
msgid "PHP Max Upload Size"
|
4214 |
msgstr ""
|
4215 |
|
4216 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4217 |
msgid "The largest filesize that can be uploaded to your WordPress installation."
|
4218 |
msgstr ""
|
4219 |
|
4220 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4221 |
msgid "cURL Version"
|
4222 |
msgstr ""
|
4223 |
|
4224 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4225 |
msgid "The version of cURL installed on your server."
|
4226 |
msgstr ""
|
4227 |
|
4228 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4229 |
msgid "%s - We recommend a minimum cURL version of 7.40."
|
4230 |
msgstr ""
|
4231 |
|
4232 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4233 |
msgid "SUHOSIN Installed"
|
4234 |
msgstr ""
|
4235 |
|
4236 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4237 |
msgid "Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits."
|
4238 |
msgstr ""
|
4239 |
|
4240 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4241 |
msgid "MySQL Version"
|
4242 |
msgstr ""
|
4243 |
|
4244 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4245 |
msgid "The version of MySQL installed on your hosting server."
|
4246 |
msgstr ""
|
4247 |
|
4248 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4249 |
msgid "%s - We recommend a minimum MySQL version of 5.6. See: %s"
|
4250 |
msgstr ""
|
4251 |
|
4252 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4253 |
msgid "WordPress Requirements"
|
4254 |
msgstr ""
|
4255 |
|
4256 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4257 |
msgid "Default Timezone is UTC"
|
4258 |
msgstr ""
|
4259 |
|
4260 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4261 |
msgid "The default timezone for your server."
|
4262 |
msgstr ""
|
4263 |
|
4264 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4265 |
msgid "Default timezone is %s - it should be UTC"
|
4266 |
msgstr ""
|
4267 |
|
4268 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4269 |
msgid "Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services."
|
4270 |
msgstr ""
|
4271 |
|
4272 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4273 |
msgid "Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider."
|
4274 |
msgstr ""
|
4275 |
|
4276 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4277 |
msgid "Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed."
|
4278 |
msgstr ""
|
4279 |
|
4280 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4281 |
msgid "Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected."
|
4282 |
msgstr ""
|
4283 |
|
4284 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4285 |
msgid "HTML/Multipart emails use DOMDocument to generate inline CSS in templates."
|
4286 |
msgstr ""
|
4287 |
|
4288 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4289 |
msgid "Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument."
|
4290 |
msgstr ""
|
4291 |
|
4292 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4293 |
msgid "gzip is used for file compression and decompression."
|
4294 |
msgstr ""
|
4295 |
|
4296 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4297 |
msgid "Your server does not support the %s function - this is used for file compression and decompression."
|
4298 |
msgstr ""
|
4299 |
|
4300 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4301 |
msgid "GD Graphics Library is used for dynamically manipulating images."
|
4302 |
msgstr ""
|
4303 |
|
4304 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4305 |
msgid "Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase."
|
4306 |
msgstr ""
|
4307 |
|
4308 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4309 |
msgid "Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it."
|
4310 |
msgstr ""
|
4311 |
|
4312 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4313 |
msgid "Remote Post"
|
4314 |
msgstr ""
|
4315 |
|
4316 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4317 |
msgid "PayPal uses this method of communicating when sending back transaction information."
|
4318 |
msgstr ""
|
4319 |
|
4320 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4321 |
msgid "wp_remote_post() failed. PayPal IPN won't work with your server. Contact your hosting provider."
|
4322 |
msgstr ""
|
4323 |
|
4324 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4325 |
msgid "Error: %s"
|
4326 |
msgstr ""
|
4327 |
|
4328 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4329 |
msgid "Status code: %s"
|
4330 |
msgstr ""
|
4331 |
|
4332 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4333 |
msgid "Remote Get"
|
4334 |
msgstr ""
|
4335 |
|
4336 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4337 |
msgid "Give plugins may use this method of communication when checking for plugin updates."
|
4338 |
msgstr ""
|
4339 |
|
4340 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4341 |
msgid "wp_remote_get() failed. The Give plugin updater won't work with your server. Contact your hosting provider."
|
4342 |
msgstr ""
|
4343 |
|
4344 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4345 |
msgid "Give Configuration"
|
4346 |
msgstr ""
|
4347 |
|
4348 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4349 |
msgid "Give Version"
|
4350 |
msgstr ""
|
4351 |
|
4352 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4353 |
msgid "The version of Give installed on your site."
|
4354 |
msgstr ""
|
4355 |
|
4356 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4357 |
msgid "Give Cache"
|
4358 |
msgstr ""
|
4359 |
|
4360 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4361 |
msgid "Whether cache is enabled in Give settings."
|
4362 |
msgstr ""
|
4363 |
|
4364 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4365 |
msgid "Database Updates"
|
4366 |
msgstr ""
|
4367 |
|
4368 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4369 |
msgid "This will show the number of pending database updates."
|
4370 |
msgstr ""
|
4371 |
|
4372 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4373 |
msgid "All DB Updates Completed."
|
4374 |
msgstr ""
|
4375 |
|
4376 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
|
|
|
|
|
|
|
|
4377 |
msgid "%1$s updates still need to run."
|
4378 |
msgstr ""
|
4379 |
|
4380 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4381 |
msgid "%1$s of %2$s updates still need to run."
|
4382 |
msgstr ""
|
4383 |
|
4384 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4385 |
msgid "Give Emails"
|
4386 |
msgstr ""
|
4387 |
|
4388 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4389 |
msgid "Whether emails is enabled in Give settings."
|
4390 |
msgstr ""
|
4391 |
|
4392 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4393 |
msgid "Upgraded From"
|
4394 |
msgstr ""
|
4395 |
|
4396 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4397 |
msgid "The version of Give installed prior to the last update."
|
4398 |
msgstr ""
|
4399 |
|
4400 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4401 |
msgid "Whether Test Mode is enabled in Give settings."
|
4402 |
msgstr ""
|
4403 |
|
4404 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4405 |
msgid "Currency Code"
|
4406 |
msgstr ""
|
4407 |
|
4408 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4409 |
msgid "The currency code selected in Give settings."
|
4410 |
msgstr ""
|
4411 |
|
4412 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4413 |
msgid "The currency position selected in Give settings."
|
4414 |
msgstr ""
|
4415 |
|
4416 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4417 |
msgid "Before"
|
4418 |
msgstr ""
|
4419 |
|
4420 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4421 |
msgid "After"
|
4422 |
msgstr ""
|
4423 |
|
4424 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4425 |
msgid "The decimal separator defined in Give settings."
|
4426 |
msgstr ""
|
4427 |
|
4428 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4429 |
msgid "The thousands separator defined in Give settings."
|
4430 |
msgstr ""
|
4431 |
|
4432 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4433 |
msgid "The page where donors land following a successful transaction."
|
4434 |
msgstr ""
|
4435 |
|
4436 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4437 |
msgid "Failure Page"
|
4438 |
msgstr ""
|
4439 |
|
4440 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4441 |
msgid "The page where donors land following a failed transaction."
|
4442 |
msgstr ""
|
4443 |
|
4444 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4445 |
msgid "The page where past donations are listed."
|
4446 |
msgstr ""
|
4447 |
|
4448 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4449 |
msgid "Give Forms Slug"
|
4450 |
msgstr ""
|
4451 |
|
4452 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4453 |
msgid "The slug used for Give donation forms."
|
4454 |
msgstr ""
|
4455 |
|
4456 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4457 |
msgid "Enabled Payment Gateways"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4461 |
msgid "All payment gateways enabled in Give settings."
|
4462 |
msgstr ""
|
4463 |
|
4464 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4465 |
msgid "Default Payment Gateway"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4469 |
msgid "The default payment gateway selected in Give settings."
|
4470 |
msgstr ""
|
4471 |
|
4472 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4473 |
msgid "Whether admins requires verification of IPN notifications with PayPal."
|
4474 |
msgstr ""
|
4475 |
|
4476 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4477 |
msgid "PayPal IPN Notifications"
|
4478 |
msgstr ""
|
4479 |
|
4480 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4481 |
msgid "Displays whether when last PayPal IPN is received with which donation or transaction."
|
4482 |
msgstr ""
|
4483 |
|
4484 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4485 |
msgid "IPN received for <a href=\"%s\">#%s</a> ( <a href=\"%s\" target=\"_blank\">%s</a> ) on %s at %s. Status %s"
|
4486 |
msgstr ""
|
4487 |
|
4488 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4489 |
msgid "Donor Email Access"
|
4490 |
msgstr ""
|
4491 |
|
4492 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4493 |
msgid "Whether donors can access their donation history using only email."
|
4494 |
msgstr ""
|
4495 |
|
4496 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4497 |
msgid "Session Configuration"
|
4498 |
msgstr ""
|
4499 |
|
4500 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4501 |
msgid "Give Use Sessions"
|
4502 |
msgstr ""
|
4503 |
|
4504 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4505 |
msgid "Whether PHP sessions are enforced, enabled, or disabled."
|
4506 |
msgstr ""
|
4507 |
|
4508 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4509 |
msgid "Enforced"
|
4510 |
msgstr ""
|
4511 |
|
4512 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4513 |
msgid "Session"
|
4514 |
msgstr ""
|
4515 |
|
4516 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4517 |
msgid "Whether a PHP session is currently set."
|
4518 |
msgstr ""
|
4519 |
|
4520 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4521 |
msgid "Session Name"
|
4522 |
msgstr ""
|
4523 |
|
4524 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4525 |
msgid "The name of the current PHP session."
|
4526 |
msgstr ""
|
4527 |
|
4528 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4529 |
msgid "Cookie Path"
|
4530 |
msgstr ""
|
4531 |
|
4532 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4533 |
msgid "The cookie path of the current PHP session."
|
4534 |
msgstr ""
|
4535 |
|
4536 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4537 |
msgid "Save Path"
|
4538 |
msgstr ""
|
4539 |
|
4540 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4541 |
msgid "The save path of the current PHP session."
|
4542 |
msgstr ""
|
4543 |
|
4544 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4545 |
msgid "Use Cookies"
|
4546 |
msgstr ""
|
4547 |
|
4548 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4549 |
msgid "Whether the current PHP session is set to use cookies."
|
4550 |
msgstr ""
|
4551 |
|
4552 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4553 |
msgid "Use Only Cookies"
|
4554 |
msgstr ""
|
4555 |
|
4556 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4557 |
msgid "Whether the current PHP session is set to use only cookies."
|
4558 |
msgstr ""
|
4559 |
|
4560 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4561 |
msgid "Active Give Add-ons"
|
4562 |
msgstr ""
|
4563 |
|
4564 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4565 |
msgid "Visit plugin homepage"
|
4566 |
msgstr ""
|
4567 |
|
4568 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4569 |
msgid "Visit author homepage"
|
4570 |
msgstr ""
|
4571 |
|
4572 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4573 |
msgid "Licensed"
|
4574 |
msgstr ""
|
4575 |
|
4576 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4577 |
msgid "Unlicensed"
|
4578 |
msgstr ""
|
4579 |
|
4580 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4581 |
msgctxt "by author"
|
4582 |
msgid "by %s"
|
4583 |
msgstr ""
|
4584 |
|
4585 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4586 |
msgid "Other Active Plugins"
|
4587 |
msgstr ""
|
4588 |
|
4589 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4590 |
msgid "Inactive Plugins"
|
4591 |
msgstr ""
|
4592 |
|
4593 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4594 |
msgid "Active MU Plugins"
|
4595 |
msgstr ""
|
4596 |
|
4597 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4598 |
msgid "Theme"
|
4599 |
msgstr ""
|
4600 |
|
4601 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4602 |
msgid "The name of the current active theme."
|
4603 |
msgstr ""
|
4604 |
|
4605 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4606 |
msgid "Version"
|
4607 |
msgstr ""
|
4608 |
|
4609 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4610 |
msgid "The installed version of the current active theme."
|
4611 |
msgstr ""
|
4612 |
|
4613 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4614 |
msgid "Author URL"
|
4615 |
msgstr ""
|
4616 |
|
4617 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4618 |
msgid "The theme developer's URL."
|
4619 |
msgstr ""
|
4620 |
|
4621 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4622 |
msgid "Child Theme"
|
4623 |
msgstr ""
|
4624 |
|
4625 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4626 |
msgid "Whether the current theme is a child theme."
|
4627 |
msgstr ""
|
4628 |
|
4629 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4630 |
msgid "Yes"
|
4631 |
msgstr ""
|
4632 |
|
4633 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4634 |
msgid "No"
|
4635 |
msgstr ""
|
4636 |
|
4637 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4638 |
msgid "If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: <a href=\"%s\" target=\"_blank\">How to Create a Child Theme</a>"
|
4639 |
msgstr ""
|
4640 |
|
4641 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4642 |
msgid "Parent Theme Name"
|
4643 |
msgstr ""
|
4644 |
|
4645 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4646 |
msgid "The name of the parent theme."
|
4647 |
msgstr ""
|
4648 |
|
4649 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4650 |
msgid "Parent Theme Version"
|
4651 |
msgstr ""
|
4652 |
|
4653 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4654 |
msgid "The installed version of the parent theme."
|
4655 |
msgstr ""
|
4656 |
|
4657 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4658 |
msgid "Parent Theme Author URL"
|
4659 |
msgstr ""
|
4660 |
|
4661 |
-
#: includes/admin/tools/views/html-admin-page-system-info.php:
|
4662 |
msgid "The parent theme developers URL."
|
4663 |
msgstr ""
|
4664 |
|
4665 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4666 |
msgid "Give Updates Complete"
|
4667 |
msgstr ""
|
4668 |
|
4669 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4670 |
-
msgid "Updates"
|
4671 |
msgstr ""
|
4672 |
|
4673 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4674 |
-
msgid "
|
4675 |
msgstr ""
|
4676 |
|
4677 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4678 |
-
msgid "
|
4679 |
msgstr ""
|
4680 |
|
4681 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4682 |
-
msgid "
|
4683 |
msgstr ""
|
4684 |
|
4685 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4686 |
-
msgid "
|
|
|
|
|
|
|
|
|
4687 |
msgstr ""
|
4688 |
|
4689 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4690 |
msgid "GiveWP needs to update your database to the latest version. The following process will make updates to your site's database. Please create a complete backup before proceeding."
|
4691 |
msgstr ""
|
4692 |
|
4693 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4694 |
-
msgid "
|
4695 |
msgstr ""
|
4696 |
|
4697 |
-
#: includes/admin/upgrades/class-give-updates.php:
|
4698 |
msgid "Updates Completed."
|
4699 |
msgstr ""
|
4700 |
|
4701 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4702 |
msgid "You do not have permission to do Give upgrades."
|
4703 |
msgstr ""
|
4704 |
|
@@ -4722,47 +4770,67 @@ msgstr ""
|
|
4722 |
msgid "Give regularly receives new features, bug fixes, and enhancements. It is important to always stay up-to-date with latest version of Give core and its add-ons. Please create a backup of your site before updating. To update add-ons be sure your <a href=\"%1$s\">license keys</a> are activated."
|
4723 |
msgstr ""
|
4724 |
|
4725 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4726 |
msgid "%1$s <a href=\"%2$s\" class=\"%3$s\">%4$s</a>"
|
4727 |
msgstr ""
|
4728 |
|
4729 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4730 |
msgid "Give is currently updating the database in the background."
|
4731 |
msgstr ""
|
4732 |
|
4733 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4734 |
msgid "Give needs to update the database."
|
4735 |
msgstr ""
|
4736 |
|
4737 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4738 |
msgid "Update now"
|
4739 |
msgstr ""
|
4740 |
|
|
|
|
|
|
|
|
|
4741 |
#: includes/admin/upgrades/views/upgrades.php:60
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4742 |
msgid "Update %s of %s"
|
4743 |
msgstr ""
|
4744 |
|
4745 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4746 |
msgid "Add-on Updates"
|
4747 |
msgstr ""
|
4748 |
|
4749 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4750 |
msgid "There %1$s %2$s Give %3$s that %4$s to be updated. <a href=\"%5$s\">Update now</a>"
|
4751 |
msgstr ""
|
4752 |
|
4753 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4754 |
msgid "is"
|
4755 |
msgid_plural "are"
|
4756 |
msgstr[0] ""
|
4757 |
msgstr[1] ""
|
4758 |
|
4759 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4760 |
msgid "add-on"
|
4761 |
msgid_plural "add-ons"
|
4762 |
msgstr[0] ""
|
4763 |
msgstr[1] ""
|
4764 |
|
4765 |
-
#: includes/admin/upgrades/views/upgrades.php:
|
4766 |
msgid "needs"
|
4767 |
msgid_plural "need"
|
4768 |
msgstr[0] ""
|
@@ -9638,19 +9706,19 @@ msgstr ""
|
|
9638 |
msgid "The reset password link for user."
|
9639 |
msgstr ""
|
9640 |
|
9641 |
-
#: includes/emails/class-give-email-tags.php:
|
9642 |
msgid "View it in your browser »"
|
9643 |
msgstr ""
|
9644 |
|
9645 |
-
#: includes/emails/class-give-email-tags.php:
|
9646 |
msgid "View your donation history"
|
9647 |
msgstr ""
|
9648 |
|
9649 |
-
#: includes/emails/class-give-email-tags.php:
|
9650 |
msgid "Reset your password »"
|
9651 |
msgstr ""
|
9652 |
|
9653 |
-
#: includes/emails/class-give-email-tags.php:
|
9654 |
msgid "Reset your password"
|
9655 |
msgstr ""
|
9656 |
|
@@ -10394,6 +10462,10 @@ msgstr ""
|
|
10394 |
msgid "Status changed from %1$s to %2$s."
|
10395 |
msgstr ""
|
10396 |
|
|
|
|
|
|
|
|
|
10397 |
#: includes/payments/functions.php:529
|
10398 |
msgid "Complete"
|
10399 |
msgstr ""
|
314 |
msgid "Donation Failed Page"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: includes/admin/admin-pages.php:511, includes/admin/class-give-settings.php:230, includes/admin/settings/class-settings-general.php:244, includes/admin/tools/views/html-admin-page-system-info.php:563
|
318 |
msgid "Donation History Page"
|
319 |
msgstr ""
|
320 |
|
458 |
msgid "When your first donation arrives, the donor will appear here."
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/admin/class-give-settings.php:94, includes/admin/settings/class-settings-general.php:30, includes/admin/settings/class-settings-general.php:316
|
462 |
msgid "General"
|
463 |
msgstr ""
|
464 |
|
494 |
msgid "Save Settings"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: includes/admin/class-give-settings.php:199, includes/admin/class-give-settings.php:203, includes/admin/settings/class-settings-general.php:217
|
498 |
msgid "General Settings"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: includes/admin/class-give-settings.php:209, includes/admin/settings/class-settings-general.php:223, includes/admin/tools/views/html-admin-page-system-info.php:553
|
502 |
msgid "Success Page"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: includes/admin/class-give-settings.php:211, includes/admin/settings/class-settings-general.php:225
|
506 |
msgid "The page donors are sent to after completing their donations. The %s shortcode should be on this page."
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: includes/admin/class-give-settings.php:220, includes/admin/settings/class-settings-general.php:234
|
510 |
msgid "Failed Donation Page"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: includes/admin/class-give-settings.php:221, includes/admin/settings/class-settings-general.php:235
|
514 |
msgid "The page donors are sent to if their donation is cancelled or fails."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: includes/admin/class-give-settings.php:232, includes/admin/settings/class-settings-general.php:246
|
518 |
msgid "The page showing a complete donation history for the current user. The %s shortcode should be on this page."
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: includes/admin/class-give-settings.php:241, includes/admin/settings/class-settings-general.php:255
|
522 |
msgid "Base Country"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: includes/admin/class-give-settings.php:242, includes/admin/settings/class-settings-general.php:256
|
526 |
msgid "The country your site operates from."
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: includes/admin/class-give-settings.php:248, includes/admin/settings/class-settings-general.php:130, includes/admin/settings/class-settings-general.php:189
|
530 |
msgid "Currency Settings"
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: includes/admin/class-give-settings.php:254, includes/admin/settings/class-settings-general.php:136, includes/admin/settings/class-settings-general.php:317
|
534 |
msgid "Currency"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: includes/admin/class-give-settings.php:255, includes/admin/settings/class-settings-general.php:137
|
538 |
msgid "The donation currency. Note that some payment gateways have currency restrictions."
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: includes/admin/class-give-settings.php:262, includes/admin/settings/class-settings-general.php:145, includes/admin/tools/views/html-admin-page-system-info.php:538
|
542 |
msgid "Currency Position"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/admin/class-give-settings.php:263, includes/admin/settings/class-settings-general.php:146
|
546 |
msgid "The position of the currency symbol."
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: includes/admin/class-give-settings.php:268, includes/admin/settings/class-settings-general.php:120
|
550 |
msgid "Before - %s‎10"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: includes/admin/class-give-settings.php:270, includes/admin/settings/class-settings-general.php:121
|
554 |
msgid "After - 10%s‏"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: includes/admin/class-give-settings.php:275, includes/admin/settings/class-settings-general.php:162, includes/admin/tools/views/html-admin-page-system-info.php:548
|
558 |
msgid "Thousands Separator"
|
559 |
msgstr ""
|
560 |
|
562 |
msgid "The symbol (usually , or .) to separate thousands."
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: includes/admin/class-give-settings.php:283, includes/admin/settings/class-settings-general.php:170, includes/admin/tools/views/html-admin-page-system-info.php:543
|
566 |
msgid "Decimal Separator"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: includes/admin/class-give-settings.php:284, includes/admin/settings/class-settings-general.php:171
|
570 |
msgid "The symbol (usually , or .) to separate decimal points."
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: includes/admin/class-give-settings.php:290, includes/admin/settings/class-settings-general.php:178
|
574 |
msgid "Number of Decimals"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: includes/admin/class-give-settings.php:291, includes/admin/settings/class-settings-general.php:179
|
578 |
msgid "The number of decimal points displayed in amounts."
|
579 |
msgstr ""
|
580 |
|
582 |
msgid "Gateways Settings"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: includes/admin/class-give-settings.php:315, includes/admin/settings/class-settings-gateways.php:164, includes/admin/tools/views/html-admin-page-system-info.php:528, includes/import-functions.php:423
|
586 |
msgid "Test Mode"
|
587 |
msgstr ""
|
588 |
|
794 |
msgid "Email Settings"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: includes/admin/class-give-settings.php:533, includes/admin/emails/class-email-notifications.php:137, includes/admin/settings/class-settings-email.php:76
|
798 |
msgid "Email Template"
|
799 |
msgstr ""
|
800 |
|
802 |
msgid "Choose a template. Click \"Save Changes\" then \"Preview Donation Receipt\" to see the new template."
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: includes/admin/class-give-settings.php:540, includes/admin/emails/class-email-notifications.php:145, includes/admin/settings/class-settings-email.php:83
|
806 |
msgid "Logo"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: includes/admin/class-give-settings.php:541, includes/admin/emails/class-email-notifications.php:146, includes/admin/settings/class-settings-email.php:84
|
810 |
msgid "Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only."
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: includes/admin/class-give-settings.php:546, includes/admin/emails/class-email-notifications.php:151, includes/admin/settings/class-settings-email.php:89
|
814 |
msgid "From Name"
|
815 |
msgstr ""
|
816 |
|
818 |
msgid "The name that appears in the \"From\" field in donation receipt emails."
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: includes/admin/class-give-settings.php:553, includes/admin/emails/class-email-notifications.php:158, includes/admin/settings/class-settings-email.php:96
|
822 |
msgid "From Email"
|
823 |
msgstr ""
|
824 |
|
890 |
msgid "Advanced Options"
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: includes/admin/class-give-settings.php:645, includes/admin/settings/class-settings-general.php:109, includes/admin/settings/class-settings-general.php:318
|
894 |
msgid "Access Control"
|
895 |
msgstr ""
|
896 |
|
1137 |
msgid "Unnamed Donor"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: includes/admin/donors/class-donor-table.php:193, includes/admin/forms/dashboard-columns.php:35, includes/admin/reports/class-donor-reports-table.php:215, includes/admin/tools/export/class-batch-export-forms.php:46, includes/admin/tools/views/html-admin-page-exports.php:200, includes/admin/tools/views/html-admin-page-system-info.php:914, includes/import-functions.php:385
|
1141 |
msgid "Name"
|
1142 |
msgstr ""
|
1143 |
|
1145 |
msgid "Email"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: includes/admin/donors/class-donor-table.php:195, includes/admin/forms/dashboard-columns.php:40, includes/admin/reports/class-donor-reports-table.php:217, includes/admin/reports/class-form-reports-table.php:121, includes/admin/reports/graphing.php:180, includes/admin/reports/graphing.php:427, includes/admin/tools/class-settings-logs.php:93, includes/admin/tools/export/class-batch-export-forms.php:56, includes/admin/tools/export/class-export-earnings.php:61, includes/admin/tools/export/pdf-reports.php:304, includes/admin/tools/import/class-give-import-donations.php:492, includes/admin/upgrades/class-give-updates.php:225, includes/deprecated/deprecated-functions.php:68, includes/post-types.php:66, includes/post-types.php:120
|
1149 |
msgid "Donations"
|
1150 |
msgstr ""
|
1151 |
|
1201 |
msgid "You do not have permission to edit this donor."
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: includes/admin/donors/donor-actions.php:31, includes/admin/donors/donor-actions.php:45, includes/admin/donors/donor-actions.php:144, includes/admin/donors/donor-actions.php:158, includes/admin/donors/donor-actions.php:226, includes/admin/donors/donor-actions.php:241, includes/admin/donors/donor-actions.php:325, includes/admin/donors/donor-actions.php:339, includes/admin/donors/donor-actions.php:418, includes/admin/donors/donor-actions.php:514, includes/admin/donors/donor-actions.php:561, includes/admin/donors/donor-actions.php:599, includes/admin/donors/donor-actions.php:615, includes/admin/EDD_SL_Plugin_Updater.php:396, includes/admin/emails/class-donation-receipt-email.php:300, includes/admin/forms/dashboard-columns.php:244, includes/admin/payments/actions.php:31, includes/admin/payments/actions.php:85, includes/admin/payments/actions.php:98, includes/admin/payments/actions.php:333, includes/admin/payments/actions.php:353, includes/admin/payments/actions.php:386, includes/admin/payments/actions.php:408, includes/admin/payments/view-payment-details.php:19, includes/admin/payments/view-payment-details.php:32, includes/admin/payments/view-payment-details.php:42, includes/admin/reports/reports.php:143, includes/admin/tools/data/class-give-tools-delete-import-donors.php:257, includes/admin/tools/data/class-give-tools-delete-test-donors.php:228, includes/admin/tools/data/class-give-tools-delete-test-transactions.php:120, includes/admin/tools/data/class-give-tools-recount-all-stats.php:239, includes/admin/tools/data/class-give-tools-recount-donor-stats.php:195, includes/admin/tools/data/class-give-tools-recount-form-stats.php:182, includes/admin/tools/data/class-give-tools-recount-income.php:156, includes/admin/tools/data/class-give-tools-recount-single-donor-stats.php:151, includes/admin/tools/data/class-give-tools-reset-stats.php:189, includes/admin/tools/export/class-batch-export.php:145, includes/admin/tools/export/class-core-settings-export.php:68, includes/admin/tools/export/class-export.php:173, includes/admin/tools/export/export-actions.php:26, includes/admin/tools/export/pdf-reports.php:31, includes/admin/tools/export/pdf-reports.php:35, includes/admin/tools/export/pdf-reports.php:39, includes/admin/tools/logs/class-api-requests-logs-list-table.php:154, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:136, includes/admin/upgrades/upgrade-functions.php:331, includes/admin/upgrades/upgrade-functions.php:369, includes/api/class-give-api.php:1821, includes/api/class-give-api.php:1827, includes/api/class-give-api.php:1842, includes/api/class-give-api.php:1847, includes/class-give-license-handler.php:832, includes/class-notices.php:576, includes/formatting.php:681, includes/forms/functions.php:319, includes/gateways/manual.php:38
|
1205 |
msgid "Error"
|
1206 |
msgstr ""
|
1207 |
|
1459 |
msgid "Amount"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
+
#: includes/admin/donors/donors.php:781, includes/admin/forms/dashboard-columns.php:43, includes/admin/payments/class-payments-table.php:390, includes/admin/tools/export/class-batch-export-payments.php:59, includes/admin/tools/export/class-export-earnings.php:60, includes/admin/tools/export/class-export.php:69, includes/admin/tools/logs/class-api-requests-logs-list-table.php:96, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:139, includes/admin/tools/logs/class-sales-logs-list-table.php:142, includes/admin/tools/logs/class-update-logs-list-table.php:80, includes/import-functions.php:380, templates/history-donations.php:51, templates/shortcode-receipt.php:44
|
1463 |
msgid "Date"
|
1464 |
msgstr ""
|
1465 |
|
1539 |
msgid "Download Receipt"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
+
#: includes/admin/emails/abstract-email-notification.php:845, includes/emails/class-give-email-tags.php:1223
|
1543 |
msgid "View your donation history »"
|
1544 |
msgstr ""
|
1545 |
|
1552 |
msgstr ""
|
1553 |
|
1554 |
#: includes/admin/emails/class-donor-register-email.php:36
|
1555 |
+
msgid "User Registration Information"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
#: includes/admin/emails/class-donor-register-email.php:37
|
1579 |
msgid "Click Here to Login »"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
+
#: includes/admin/emails/class-donor-register-email.php:101, includes/admin/emails/class-new-donor-register-email.php:36, includes/admin/emails/class-new-donor-register-email.php:98
|
1583 |
+
msgid "New User Registration"
|
1584 |
+
msgstr ""
|
1585 |
+
|
1586 |
+
#: includes/admin/emails/class-donor-register-email.php:150, includes/admin/emails/class-new-donor-register-email.php:147
|
1587 |
msgid "No donor(s) found."
|
1588 |
msgstr ""
|
1589 |
|
1590 |
+
#: includes/admin/emails/class-donor-register-email.php:154, includes/admin/emails/class-new-donor-register-email.php:151
|
1591 |
msgid "- Select a donor -"
|
1592 |
msgstr ""
|
1593 |
|
1594 |
+
#: includes/admin/emails/class-donor-register-email.php:188, includes/admin/emails/class-new-donor-register-email.php:201
|
1595 |
msgid "Preview email with a donor:"
|
1596 |
msgstr ""
|
1597 |
|
1659 |
msgid "Plain"
|
1660 |
msgstr ""
|
1661 |
|
1662 |
+
#: includes/admin/emails/class-email-notifications.php:121
|
1663 |
+
msgid "Email Notifications"
|
1664 |
msgstr ""
|
1665 |
|
1666 |
+
#: includes/admin/emails/class-email-notifications.php:125
|
1667 |
msgid "Email Options"
|
1668 |
msgstr ""
|
1669 |
|
1670 |
+
#: includes/admin/emails/class-email-notifications.php:126
|
1671 |
msgid ""
|
1672 |
msgstr ""
|
1673 |
|
1674 |
+
#: includes/admin/emails/class-email-notifications.php:132, includes/admin/emails/class-email-setting-field.php:178, includes/admin/forms/class-metabox-form-data.php:494, includes/gateways/offline-donations.php:309
|
1675 |
msgid "Customize"
|
1676 |
msgstr ""
|
1677 |
|
1678 |
+
#: includes/admin/emails/class-email-notifications.php:138, includes/admin/settings/class-settings-email.php:77
|
1679 |
msgid "Choose your template from the available registered template types."
|
1680 |
msgstr ""
|
1681 |
|
1682 |
+
#: includes/admin/emails/class-email-notifications.php:152, includes/admin/settings/class-settings-email.php:90
|
1683 |
msgid "The name which appears in the \"From\" field in all Give donation emails."
|
1684 |
msgstr ""
|
1685 |
|
1686 |
+
#: includes/admin/emails/class-email-notifications.php:159, includes/admin/settings/class-settings-email.php:97
|
1687 |
msgid "Email address from which all Give emails are sent from. This will act as the \"from\" and \"reply-to\" email address."
|
1688 |
msgstr ""
|
1689 |
|
1690 |
+
#: includes/admin/emails/class-email-notifications.php:167
|
1691 |
+
msgid "Email Notification"
|
1692 |
+
msgstr ""
|
1693 |
+
|
1694 |
+
#: includes/admin/emails/class-email-setting-field.php:168, includes/admin/forms/class-metabox-form-data.php:149, includes/admin/forms/class-metabox-form-data.php:284, includes/admin/forms/class-metabox-form-data.php:309, includes/admin/forms/class-metabox-form-data.php:342, includes/admin/forms/class-metabox-form-data.php:400, includes/admin/forms/class-metabox-form-data.php:440, includes/admin/settings/class-settings-advanced.php:83, includes/admin/settings/class-settings-advanced.php:105, includes/admin/settings/class-settings-advanced.php:138, includes/admin/settings/class-settings-display.php:62, includes/admin/settings/class-settings-display.php:79, includes/admin/settings/class-settings-display.php:96, includes/admin/settings/class-settings-display.php:127, includes/admin/settings/class-settings-display.php:143, includes/admin/settings/class-settings-display.php:154, includes/admin/settings/class-settings-display.php:165, includes/admin/settings/class-settings-display.php:184, includes/admin/settings/class-settings-display.php:215, includes/admin/settings/class-settings-display.php:226, includes/admin/settings/class-settings-display.php:257, includes/admin/settings/class-settings-gateways.php:85, includes/admin/settings/class-settings-gateways.php:96, includes/admin/settings/class-settings-gateways.php:128, includes/admin/settings/class-settings-gateways.php:170, includes/admin/settings/class-settings-general.php:86, includes/admin/tools/import/class-give-import-donations.php:763, includes/admin/tools/import/class-give-import-donations.php:774, includes/admin/tools/import/class-give-import-donations.php:785, includes/admin/tools/views/html-admin-page-system-info.php:452, includes/admin/tools/views/html-admin-page-system-info.php:493, includes/admin/tools/views/html-admin-page-system-info.php:530, includes/admin/tools/views/html-admin-page-system-info.php:608, includes/admin/tools/views/html-admin-page-system-info.php:640, includes/admin/tools/views/html-admin-page-system-info.php:655, includes/admin/tools/views/html-admin-page-system-info.php:660, includes/admin/tools/views/html-admin-page-system-info.php:681, includes/admin/tools/views/html-admin-page-system-info.php:686, includes/gateways/offline-donations.php:322
|
1695 |
msgid "Enabled"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
+
#: includes/admin/emails/class-email-setting-field.php:169, includes/admin/emails/class-email-setting-field.php:179, includes/admin/forms/class-metabox-form-data.php:150, includes/admin/forms/class-metabox-form-data.php:285, includes/admin/forms/class-metabox-form-data.php:310, includes/admin/forms/class-metabox-form-data.php:343, includes/admin/forms/class-metabox-form-data.php:401, includes/admin/forms/class-metabox-form-data.php:441, includes/admin/settings/class-settings-advanced.php:84, includes/admin/settings/class-settings-advanced.php:106, includes/admin/settings/class-settings-advanced.php:139, includes/admin/settings/class-settings-display.php:63, includes/admin/settings/class-settings-display.php:80, includes/admin/settings/class-settings-display.php:97, includes/admin/settings/class-settings-display.php:128, includes/admin/settings/class-settings-display.php:144, includes/admin/settings/class-settings-display.php:155, includes/admin/settings/class-settings-display.php:166, includes/admin/settings/class-settings-display.php:185, includes/admin/settings/class-settings-display.php:216, includes/admin/settings/class-settings-display.php:227, includes/admin/settings/class-settings-display.php:258, includes/admin/settings/class-settings-gateways.php:86, includes/admin/settings/class-settings-gateways.php:97, includes/admin/settings/class-settings-gateways.php:129, includes/admin/settings/class-settings-gateways.php:171, includes/admin/settings/class-settings-general.php:87, includes/admin/tools/import/class-give-import-donations.php:764, includes/admin/tools/import/class-give-import-donations.php:775, includes/admin/tools/import/class-give-import-donations.php:786, includes/admin/tools/views/html-admin-page-system-info.php:452, includes/admin/tools/views/html-admin-page-system-info.php:493, includes/admin/tools/views/html-admin-page-system-info.php:530, includes/admin/tools/views/html-admin-page-system-info.php:608, includes/admin/tools/views/html-admin-page-system-info.php:640, includes/admin/tools/views/html-admin-page-system-info.php:655, includes/admin/tools/views/html-admin-page-system-info.php:660, includes/admin/tools/views/html-admin-page-system-info.php:681, includes/admin/tools/views/html-admin-page-system-info.php:686, includes/gateways/offline-donations.php:323
|
1699 |
msgid "Disabled"
|
1700 |
msgstr ""
|
1701 |
|
1779 |
msgid "New Donation!"
|
1780 |
msgstr ""
|
1781 |
|
|
|
|
|
|
|
|
|
1782 |
#: includes/admin/emails/class-new-donor-register-email.php:37
|
1783 |
+
msgid "Sent to designated recipient(s) when a new user registers on the site via a donation form."
|
1784 |
msgstr ""
|
1785 |
|
1786 |
#: includes/admin/emails/class-new-donor-register-email.php:45
|
2235 |
msgid "Error creating new donor."
|
2236 |
msgstr ""
|
2237 |
|
2238 |
+
#: includes/admin/payments/class-payments-table.php:164, includes/admin/tools/logs/logs.php:195
|
2239 |
msgid "Search"
|
2240 |
msgstr ""
|
2241 |
|
2247 |
msgid "End Date"
|
2248 |
msgstr ""
|
2249 |
|
2250 |
+
#: includes/admin/payments/class-payments-table.php:210, includes/admin/tools/logs/logs.php:243
|
2251 |
msgid "Apply"
|
2252 |
msgstr ""
|
2253 |
|
2423 |
msgid "Donation %s"
|
2424 |
msgstr ""
|
2425 |
|
2426 |
+
#: includes/admin/payments/view-payment-details.php:70, includes/admin/tools/views/html-admin-page-system-info.php:583, includes/gateways/functions.php:31, includes/gateways/functions.php:32, includes/gateways/functions.php:132, includes/gateways/functions.php:153
|
2427 |
msgid "Test Donation"
|
2428 |
msgstr ""
|
2429 |
|
2931 |
msgid "This option will enable the billing details section for PayPal Standard which requires the donor's address to complete the donation. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data."
|
2932 |
msgstr ""
|
2933 |
|
2934 |
+
#: includes/admin/settings/class-settings-gateways.php:90, includes/admin/tools/views/html-admin-page-system-info.php:606
|
2935 |
msgid "PayPal IPN Verification"
|
2936 |
msgstr ""
|
2937 |
|
2979 |
msgid "Access Control Docs Link"
|
2980 |
msgstr ""
|
2981 |
|
2982 |
+
#: includes/admin/settings/class-settings-general.php:163
|
2983 |
msgid "The symbol (typically , or .) to separate thousands."
|
2984 |
msgstr ""
|
2985 |
|
2986 |
+
#: includes/admin/settings/class-settings-general.php:186
|
2987 |
msgid "Currency Options Docs Link"
|
2988 |
msgstr ""
|
2989 |
|
2990 |
+
#: includes/admin/settings/class-settings-general.php:268
|
2991 |
msgid "Base State/Province"
|
2992 |
msgstr ""
|
2993 |
|
2994 |
+
#: includes/admin/settings/class-settings-general.php:269
|
2995 |
msgid "The state/province your site operates from."
|
2996 |
msgstr ""
|
2997 |
|
2998 |
+
#: includes/admin/settings/class-settings-general.php:275
|
2999 |
msgid "General Options Docs Link"
|
3000 |
msgstr ""
|
3001 |
|
3002 |
+
#: includes/admin/settings/class-settings-general.php:278
|
3003 |
msgid "General Options"
|
3004 |
msgstr ""
|
3005 |
|
3207 |
msgid "API Requests"
|
3208 |
msgstr ""
|
3209 |
|
3210 |
+
#: includes/admin/tools/class-settings-logs.php:96, includes/admin/upgrades/class-give-updates.php:259, includes/admin/upgrades/class-give-updates.php:277
|
3211 |
+
msgid "Updates"
|
3212 |
+
msgstr ""
|
3213 |
+
|
3214 |
#: includes/admin/tools/data/class-give-tools-delete-import-donors.php:257
|
3215 |
msgid "You do not have permission to delete Import transactions."
|
3216 |
msgstr ""
|
3516 |
msgstr ""
|
3517 |
|
3518 |
#: includes/admin/tools/import/class-give-import-core-settings.php:350
|
3519 |
+
msgid "This tool allows you to import Give settings from another Give installation. Settings imported contain data from Give core as well as any of our Premium Add-ons."
|
3520 |
+
msgstr ""
|
3521 |
+
|
3522 |
+
#: includes/admin/tools/import/class-give-import-core-settings.php:356
|
3523 |
+
msgid "Choose a JSON file:"
|
3524 |
+
msgstr ""
|
3525 |
+
|
3526 |
+
#: includes/admin/tools/import/class-give-import-core-settings.php:363
|
3527 |
+
msgid "The file type must be JSON."
|
3528 |
msgstr ""
|
3529 |
|
3530 |
#: includes/admin/tools/import/class-give-import-core-settings.php:372
|
3532 |
msgstr ""
|
3533 |
|
3534 |
#: includes/admin/tools/import/class-give-import-core-settings.php:373
|
3535 |
+
msgid "Select \"Merge\" to retain existing settings, or \"Replace\" to overwrite with the settings from the JSON file"
|
3536 |
msgstr ""
|
3537 |
|
3538 |
#: includes/admin/tools/import/class-give-import-core-settings.php:377
|
3729 |
msgid "Please upload or provide a valid CSV file."
|
3730 |
msgstr ""
|
3731 |
|
3732 |
+
#: includes/admin/tools/logs/class-api-requests-logs-list-table.php:94, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:135, includes/admin/tools/logs/class-sales-logs-list-table.php:137, includes/admin/tools/logs/class-update-logs-list-table.php:79
|
3733 |
msgid "Log ID"
|
3734 |
msgstr ""
|
3735 |
|
3781 |
msgid "Donation Amount"
|
3782 |
msgstr ""
|
3783 |
|
3784 |
+
#: includes/admin/tools/logs/class-update-logs-list-table.php:81
|
3785 |
+
msgid "Process Details"
|
3786 |
+
msgstr ""
|
3787 |
+
|
3788 |
+
#: includes/admin/tools/logs/class-update-logs-list-table.php:124
|
3789 |
+
msgid "View Update Log"
|
3790 |
+
msgstr ""
|
3791 |
+
|
3792 |
#: includes/admin/tools/views/html-admin-page-data.php:24
|
3793 |
msgid "Recount Stats"
|
3794 |
msgstr ""
|
4106 |
msgstr ""
|
4107 |
|
4108 |
#: includes/admin/tools/views/html-admin-page-system-info.php:140
|
4109 |
+
msgid "Table Prefix"
|
4110 |
msgstr ""
|
4111 |
|
4112 |
#: includes/admin/tools/views/html-admin-page-system-info.php:141
|
4113 |
+
msgid "The table prefix used in your WordPress database."
|
4114 |
msgstr ""
|
4115 |
|
4116 |
#: includes/admin/tools/views/html-admin-page-system-info.php:145
|
4117 |
+
msgid "Table Prefix Length"
|
4118 |
msgstr ""
|
4119 |
|
4120 |
#: includes/admin/tools/views/html-admin-page-system-info.php:146
|
4121 |
+
msgid "The length of the table prefix used in your WordPress database."
|
4122 |
msgstr ""
|
4123 |
|
4124 |
#: includes/admin/tools/views/html-admin-page-system-info.php:150
|
4125 |
+
msgid "Table Prefix Status"
|
4126 |
msgstr ""
|
4127 |
|
4128 |
#: includes/admin/tools/views/html-admin-page-system-info.php:151
|
4129 |
+
msgid "The status of the table prefix used in your WordPress database."
|
4130 |
+
msgstr ""
|
4131 |
+
|
4132 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:155
|
4133 |
+
msgid "Admin AJAX"
|
4134 |
+
msgstr ""
|
4135 |
+
|
4136 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:156
|
4137 |
msgid "Whether Admin AJAX is accessible."
|
4138 |
msgstr ""
|
4139 |
|
4140 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:157
|
4141 |
msgid "Accessible"
|
4142 |
msgstr ""
|
4143 |
|
4144 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:157
|
4145 |
msgid "Inaccessible"
|
4146 |
msgstr ""
|
4147 |
|
4148 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:160
|
4149 |
msgid "Registered Post Statuses"
|
4150 |
msgstr ""
|
4151 |
|
4152 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:161
|
4153 |
msgid "A list of all registered post statuses."
|
4154 |
msgstr ""
|
4155 |
|
4156 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:170
|
4157 |
msgid "Server Environment"
|
4158 |
msgstr ""
|
4159 |
|
4160 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:175
|
4161 |
msgid "Hosting Provider"
|
4162 |
msgstr ""
|
4163 |
|
4164 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:176
|
4165 |
msgid "The hosting provider for this WordPress installation."
|
4166 |
msgstr ""
|
4167 |
|
4168 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:177
|
4169 |
msgid "Unknown"
|
4170 |
msgstr ""
|
4171 |
|
4172 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:180
|
4173 |
msgid "TLS Connection"
|
4174 |
msgstr ""
|
4175 |
|
4176 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:181
|
4177 |
msgid "Most payment gateway APIs only support connections using the TLS 1.2 security protocol."
|
4178 |
msgstr ""
|
4179 |
|
4180 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:188
|
4181 |
msgid "Connection uses %s"
|
4182 |
msgstr ""
|
4183 |
|
4184 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:194
|
4185 |
msgid "TLS Rating"
|
4186 |
msgstr ""
|
4187 |
|
4188 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:195
|
4189 |
msgid "The server's connection as rated by https://www.howsmyssl.com/"
|
4190 |
msgstr ""
|
4191 |
|
4192 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:205
|
4193 |
msgid "Server Info"
|
4194 |
msgstr ""
|
4195 |
|
4196 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:206
|
4197 |
msgid "Information about the web server that is currently hosting your site."
|
4198 |
msgstr ""
|
4199 |
|
4200 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:210
|
4201 |
msgid "PHP Version"
|
4202 |
msgstr ""
|
4203 |
|
4204 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:211
|
4205 |
msgid "The version of PHP installed on your hosting server."
|
4206 |
msgstr ""
|
4207 |
|
4208 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:219
|
4209 |
msgid "%s - We recommend a minimum PHP version of 5.6. See: %s"
|
4210 |
msgstr ""
|
4211 |
|
4212 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:219
|
4213 |
msgid "PHP Requirements in Give"
|
4214 |
msgstr ""
|
4215 |
|
4216 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:224
|
4217 |
msgid "Couldn't determine PHP version because phpversion() doesn't exist."
|
4218 |
msgstr ""
|
4219 |
|
4220 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:230
|
4221 |
msgid "PHP Post Max Size"
|
4222 |
msgstr ""
|
4223 |
|
4224 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:231
|
4225 |
msgid "The largest filesize that can be contained in one post."
|
4226 |
msgstr ""
|
4227 |
|
4228 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:235
|
4229 |
msgid "PHP Time Limit"
|
4230 |
msgstr ""
|
4231 |
|
4232 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:236
|
4233 |
msgid "The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)."
|
4234 |
msgstr ""
|
4235 |
|
4236 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:240
|
4237 |
msgid "PHP Max Input Vars"
|
4238 |
msgstr ""
|
4239 |
|
4240 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:241
|
4241 |
msgid "The maximum number of variables your server can use for a single function to avoid overloads."
|
4242 |
msgstr ""
|
4243 |
|
4244 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:245
|
4245 |
msgid "PHP Max Upload Size"
|
4246 |
msgstr ""
|
4247 |
|
4248 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:246
|
4249 |
msgid "The largest filesize that can be uploaded to your WordPress installation."
|
4250 |
msgstr ""
|
4251 |
|
4252 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:250
|
4253 |
msgid "cURL Version"
|
4254 |
msgstr ""
|
4255 |
|
4256 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:251
|
4257 |
msgid "The version of cURL installed on your server."
|
4258 |
msgstr ""
|
4259 |
|
4260 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:258
|
4261 |
msgid "%s - We recommend a minimum cURL version of 7.40."
|
4262 |
msgstr ""
|
4263 |
|
4264 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:269
|
4265 |
msgid "SUHOSIN Installed"
|
4266 |
msgstr ""
|
4267 |
|
4268 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:270
|
4269 |
msgid "Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits."
|
4270 |
msgstr ""
|
4271 |
|
4272 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:283
|
4273 |
msgid "MySQL Version"
|
4274 |
msgstr ""
|
4275 |
|
4276 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:284
|
4277 |
msgid "The version of MySQL installed on your hosting server."
|
4278 |
msgstr ""
|
4279 |
|
4280 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:290
|
4281 |
msgid "%s - We recommend a minimum MySQL version of 5.6. See: %s"
|
4282 |
msgstr ""
|
4283 |
|
4284 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:290
|
4285 |
msgid "WordPress Requirements"
|
4286 |
msgstr ""
|
4287 |
|
4288 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:299
|
4289 |
msgid "Default Timezone is UTC"
|
4290 |
msgstr ""
|
4291 |
|
4292 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:300
|
4293 |
msgid "The default timezone for your server."
|
4294 |
msgstr ""
|
4295 |
|
4296 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:304
|
4297 |
msgid "Default timezone is %s - it should be UTC"
|
4298 |
msgstr ""
|
4299 |
|
4300 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:315
|
4301 |
msgid "Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services."
|
4302 |
msgstr ""
|
4303 |
|
4304 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:321
|
4305 |
msgid "Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider."
|
4306 |
msgstr ""
|
4307 |
|
4308 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:326
|
4309 |
msgid "Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed."
|
4310 |
msgstr ""
|
4311 |
|
4312 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:332
|
4313 |
msgid "Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected."
|
4314 |
msgstr ""
|
4315 |
|
4316 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:337
|
4317 |
msgid "HTML/Multipart emails use DOMDocument to generate inline CSS in templates."
|
4318 |
msgstr ""
|
4319 |
|
4320 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:343
|
4321 |
msgid "Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument."
|
4322 |
msgstr ""
|
4323 |
|
4324 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:348
|
4325 |
msgid "gzip is used for file compression and decompression."
|
4326 |
msgstr ""
|
4327 |
|
4328 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:354
|
4329 |
msgid "Your server does not support the %s function - this is used for file compression and decompression."
|
4330 |
msgstr ""
|
4331 |
|
4332 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:360
|
4333 |
msgid "GD Graphics Library is used for dynamically manipulating images."
|
4334 |
msgstr ""
|
4335 |
|
4336 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:365
|
4337 |
msgid "Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase."
|
4338 |
msgstr ""
|
4339 |
|
4340 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:371
|
4341 |
msgid "Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it."
|
4342 |
msgstr ""
|
4343 |
|
4344 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:375
|
4345 |
msgid "Remote Post"
|
4346 |
msgstr ""
|
4347 |
|
4348 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:376
|
4349 |
msgid "PayPal uses this method of communicating when sending back transaction information."
|
4350 |
msgstr ""
|
4351 |
|
4352 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:390
|
4353 |
msgid "wp_remote_post() failed. PayPal IPN won't work with your server. Contact your hosting provider."
|
4354 |
msgstr ""
|
4355 |
|
4356 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:392, includes/admin/tools/views/html-admin-page-system-info.php:410
|
4357 |
msgid "Error: %s"
|
4358 |
msgstr ""
|
4359 |
|
4360 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:394, includes/admin/tools/views/html-admin-page-system-info.php:412
|
4361 |
msgid "Status code: %s"
|
4362 |
msgstr ""
|
4363 |
|
4364 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:400
|
4365 |
msgid "Remote Get"
|
4366 |
msgstr ""
|
4367 |
|
4368 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:401
|
4369 |
msgid "Give plugins may use this method of communication when checking for plugin updates."
|
4370 |
msgstr ""
|
4371 |
|
4372 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:408
|
4373 |
msgid "wp_remote_get() failed. The Give plugin updater won't work with your server. Contact your hosting provider."
|
4374 |
msgstr ""
|
4375 |
|
4376 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:440
|
4377 |
msgid "Give Configuration"
|
4378 |
msgstr ""
|
4379 |
|
4380 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:445
|
4381 |
msgid "Give Version"
|
4382 |
msgstr ""
|
4383 |
|
4384 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:446
|
4385 |
msgid "The version of Give installed on your site."
|
4386 |
msgstr ""
|
4387 |
|
4388 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:450, includes/admin/tools/views/html-admin-page-system-info.php:491
|
4389 |
msgid "Give Cache"
|
4390 |
msgstr ""
|
4391 |
|
4392 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:451, includes/admin/tools/views/html-admin-page-system-info.php:492
|
4393 |
msgid "Whether cache is enabled in Give settings."
|
4394 |
msgstr ""
|
4395 |
|
4396 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:455, includes/admin/upgrades/views/upgrades.php:39
|
4397 |
msgid "Database Updates"
|
4398 |
msgstr ""
|
4399 |
|
4400 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:456
|
4401 |
msgid "This will show the number of pending database updates."
|
4402 |
msgstr ""
|
4403 |
|
4404 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:459
|
4405 |
msgid "All DB Updates Completed."
|
4406 |
msgstr ""
|
4407 |
|
4408 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:466
|
4409 |
+
msgid "%1$s updates still need to run. (Paused) "
|
4410 |
+
msgstr ""
|
4411 |
+
|
4412 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:473
|
4413 |
msgid "%1$s updates still need to run."
|
4414 |
msgstr ""
|
4415 |
|
4416 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:480
|
4417 |
msgid "%1$s of %2$s updates still need to run."
|
4418 |
msgstr ""
|
4419 |
|
4420 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:496
|
4421 |
msgid "Give Emails"
|
4422 |
msgstr ""
|
4423 |
|
4424 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:497
|
4425 |
msgid "Whether emails is enabled in Give settings."
|
4426 |
msgstr ""
|
4427 |
|
4428 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:523
|
4429 |
msgid "Upgraded From"
|
4430 |
msgstr ""
|
4431 |
|
4432 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:524
|
4433 |
msgid "The version of Give installed prior to the last update."
|
4434 |
msgstr ""
|
4435 |
|
4436 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:529
|
4437 |
msgid "Whether Test Mode is enabled in Give settings."
|
4438 |
msgstr ""
|
4439 |
|
4440 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:533
|
4441 |
msgid "Currency Code"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:534
|
4445 |
msgid "The currency code selected in Give settings."
|
4446 |
msgstr ""
|
4447 |
|
4448 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:539
|
4449 |
msgid "The currency position selected in Give settings."
|
4450 |
msgstr ""
|
4451 |
|
4452 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:540
|
4453 |
msgid "Before"
|
4454 |
msgstr ""
|
4455 |
|
4456 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:540
|
4457 |
msgid "After"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:544
|
4461 |
msgid "The decimal separator defined in Give settings."
|
4462 |
msgstr ""
|
4463 |
|
4464 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:549
|
4465 |
msgid "The thousands separator defined in Give settings."
|
4466 |
msgstr ""
|
4467 |
|
4468 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:554
|
4469 |
msgid "The page where donors land following a successful transaction."
|
4470 |
msgstr ""
|
4471 |
|
4472 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:558
|
4473 |
msgid "Failure Page"
|
4474 |
msgstr ""
|
4475 |
|
4476 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:559
|
4477 |
msgid "The page where donors land following a failed transaction."
|
4478 |
msgstr ""
|
4479 |
|
4480 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:564
|
4481 |
msgid "The page where past donations are listed."
|
4482 |
msgstr ""
|
4483 |
|
4484 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:568
|
4485 |
msgid "Give Forms Slug"
|
4486 |
msgstr ""
|
4487 |
|
4488 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:569
|
4489 |
msgid "The slug used for Give donation forms."
|
4490 |
msgstr ""
|
4491 |
|
4492 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:596
|
4493 |
msgid "Enabled Payment Gateways"
|
4494 |
msgstr ""
|
4495 |
|
4496 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:597
|
4497 |
msgid "All payment gateways enabled in Give settings."
|
4498 |
msgstr ""
|
4499 |
|
4500 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:601
|
4501 |
msgid "Default Payment Gateway"
|
4502 |
msgstr ""
|
4503 |
|
4504 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:602
|
4505 |
msgid "The default payment gateway selected in Give settings."
|
4506 |
msgstr ""
|
4507 |
|
4508 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:607
|
4509 |
msgid "Whether admins requires verification of IPN notifications with PayPal."
|
4510 |
msgstr ""
|
4511 |
|
4512 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:611
|
4513 |
msgid "PayPal IPN Notifications"
|
4514 |
msgstr ""
|
4515 |
|
4516 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:612
|
4517 |
msgid "Displays whether when last PayPal IPN is received with which donation or transaction."
|
4518 |
msgstr ""
|
4519 |
|
4520 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:622
|
4521 |
msgid "IPN received for <a href=\"%s\">#%s</a> ( <a href=\"%s\" target=\"_blank\">%s</a> ) on %s at %s. Status %s"
|
4522 |
msgstr ""
|
4523 |
|
4524 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:638
|
4525 |
msgid "Donor Email Access"
|
4526 |
msgstr ""
|
4527 |
|
4528 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:639
|
4529 |
msgid "Whether donors can access their donation history using only email."
|
4530 |
msgstr ""
|
4531 |
|
4532 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:648
|
4533 |
msgid "Session Configuration"
|
4534 |
msgstr ""
|
4535 |
|
4536 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:653
|
4537 |
msgid "Give Use Sessions"
|
4538 |
msgstr ""
|
4539 |
|
4540 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:654
|
4541 |
msgid "Whether PHP sessions are enforced, enabled, or disabled."
|
4542 |
msgstr ""
|
4543 |
|
4544 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:655
|
4545 |
msgid "Enforced"
|
4546 |
msgstr ""
|
4547 |
|
4548 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:658
|
4549 |
msgid "Session"
|
4550 |
msgstr ""
|
4551 |
|
4552 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:659
|
4553 |
msgid "Whether a PHP session is currently set."
|
4554 |
msgstr ""
|
4555 |
|
4556 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:664
|
4557 |
msgid "Session Name"
|
4558 |
msgstr ""
|
4559 |
|
4560 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:665
|
4561 |
msgid "The name of the current PHP session."
|
4562 |
msgstr ""
|
4563 |
|
4564 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:669
|
4565 |
msgid "Cookie Path"
|
4566 |
msgstr ""
|
4567 |
|
4568 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:670
|
4569 |
msgid "The cookie path of the current PHP session."
|
4570 |
msgstr ""
|
4571 |
|
4572 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:674
|
4573 |
msgid "Save Path"
|
4574 |
msgstr ""
|
4575 |
|
4576 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:675
|
4577 |
msgid "The save path of the current PHP session."
|
4578 |
msgstr ""
|
4579 |
|
4580 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:679
|
4581 |
msgid "Use Cookies"
|
4582 |
msgstr ""
|
4583 |
|
4584 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:680
|
4585 |
msgid "Whether the current PHP session is set to use cookies."
|
4586 |
msgstr ""
|
4587 |
|
4588 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:684
|
4589 |
msgid "Use Only Cookies"
|
4590 |
msgstr ""
|
4591 |
|
4592 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:685
|
4593 |
msgid "Whether the current PHP session is set to use only cookies."
|
4594 |
msgstr ""
|
4595 |
|
4596 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:695
|
4597 |
msgid "Active Give Add-ons"
|
4598 |
msgstr ""
|
4599 |
|
4600 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:713, includes/admin/tools/views/html-admin-page-system-info.php:778, includes/admin/tools/views/html-admin-page-system-info.php:825, includes/admin/tools/views/html-admin-page-system-info.php:873, includes/admin/upgrades/views/plugins-update-section.php:22
|
4601 |
msgid "Visit plugin homepage"
|
4602 |
msgstr ""
|
4603 |
|
4604 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:723, includes/admin/tools/views/html-admin-page-system-info.php:788, includes/admin/tools/views/html-admin-page-system-info.php:835, includes/admin/upgrades/views/plugins-update-section.php:33
|
4605 |
msgid "Visit author homepage"
|
4606 |
msgstr ""
|
4607 |
|
4608 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:734, includes/admin/upgrades/views/plugins-update-section.php:42
|
4609 |
msgid "Licensed"
|
4610 |
msgstr ""
|
4611 |
|
4612 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:736, includes/admin/upgrades/views/plugins-update-section.php:42
|
4613 |
msgid "Unlicensed"
|
4614 |
msgstr ""
|
4615 |
|
4616 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:740, includes/admin/tools/views/html-admin-page-system-info.php:796, includes/admin/tools/views/html-admin-page-system-info.php:843, includes/admin/tools/views/html-admin-page-system-info.php:892, includes/admin/upgrades/views/plugins-update-section.php:46
|
4617 |
msgctxt "by author"
|
4618 |
msgid "by %s"
|
4619 |
msgstr ""
|
4620 |
|
4621 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:755
|
4622 |
msgid "Other Active Plugins"
|
4623 |
msgstr ""
|
4624 |
|
4625 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:807
|
4626 |
msgid "Inactive Plugins"
|
4627 |
msgstr ""
|
4628 |
|
4629 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:858
|
4630 |
msgid "Active MU Plugins"
|
4631 |
msgstr ""
|
4632 |
|
4633 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:905
|
4634 |
msgid "Theme"
|
4635 |
msgstr ""
|
4636 |
|
4637 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:915
|
4638 |
msgid "The name of the current active theme."
|
4639 |
msgstr ""
|
4640 |
|
4641 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:919
|
4642 |
msgid "Version"
|
4643 |
msgstr ""
|
4644 |
|
4645 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:920
|
4646 |
msgid "The installed version of the current active theme."
|
4647 |
msgstr ""
|
4648 |
|
4649 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:924
|
4650 |
msgid "Author URL"
|
4651 |
msgstr ""
|
4652 |
|
4653 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:925
|
4654 |
msgid "The theme developer's URL."
|
4655 |
msgstr ""
|
4656 |
|
4657 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:929
|
4658 |
msgid "Child Theme"
|
4659 |
msgstr ""
|
4660 |
|
4661 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:930
|
4662 |
msgid "Whether the current theme is a child theme."
|
4663 |
msgstr ""
|
4664 |
|
4665 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:932, includes/class-give-cli-commands.php:138, includes/forms/widget.php:181
|
4666 |
msgid "Yes"
|
4667 |
msgstr ""
|
4668 |
|
4669 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:932, includes/class-give-cli-commands.php:138, includes/forms/widget.php:182
|
4670 |
msgid "No"
|
4671 |
msgstr ""
|
4672 |
|
4673 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:932
|
4674 |
msgid "If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: <a href=\"%s\" target=\"_blank\">How to Create a Child Theme</a>"
|
4675 |
msgstr ""
|
4676 |
|
4677 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:940
|
4678 |
msgid "Parent Theme Name"
|
4679 |
msgstr ""
|
4680 |
|
4681 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:941
|
4682 |
msgid "The name of the parent theme."
|
4683 |
msgstr ""
|
4684 |
|
4685 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:945
|
4686 |
msgid "Parent Theme Version"
|
4687 |
msgstr ""
|
4688 |
|
4689 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:946
|
4690 |
msgid "The installed version of the parent theme."
|
4691 |
msgstr ""
|
4692 |
|
4693 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:950
|
4694 |
msgid "Parent Theme Author URL"
|
4695 |
msgstr ""
|
4696 |
|
4697 |
+
#: includes/admin/tools/views/html-admin-page-system-info.php:951
|
4698 |
msgid "The parent theme developers URL."
|
4699 |
msgstr ""
|
4700 |
|
4701 |
+
#: includes/admin/upgrades/class-give-updates.php:258
|
4702 |
msgid "Give Updates Complete"
|
4703 |
msgstr ""
|
4704 |
|
4705 |
+
#: includes/admin/upgrades/class-give-updates.php:274
|
4706 |
+
msgid "Give Updates"
|
4707 |
msgstr ""
|
4708 |
|
4709 |
+
#: includes/admin/upgrades/class-give-updates.php:506, includes/admin/upgrades/class-give-updates.php:568
|
4710 |
+
msgid "Database Update"
|
4711 |
msgstr ""
|
4712 |
|
4713 |
+
#: includes/admin/upgrades/class-give-updates.php:507
|
4714 |
+
msgid "GiveWP needs to update your database to the latest version. The following process will make updates to your site's database. Please create a backup before proceeding."
|
4715 |
msgstr ""
|
4716 |
|
4717 |
+
#: includes/admin/upgrades/class-give-updates.php:511
|
4718 |
+
msgid "Restart the updater"
|
4719 |
msgstr ""
|
4720 |
|
4721 |
+
#: includes/admin/upgrades/class-give-updates.php:516, includes/admin/upgrades/class-give-updates.php:578
|
4722 |
+
msgid "It is recommended that you backup your database before proceeding. Do you want to run the update now?"
|
4723 |
+
msgstr ""
|
4724 |
+
|
4725 |
+
#: includes/admin/upgrades/class-give-updates.php:542
|
4726 |
+
msgid "Give needs to upgrade the database but cannot because AJAX does not appear accessible. This could be because your website is password protected, in maintenance mode, or has a specific hosting configuration or plugin active that is preventing access."
|
4727 |
msgstr ""
|
4728 |
|
4729 |
+
#: includes/admin/upgrades/class-give-updates.php:542
|
4730 |
+
msgid "Read More"
|
4731 |
+
msgstr ""
|
4732 |
+
|
4733 |
+
#: includes/admin/upgrades/class-give-updates.php:555, includes/admin/upgrades/class-give-updates.php:706
|
4734 |
+
msgid "Give database updates completed successfully. Thank you for updating to the latest version!"
|
4735 |
+
msgstr ""
|
4736 |
+
|
4737 |
+
#: includes/admin/upgrades/class-give-updates.php:569
|
4738 |
msgid "GiveWP needs to update your database to the latest version. The following process will make updates to your site's database. Please create a complete backup before proceeding."
|
4739 |
msgstr ""
|
4740 |
|
4741 |
+
#: includes/admin/upgrades/class-give-updates.php:573
|
4742 |
+
msgid "Run the updater"
|
4743 |
msgstr ""
|
4744 |
|
4745 |
+
#: includes/admin/upgrades/class-give-updates.php:707
|
4746 |
msgid "Updates Completed."
|
4747 |
msgstr ""
|
4748 |
|
4749 |
+
#: includes/admin/upgrades/upgrade-functions.php:331, includes/admin/upgrades/upgrade-functions.php:369
|
4750 |
msgid "You do not have permission to do Give upgrades."
|
4751 |
msgstr ""
|
4752 |
|
4770 |
msgid "Give regularly receives new features, bug fixes, and enhancements. It is important to always stay up-to-date with latest version of Give core and its add-ons. Please create a backup of your site before updating. To update add-ons be sure your <a href=\"%1$s\">license keys</a> are activated."
|
4771 |
msgstr ""
|
4772 |
|
4773 |
+
#: includes/admin/upgrades/views/upgrades.php:45
|
4774 |
msgid "%1$s <a href=\"%2$s\" class=\"%3$s\">%4$s</a>"
|
4775 |
msgstr ""
|
4776 |
|
4777 |
+
#: includes/admin/upgrades/views/upgrades.php:47
|
4778 |
msgid "Give is currently updating the database in the background."
|
4779 |
msgstr ""
|
4780 |
|
4781 |
+
#: includes/admin/upgrades/views/upgrades.php:48
|
4782 |
msgid "Give needs to update the database."
|
4783 |
msgstr ""
|
4784 |
|
4785 |
+
#: includes/admin/upgrades/views/upgrades.php:51
|
4786 |
msgid "Update now"
|
4787 |
msgstr ""
|
4788 |
|
4789 |
+
#: includes/admin/upgrades/views/upgrades.php:56
|
4790 |
+
msgid "The updates have been paused."
|
4791 |
+
msgstr ""
|
4792 |
+
|
4793 |
#: includes/admin/upgrades/views/upgrades.php:60
|
4794 |
+
msgid "Restart Upgrades"
|
4795 |
+
msgstr ""
|
4796 |
+
|
4797 |
+
#: includes/admin/upgrades/views/upgrades.php:62
|
4798 |
+
msgid "Pause Upgrades"
|
4799 |
+
msgstr ""
|
4800 |
+
|
4801 |
+
#: includes/admin/upgrades/views/upgrades.php:70
|
4802 |
+
msgid "Do you want to stop the update process now?"
|
4803 |
+
msgstr ""
|
4804 |
+
|
4805 |
+
#: includes/admin/upgrades/views/upgrades.php:78
|
4806 |
+
msgid "Do you want to restart the update process?"
|
4807 |
+
msgstr ""
|
4808 |
+
|
4809 |
+
#: includes/admin/upgrades/views/upgrades.php:90
|
4810 |
msgid "Update %s of %s"
|
4811 |
msgstr ""
|
4812 |
|
4813 |
+
#: includes/admin/upgrades/views/upgrades.php:131
|
4814 |
msgid "Add-on Updates"
|
4815 |
msgstr ""
|
4816 |
|
4817 |
+
#: includes/admin/upgrades/views/upgrades.php:134
|
4818 |
msgid "There %1$s %2$s Give %3$s that %4$s to be updated. <a href=\"%5$s\">Update now</a>"
|
4819 |
msgstr ""
|
4820 |
|
4821 |
+
#: includes/admin/upgrades/views/upgrades.php:134
|
4822 |
msgid "is"
|
4823 |
msgid_plural "are"
|
4824 |
msgstr[0] ""
|
4825 |
msgstr[1] ""
|
4826 |
|
4827 |
+
#: includes/admin/upgrades/views/upgrades.php:134
|
4828 |
msgid "add-on"
|
4829 |
msgid_plural "add-ons"
|
4830 |
msgstr[0] ""
|
4831 |
msgstr[1] ""
|
4832 |
|
4833 |
+
#: includes/admin/upgrades/views/upgrades.php:134
|
4834 |
msgid "needs"
|
4835 |
msgid_plural "need"
|
4836 |
msgstr[0] ""
|
9706 |
msgid "The reset password link for user."
|
9707 |
msgstr ""
|
9708 |
|
9709 |
+
#: includes/emails/class-give-email-tags.php:1090
|
9710 |
msgid "View it in your browser »"
|
9711 |
msgstr ""
|
9712 |
|
9713 |
+
#: includes/emails/class-give-email-tags.php:1230
|
9714 |
msgid "View your donation history"
|
9715 |
msgstr ""
|
9716 |
|
9717 |
+
#: includes/emails/class-give-email-tags.php:1323
|
9718 |
msgid "Reset your password »"
|
9719 |
msgstr ""
|
9720 |
|
9721 |
+
#: includes/emails/class-give-email-tags.php:1328
|
9722 |
msgid "Reset your password"
|
9723 |
msgstr ""
|
9724 |
|
10462 |
msgid "Status changed from %1$s to %2$s."
|
10463 |
msgstr ""
|
10464 |
|
10465 |
+
#: includes/payments/class-give-payment.php:743
|
10466 |
+
msgid "This custom meta key deprecated. We are not using this meta key for storing payment meta but your custom meta data will be store because we added backward compatibility. Please change your logic because in future we can remove it."
|
10467 |
+
msgstr ""
|
10468 |
+
|
10469 |
#: includes/payments/functions.php:529
|
10470 |
msgid "Complete"
|
10471 |
msgstr ""
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: donation, donations, donation plugin, wordpress donation plugin, wp donati
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 4.9
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 2.0.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -208,6 +208,17 @@ Use Give for donations, and let WooCommerce or WP eCommerce or the like handle y
|
|
208 |
|
209 |
== Changelog ==
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
= 2.0.0: January 17th, 2018 =
|
212 |
* New: We have refactored how Give stores data so it's much more scalable now. This means implementing custom tables and our own database schema. We've worked hard to ensure the upgrade routine works without an issue but be sure to make a backup just in case. [How to Prepare Your WordPress Site for Give 2.0](https://givewp.com/prepare-for-give-2-0/), [#1132](https://github.com/WordImpress/Give/issues/1132), [#1148](https://github.com/WordImpress/Give/issues/1148)
|
213 |
* New: The email system within Give has been revamped so it's easier to toggle on or off and customize the various notifications all via one interface. [#1346](https://github.com/WordImpress/Give/issues/1346)
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 4.9
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 2.0.1
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
208 |
|
209 |
== Changelog ==
|
210 |
|
211 |
+
= 2.0.1: January 25th, 2018 =
|
212 |
+
* This update requires a number of health checks for the 2.0.0 release. For a post reflection on the Give 2.0.0 release and additional developer information on the 2.0.1 release please read the [Give 2.0.1 checklist](https://github.com/WordImpress/Give/issues/2695) as well as [Give 2.0 Release Reflection](http://docs.givewp.com/2-0-release-reflection).
|
213 |
+
* New: Added the database table prefix to the system info settings. [#2678](https://github.com/WordImpress/Give/issues/2678)
|
214 |
+
* UI/UX: Added an email icon to the per form emails tab. [#2680](https://github.com/WordImpress/Give/issues/2680)
|
215 |
+
* UI/UX: Revised field descriptions for the donations importer. [#2688](https://github.com/WordImpress/Give/issues/2688)
|
216 |
+
* Fix: If an issue with an upgrade progress happens there is now a pause and restart functionality built in. It is not recommended that you actually use the pause feature inless you're absolutely positive there was an issue with the update. [#2676](https://github.com/WordImpress/Give/issues/2676), [#2971](https://github.com/WordImpress/Give/issues/2671)
|
217 |
+
* Fix: The {billing_address} tag was displaying blank on PDF receipts. [#2707](https://github.com/WordImpress/Give/issues/2707)
|
218 |
+
* Fix: Updating the Currency Position resulted to a confusing user experience unless you saved it. [#2667](https://github.com/WordImpress/Give/issues/2667)
|
219 |
+
* Fix: View all donations link on the donation forms list screen wasn't properly redirecting to the filtered results. [#2683](https://github.com/WordImpress/Give/issues/2683)
|
220 |
+
* Fix: MySQL error aftering updating Email Preview on Windows 64-bit OS. There was also a database error on the donations list page in the backend on Windows 64-bit OS. [#2677](https://github.com/WordImpress/Give/issues/2677), [#2677](https://github.com/WordImpress/Give/issues/2677)
|
221 |
+
|
222 |
= 2.0.0: January 17th, 2018 =
|
223 |
* New: We have refactored how Give stores data so it's much more scalable now. This means implementing custom tables and our own database schema. We've worked hard to ensure the upgrade routine works without an issue but be sure to make a backup just in case. [How to Prepare Your WordPress Site for Give 2.0](https://givewp.com/prepare-for-give-2-0/), [#1132](https://github.com/WordImpress/Give/issues/1132), [#1148](https://github.com/WordImpress/Give/issues/1148)
|
224 |
* New: The email system within Give has been revamped so it's easier to toggle on or off and customize the various notifications all via one interface. [#1346](https://github.com/WordImpress/Give/issues/1346)
|