Plugin Directory

Changeset 3029533


Ignore:
Timestamp:
01/31/2024 01:43:43 PM (2 years ago)
Author:
mailcamp
Message:
  • improved - changed type of email-field to email
  • improved - changed mail() function to mc_mail()
  • improved - changed type of captcha answer-field to number
Location:
mailcamp/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mailcamp/trunk/includes/class-mailcamp-api.php

    r2915770 r3029533  
    137137     *
    138138     * @since 1.0.0
    139      * @updated 1.5.7
     139     * @updated 1.5.12
    140140     * @param string $to_email
    141141     * @param $from_details
     
    143143     * @return mixed
    144144     */
    145     public function mail( $to_email = '', $from_details = [], $html = '' ) {
     145    public function mc_mail( $to_email = '', $from_details = [], $html = '' ) {
    146146
    147147        $this->xml_data = '
  • mailcamp/trunk/includes/core-functions.php

    r2965335 r3029533  
    119119                    break;
    120120                default:
    121                     $html_form .= '<input type="text" name="CustomFields[' . $field->fieldid . ']" id="CustomFields_' . $field->fieldid . '" ' . ((bool) $field->required ? ' aria-required="true" required' : '') . '>';
     121                    $fieldtype = ($field->fieldid === 'email' ? 'email' : 'text');
     122                    $html_form .= '<input type="' . $fieldtype . '" name="CustomFields[' . $field->fieldid . ']" id="CustomFields_' . $field->fieldid . '" ' . ((bool) $field->required ? ' aria-required="true" required' : '') . '>';
    122123            }
    123124            $html_form .= '</p>' . "\n";
     
    151152            $options['widget_gdpr_url']
    152153        ) . '</label>';
    153     $html_form .= '<br /><label class="mailcamp-form-captcha-sum mc-inline" for="captcha"></label><input class="mailcamp-form-captcha-field" id="captcha" type="text" size="4" maxlength="3" name="" value="" />';
     154    $html_form .= '<br /><label class="mailcamp-form-captcha-sum mc-inline" for="captcha"></label><input class="mailcamp-form-captcha-field" id="captcha" type="number" size="4" maxlength="3" min="0" max="100" name="captcha" value="" />';
    154155    $html_form .= '<input type="submit" disabled value="' . $submit_text . '" class="mc-btn-submit">';
    155156    $html_form .= '<br /><br /><div class="mailcamp-form-confirm" aria-live="polite"></div>';
  • mailcamp/trunk/public/class-mailcamp-public.php

    r2965335 r3029533  
    238238                        }
    239239
    240                         $mc_api->mail( $to_email, $details, $html );
     240                        $mc_api->mc_mail( $to_email, $details, $html );
    241241
    242242                        $result = [
  • mailcamp/trunk/public/css/mailcamp-public.css

    r2959912 r3029533  
    1616form.mailcamp-subscribe-form .mailcamp-form-captcha-field{
    1717     float:left;
    18      width: 50px !important;
     18     width: 80px !important;
    1919 }
    2020
Note: See TracChangeset for help on using the changeset viewer.