Plugin Directory

Changeset 2286386


Ignore:
Timestamp:
04/18/2020 02:58:19 PM (6 years ago)
Author:
customdonations
Message:

Improve interval parameter processing, minor adjustments to settings page.

Location:
customdonations/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • customdonations/trunk/classes/cd-shortcode-class.php

    r2282810 r2286386  
    2222        $this->mode = ($mode === 'live' || $mode === 'test') ? esc_attr($mode) : null; //there is an issue if mode isn't provided.
    2323        $this->paymentVersion = !empty($paymentVersion) && $paymentVersion > 0 && $paymentVersion <= 2 ? $paymentVersion : $config_paymentver; //1: for modal payment window. 2: for inline payment with Google/Apple Pay options (US CLIENTS ONLY!)
    24         $this->interval = !empty($interval) ? $interval : null;
     24        $this->interval = !empty($interval) && !(strtolower($interval) === "null") ? trim(strtolower($interval)) : null; // once, monthly, quarterly, yearly, or empty.
    2525    }
    2626
     
    6767    function enqueue_customdonations_scripts_js() {
    6868        $dateTime = new DateTime();
    69         $frm_builder_script_url = sprintf('%s/%s/js/form-builder.min.js', $this->baseUrl, $this->apiVersion);
     69        $frm_builder_script_url = "{$this->baseUrl}/{$this->apiVersion}/js/form-builder.min.js";
    7070        wp_enqueue_script('customdonations-form-builder', $frm_builder_script_url, '', $dateTime->getTimestamp(), true);
    7171        wp_enqueue_script('customdonations-shortcode', plugins_url('../js/cd-shortcode.js', __FILE__), '', '1.1', true);
  • customdonations/trunk/customdonations.php

    r2048717 r2286386  
    66 * Author URI:      https://www.customdonations.com
    77 * Text Domain:     customdonations
    8  * Version:         1.1
     8 * Version:         1.1.2
    99 * License:         GPLv2
    1010 * License URI:     https://www.gnu.org/licenses/gpl-2.0.html
  • customdonations/trunk/js/cd-config-page.js

    r1790427 r2286386  
    44    }
    55    jQuery('#customdonations_memberid_enabled').change(function () {
    6         if (this.checked)
    7         {
    8             jQuery('tr.customdonations_memberid_field_row').show();
    9         } else
    10         {
    11             jQuery('tr.customdonations_memberid_field_row').hide();
    12         }
     6        this.checked ? jQuery('tr.customdonations_memberid_field_row').show() : jQuery('tr.customdonations_memberid_field_row').hide();
    137    });
    148});
  • customdonations/trunk/readme.txt

    r2282810 r2286386  
    4242
    4343== Changelog ==
     44= 1.1.2 =
     45Improve interval parameter processing, minor adjustments to settings page.
    4446= 1.1.1 =
    4547Addition of interval parameter (optional) for choosing if payments should recur.
Note: See TracChangeset for help on using the changeset viewer.