Plugin Directory

Changeset 3271598


Ignore:
Timestamp:
04/12/2025 07:20:23 PM (11 months ago)
Author:
marcusbs
Message:

3.0.3 - Fixed bugs

Location:
wp-mailing-group/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-mailing-group/trunk/crons/wpmg_cron_send_email.php

    r3268122 r3271598  
    196196                            $footerText = str_replace("{%unsubscribe_url%}", get_bloginfo('wpurl').'?unsubscribe=1&userid='.$sendtouserId.'&group='.$receiverGroupId, $footerText);     
    197197                           
    198                             $body .= $footerText;       
     198                            $body .= $footerText;   
     199                           
     200                            $body = wpmg_prepare_text_content($body);
    199201
    200202                            $_ARRDB['user_id']   = $sendtouserId;       
     
    390392}
    391393}
     394
     395function wpmg_prepare_text_content($body) {
     396    // Strip all tags except allowed ones
     397    $body = strip_tags($body, '<br><br ><br/><br /><a>');
     398
     399    // Remove <br> tags that have unwanted attributes like clear="all"
     400    $body = preg_replace('/<br[^>]*clear="all"[^>]*>/i', '', $body);
     401
     402    // Normalize all <br> tags (with or without space, slash, etc.) into PHP_EOL
     403    $body = preg_replace('/<br\s*\/?>/i', PHP_EOL, $body);
     404
     405    return $body;
     406}
  • wp-mailing-group/trunk/mailing-group-module.php

    r3270795 r3271598  
    11<?php /**
    22* @package Mailing_group_module
    3 * @version 3.0.2
     3* @version 3.0.3
    44*/
    55/*
     
    99Author: Yamna Khawaja
    1010Author URI: https://www.wpmailinggroup.com/
    11 Version: 3.0.2
     11Version: 3.0.3
    1212License: GPL v2 or later
    1313License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3939
    4040$WPMG_SETTINGS = get_option("WPMG_SETTINGS");
    41 $MG_VERSION_NO = '3.0.2';
     41$MG_VERSION_NO = '3.0.3';
    4242$WPMG_SETTINGS['MG_VERSION_NO']  = $MG_VERSION_NO;
    4343$WPMG_SETTINGS['MG_PLUGIN_TYPE'] = 'FREE';
     
    144144    $MG_SUPPORT_EMAIL    = (isset($wpmgs['MG_SUPPORT_EMAIL']) && $wpmgs['MG_SUPPORT_EMAIL']!=''?esc_html($wpmgs['MG_SUPPORT_EMAIL']):'[email protected]');
    145145    $MG_SUPPORT_PHONE    = (isset($wpmgs['MG_SUPPORT_PHONE']) && $wpmgs['MG_SUPPORT_PHONE']!=''?esc_html($wpmgs['MG_SUPPORT_PHONE']):'1800-123-1234');
    146     $MG_VERSION_NO       = (isset($wpmgs['MG_VERSION_NO'])    && $wpmgs['MG_VERSION_NO']!=''?esc_html($wpmgs['MG_VERSION_NO']):'3.0.2');
     146    $MG_VERSION_NO       = (isset($wpmgs['MG_VERSION_NO'])    && $wpmgs['MG_VERSION_NO']!=''?esc_html($wpmgs['MG_VERSION_NO']):'3.0.3');
    147147   
    148148    $wpmg_setting = array(
     
    272272    }
    273273
    274     if ($wpdb->get_var("SHOW TABLES LIKE '$table_name_parsed_emails'") != $table_name_parsed_emails) {
    275        $sql = "CREATE TABLE $table_name_parsed_emails (
    276   id bigint(20) NOT NULL AUTO_INCREMENT,
    277   type varchar(50) NOT NULL DEFAULT 'email',
    278   email_bounced varchar(100) NOT NULL,
    279   email_from varchar(255) NOT NULL,
    280   email_from_name varchar(255) NOT NULL,
    281   email_to varchar(255) NOT NULL,
    282   email_to_name varchar(255) NOT NULL,
    283   email_subject varchar(255) NOT NULL,
    284   email_content longblob NOT NULL,
    285   email_group_id int(11) NOT NULL,
    286   status tinyint(2) NOT NULL DEFAULT 0,
    287   PRIMARY KEY (id)
    288 ) $charset_collate;";
    289         require_once(ABSPATH . "wp-admin/includes/upgrade.php");
    290         dbDelta($sql);
    291     }else{
    292         //dbdelta not updating old tables so this is a workaround
    293         $wpdb->query("ALTER TABLE $table_name_parsed_emails CHARACTER SET utf8 COLLATE utf8_unicode_ci");
    294         $wpdb->query("ALTER TABLE $table_name_parsed_emails MODIFY `email_subject` varchar(255) CHARACTER SET utf8");
    295     }
     274    $sql = "CREATE TABLE $table_name_parsed_emails (
     275        id bigint NOT NULL AUTO_INCREMENT,
     276        type varchar(50) NOT NULL DEFAULT 'email',
     277        email_bounced varchar(100) NOT NULL,
     278        email_from varchar(255) NOT NULL,
     279        email_from_name varchar(255) NOT NULL,
     280        email_to varchar(255) NOT NULL,
     281        email_to_name varchar(255) NOT NULL,
     282        email_subject varchar(255) NOT NULL,
     283        email_content longblob NOT NULL,
     284        email_group_id int NOT NULL,
     285        email_date varchar(55) NOT NULL,
     286        status tinyint(2) NOT NULL DEFAULT '0',
     287        day_of_year int DEFAULT '0',
     288        week_of_year int DEFAULT '0',
     289        batch_offset int DEFAULT '0',
     290        PRIMARY KEY (id)
     291      ) $charset_collate;";
     292  require_once(ABSPATH . "wp-admin/includes/upgrade.php");
     293  dbDelta($sql);
    296294
    297295    if ($wpdb->get_var("SHOW TABLES LIKE '$table_name_sent_emails'") != $table_name_sent_emails) {
     
    344342    /* Add attachment table if not present. */
    345343
    346     if ($wpdb->get_var("SHOW TABLES LIKE '$table_name_attachments'") != $table_name_attachments) {
    347344  $sql = "CREATE TABLE $table_name_attachments (
    348345  id bigint(20) NOT NULL AUTO_INCREMENT,
     
    352349  date varchar(55) NOT NULL,
    353350  PRIMARY KEY (id)
    354 ) $charset_collate;";
    355         require_once(ABSPATH . "wp-admin/includes/upgrade.php");
    356         dbDelta($sql);
    357     }      
     351    ) $charset_collate;";
     352    require_once(ABSPATH . "wp-admin/includes/upgrade.php");
     353    dbDelta($sql);
     354       
    358355    /* Add attachments column if not present. */   
    359356$column_exists = $wpdb->get_results($wpdb->prepare(
  • wp-mailing-group/trunk/readme.txt

    r3270795 r3271598  
    66Tested up to: 6.7
    77Tested up to PHP: 8.2
    8 Stable tag: 3.0.2
     8Stable tag: 3.0.3
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    132132== Changelog ==
    133133
     134=3.0.3 =
     135*Fixed emails showing emails.
     136
     137=3.0.2 =
     138*Fixed bugs from last release.
     139
     140=3.0.1 =
     141*Fixed bugs from last release.
     142
    134143=3.0.0 =
    135144*Fixed all problems in the plugin to comply to Wordpress coding standards.
Note: See TracChangeset for help on using the changeset viewer.