Plugin Directory

Changeset 3464398


Ignore:
Timestamp:
02/18/2026 02:15:27 PM (5 weeks ago)
Author:
mailerlite
Message:

Update to version 1.7.20 from GitHub

Location:
official-mailerlite-sign-up-forms
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • official-mailerlite-sign-up-forms/tags/1.7.20/mailerlite.php

    r3463482 r3464398  
    44 * Plugin URI: https://mailerlite.com
    55 * Description: Official MailerLite Signup forms plugin for WordPress. Ability to embed MailerLite webforms and create custom ones just with few clicks.
    6  * Version: 1.7.19
     6 * Version: 1.7.20
    77 * Author: MailerLite
    88 * Author URI: https://www.mailerlite.com
     
    3535define( 'MAILERLITE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
    3636
    37 define( 'MAILERLITE_VERSION', '1.7.19' );
     37define( 'MAILERLITE_VERSION', '1.7.20' );
    3838
    3939define( 'MAILERLITE_PHP_VERSION', '7.2.5' );
  • official-mailerlite-sign-up-forms/tags/1.7.20/readme.txt

    r3463482 r3464398  
    66Tested up to: 6.8.2
    77Requires PHP: 7.2.5
    8 Stable tag: 1.7.19
     8Stable tag: 1.7.20
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    130130
    131131== Changelog ==
     132= 1.7.20 =
     133* Bug fixes & improvements
     134
    132135= 1.7.19 =
    133136* Security fixes
  • official-mailerlite-sign-up-forms/tags/1.7.20/src/Admin/Views/EditCustomView.php

    r3037689 r3464398  
    455455                        body: new URLSearchParams({
    456456                            action: 'mailerlite_get_more_groups', offset: groupsElement.dataset.offset,
     457                            form_id: <?php echo $form_id; ?>,
    457458                            ml_nonce: '<?php echo wp_create_nonce( 'mailerlite_load_more_groups' );?>'
    458459                        })
  • official-mailerlite-sign-up-forms/tags/1.7.20/src/Admin/Views/GroupsView.php

    r2657193 r3464398  
    3535        <?php
    3636        /** @var MailerLiteGroup $group */
     37        $lists = [];
     38
     39        if ($form) {
     40            $lists = $form->data['lists'];
     41        }
    3742        foreach ( $groups as $group ) { ?>
    3843            <tr>
     
    4449                        value="<?php echo $group->id; ?>"<?php echo in_array( $group->
    4550                    id,
    46                         $form->data['lists'] ) ? ' checked="checked"' : ''; ?>>
     51                        $lists ) ? ' checked="checked"' : ''; ?>>
    4752                </th>
    4853                <td>
  • official-mailerlite-sign-up-forms/tags/1.7.20/src/Controllers/AdminController.php

    r3463482 r3464398  
    419419        check_admin_referer( 'mailerlite_load_more_groups', 'ml_nonce' );
    420420
    421         $form_id = absint( $_POST['form_id'] );
    422         $offset  = absint( $_POST['offset'] );
    423 
    424         $query = $wpdb->prepare(
    425             "SELECT *
     421        $form_id = absint( isset( $_POST['form_id'] ) ? $_POST['form_id'] : 0 );
     422        $offset  = absint( isset( $_POST['offset'] ) ? $_POST['offset'] : 0 );
     423
     424        $form = null;
     425        $lists = [];
     426
     427        if ($form_id > 0) {
     428            $query = $wpdb->prepare(
     429                "SELECT *
    426430        FROM {$wpdb->base_prefix}mailerlite_forms
    427431        WHERE id=%d",
    428             $form_id
    429         );
    430 
    431         $form = $wpdb->get_row($query);
    432 
    433         $form->data = unserialize( $form->data );
    434 
    435         $ML_Groups = new PlatformAPI( self::apiKey() );
    436 
    437         $lists = $form->data['lists'];
     432                $form_id
     433            );
     434
     435            $form = $wpdb->get_row($query);
     436
     437
     438            if ($form) {
     439                $form->data = unserialize($form->data);
     440
     441                $lists = $form->data['lists'];
     442            }
     443        }
     444
     445        $ML_Groups = new PlatformAPI(self::apiKey());
    438446
    439447        $groups_from_ml_extended = $ML_Groups->getMoreGroups(self::FIRST_GROUP_LOAD, $offset);
  • official-mailerlite-sign-up-forms/trunk/mailerlite.php

    r3463482 r3464398  
    44 * Plugin URI: https://mailerlite.com
    55 * Description: Official MailerLite Signup forms plugin for WordPress. Ability to embed MailerLite webforms and create custom ones just with few clicks.
    6  * Version: 1.7.19
     6 * Version: 1.7.20
    77 * Author: MailerLite
    88 * Author URI: https://www.mailerlite.com
     
    3535define( 'MAILERLITE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
    3636
    37 define( 'MAILERLITE_VERSION', '1.7.19' );
     37define( 'MAILERLITE_VERSION', '1.7.20' );
    3838
    3939define( 'MAILERLITE_PHP_VERSION', '7.2.5' );
  • official-mailerlite-sign-up-forms/trunk/readme.txt

    r3463482 r3464398  
    66Tested up to: 6.8.2
    77Requires PHP: 7.2.5
    8 Stable tag: 1.7.19
     8Stable tag: 1.7.20
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    130130
    131131== Changelog ==
     132= 1.7.20 =
     133* Bug fixes & improvements
     134
    132135= 1.7.19 =
    133136* Security fixes
  • official-mailerlite-sign-up-forms/trunk/src/Admin/Views/EditCustomView.php

    r3037689 r3464398  
    455455                        body: new URLSearchParams({
    456456                            action: 'mailerlite_get_more_groups', offset: groupsElement.dataset.offset,
     457                            form_id: <?php echo $form_id; ?>,
    457458                            ml_nonce: '<?php echo wp_create_nonce( 'mailerlite_load_more_groups' );?>'
    458459                        })
  • official-mailerlite-sign-up-forms/trunk/src/Admin/Views/GroupsView.php

    r2657193 r3464398  
    3535        <?php
    3636        /** @var MailerLiteGroup $group */
     37        $lists = [];
     38
     39        if ($form) {
     40            $lists = $form->data['lists'];
     41        }
    3742        foreach ( $groups as $group ) { ?>
    3843            <tr>
     
    4449                        value="<?php echo $group->id; ?>"<?php echo in_array( $group->
    4550                    id,
    46                         $form->data['lists'] ) ? ' checked="checked"' : ''; ?>>
     51                        $lists ) ? ' checked="checked"' : ''; ?>>
    4752                </th>
    4853                <td>
  • official-mailerlite-sign-up-forms/trunk/src/Controllers/AdminController.php

    r3463482 r3464398  
    419419        check_admin_referer( 'mailerlite_load_more_groups', 'ml_nonce' );
    420420
    421         $form_id = absint( $_POST['form_id'] );
    422         $offset  = absint( $_POST['offset'] );
    423 
    424         $query = $wpdb->prepare(
    425             "SELECT *
     421        $form_id = absint( isset( $_POST['form_id'] ) ? $_POST['form_id'] : 0 );
     422        $offset  = absint( isset( $_POST['offset'] ) ? $_POST['offset'] : 0 );
     423
     424        $form = null;
     425        $lists = [];
     426
     427        if ($form_id > 0) {
     428            $query = $wpdb->prepare(
     429                "SELECT *
    426430        FROM {$wpdb->base_prefix}mailerlite_forms
    427431        WHERE id=%d",
    428             $form_id
    429         );
    430 
    431         $form = $wpdb->get_row($query);
    432 
    433         $form->data = unserialize( $form->data );
    434 
    435         $ML_Groups = new PlatformAPI( self::apiKey() );
    436 
    437         $lists = $form->data['lists'];
     432                $form_id
     433            );
     434
     435            $form = $wpdb->get_row($query);
     436
     437
     438            if ($form) {
     439                $form->data = unserialize($form->data);
     440
     441                $lists = $form->data['lists'];
     442            }
     443        }
     444
     445        $ML_Groups = new PlatformAPI(self::apiKey());
    438446
    439447        $groups_from_ml_extended = $ML_Groups->getMoreGroups(self::FIRST_GROUP_LOAD, $offset);
Note: See TracChangeset for help on using the changeset viewer.