Plugin Directory

Changeset 1205963


Ignore:
Timestamp:
07/24/2015 08:28:11 PM (11 years ago)
Author:
FreshMail.com
Message:
  • Add: Option to display popout on every single page, post, product.
  • Fix: Checkboxes in freshmail form now are avaliable to uncheck.
  • Fix: Redirection works properly in shortcode form.
Location:
freshmail-newsletter/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • freshmail-newsletter/trunk/CHANGELOG.md

    r1202207 r1205963  
    11### Changelog
     2
     3- 2.1.3 - 2015-07-24
     4    * Add: Option to display popout on every single page, post, product.
     5    * Fix: Checkboxes in freshmail form now are avaliable to uncheck.
     6    * Fix: Redirection works properly in shortcode form.
    27
    38- 2.1.2 - 2015-07-20
  • freshmail-newsletter/trunk/readme.txt

    r1190834 r1205963  
    55Requires at least: 3.0
    66Tested up to: 4.2.2
    7 Stable tag: 2.1
     7Stable tag: 2.1.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    174174== Changelog ==
    175175
     176- 2.1.3 - 2015-07-24
     177    * Add: Option to display popout on every single page, post, product.
     178    * Fix: Checkboxes in freshmail form now are avaliable to uncheck.
     179    * Fix: Redirection works properly in shortcode form.
     180
     181- 2.1.2 - 2015-07-20
     182    * Add: Google url.
     183
    176184- 2.1.1 - 2015-06-29
    177185    * Fix: alert about php version
  • freshmail-newsletter/trunk/src/Plugin/Newsletter/Freshmail.php

    r1202207 r1205963  
    265265            $postType = get_post_type(get_the_ID());
    266266            if (($postType == 'page')) {
    267                 if (!isset($freshmailForm['allowed_pages']) || !in_array(get_the_ID(), $freshmailForm['allowed_pages'])) {
     267                if (!isset($freshmailForm['allowed_pages']) || (!in_array(get_the_ID(), $freshmailForm['allowed_pages']) && !in_array('all', $freshmailForm['allowed_pages']))) {
    268268                    break;
    269269                }
    270270            } elseif ($postType == 'post') {
    271                 if (!isset($freshmailForm['allowed_main_posts']) || !in_array(get_the_ID(), $freshmailForm['allowed_main_posts'])) {
     271                if (!isset($freshmailForm['allowed_main_posts']) || (!in_array(get_the_ID(), $freshmailForm['allowed_main_posts']) && !in_array('all', $freshmailForm['allowed_main_posts']))) {
    272272                    break;
    273273                }
    274274            } elseif ($postType == 'product') {
    275                 if (!isset($freshmailForm['allowed_products']) || !in_array(get_the_ID(), $freshmailForm['allowed_products'])) {
     275                if (!isset($freshmailForm['allowed_products']) || (!in_array(get_the_ID(), $freshmailForm['allowed_products']) && !in_array('all', $freshmailForm['allowed_products']))) {
    276276                    break;
    277277                }
     
    283283            $allowedPages = array_merge($allowedPages, (isset($freshmailForm['allowed_products']) ? $freshmailForm['allowed_products'] : array()));
    284284            /* check if page/post is allowed to display pop-up */
    285             if (!in_array(get_the_ID(), $allowedPages)) {
     285            if (!in_array(get_the_ID(), $allowedPages) && !in_array('all', $allowedPages)) {
    286286                break;
    287287            }
     
    417417        $buttonHovered = $freshmailForm['appearance']['button_hovered'];
    418418        $errorSuccess = $freshmailForm['appearance']['error_success'];
     419
     420        if ($freshmailForm['redirection'] != 'no' && empty($fmFormId['redirect'])) {
     421            if ($freshmailForm['redirection'] == 'wordpress') {
     422                $fmFormId['redirect'] = $freshmailForm['redirection_wp'];
     423            }
     424            if ($freshmailForm['redirection'] == 'custom') {
     425                $fmFormId['redirect'] = $freshmailForm['redirection_custom'];
     426            }
     427        }
     428
    419429        require(WP_FRESHMAIL_DIR.'/templates/shortcode.php');
    420430        require(WP_FRESHMAIL_DIR.'/templates/google_url.php');
  • freshmail-newsletter/trunk/templates/form_fields.php

    r1181908 r1205963  
    6363                        </td>
    6464                        <td>
    65                             <input type="checkbox" name="fm_form_var[fields][<?php echo $val['tag']; ?>][required]" <?php echo(isset($freshmailForm['fields'][$val['tag']]['required']) ? ($freshmailForm['fields'][$val['tag']]['required'] == 'on' ? 'checked="checked"' : null) : 'checked="checked"'); ?> />
     65                            <input type="checkbox" name="fm_form_var[fields][<?php echo $val['tag']; ?>][required]" <?php echo(isset($freshmailForm['fields'][$val['tag']]['required']) ? ($freshmailForm['fields'][$val['tag']]['required'] == 'on' ? 'checked="checked"' : null) : ''); ?> />
    6666                        </td>
    6767                        <td>
    68                             <input type="checkbox" name="fm_form_var[fields][<?php echo $val['tag']; ?>][include]" <?php echo(isset($freshmailForm['fields'][$val['tag']]['include']) ? ($freshmailForm['fields'][$val['tag']]['include'] == 'on' ? 'checked="checked"' : null) : 'checked="checked"'); ?> />
     68                            <input type="checkbox" name="fm_form_var[fields][<?php echo $val['tag']; ?>][include]" <?php echo(isset($freshmailForm['fields'][$val['tag']]['include']) ? ($freshmailForm['fields'][$val['tag']]['include'] == 'on' ? 'checked="checked"' : null) : ''); ?> />
    6969                        </td>
    7070                    </tr>
  • freshmail-newsletter/trunk/templates/form_properties.php

    r1181908 r1205963  
    117117                        </label><br>
    118118                        <select multiple="multiple" name="fm_form_var[allowed_pages][]" >
     119                            <option value="all" <?php echo in_array('all', isset($freshmailForm['allowed_pages']) ? $freshmailForm['allowed_pages'] : array()) ? 'selected="selected"' : null; ?>><?php _e('All Pages', 'wp_freshmail'); ?></option>
    119120                            <?php foreach ($pages as $key => $value): ?>
    120121                                <option value="<?php echo $value->ID; ?>" <?php echo in_array($value->ID, isset($freshmailForm['allowed_pages']) ? $freshmailForm['allowed_pages'] : array()) ? 'selected="selected"' : null; ?>><?php echo $value->post_title; ?></option>
     
    133134                        </label><br>
    134135                        <select multiple="multiple" name="fm_form_var[allowed_main_posts][]" >
     136                            <option value="all" <?php echo in_array('all', (isset($freshmailForm['allowed_main_posts']) ? $freshmailForm['allowed_main_posts'] : array())) ? 'selected="selected"' : null; ?>><?php _e('All Pages', 'wp_freshmail'); ?></option>
    135137                            <?php foreach ($mainPosts as $key => $value): ?>
    136138                                <option value="<?php echo $value->ID; ?>" <?php echo in_array($value->ID, (isset($freshmailForm['allowed_main_posts']) ? $freshmailForm['allowed_main_posts'] : array())) ? 'selected="selected"' : null; ?>><?php echo $value->post_title; ?></option>
     
    159161                            <br />
    160162                            <select multiple="multiple" name="fm_form_var[allowed_products][]" >
     163                                <option value="all" <?php echo in_array('all', (isset($freshmailForm['allowed_products']) ? $freshmailForm['allowed_products'] : array())) ? 'selected="selected"' : null; ?>><?php _e('All Products', 'wp_freshmail'); ?></option>
    161164                                <?php foreach ($products as $key => $value): ?>
    162165                                    <option value="<?php echo $value->ID; ?>" <?php echo in_array($value->ID, (isset($freshmailForm['allowed_products']) ? $freshmailForm['allowed_products'] : array())) ? 'selected="selected"' : null; ?>><?php echo $value->post_title; ?></option>
  • freshmail-newsletter/trunk/wp-freshmail.php

    r1202207 r1205963  
    44 * Plugin URI: http://freshmail.com/plugin/wordpress-newsletter/
    55 * Description: FreshMail is an email marketing tool for creating and sending amazing newsletters. Our intuitive system leads users from campaign planning and creation to final reports. A free account lets you send up to 2000 messages to a maximum of 500 recipients each month.
    6  * Version: 2.1.2
     6 * Version: 2.1.3
    77 * Author: Borbis Media
    88 * Author URI: http://www.borbis.com
Note: See TracChangeset for help on using the changeset viewer.