Changeset 1205963
- Timestamp:
- 07/24/2015 08:28:11 PM (11 years ago)
- Location:
- freshmail-newsletter/trunk
- Files:
-
- 6 edited
-
CHANGELOG.md (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
src/Plugin/Newsletter/Freshmail.php (modified) (3 diffs)
-
templates/form_fields.php (modified) (1 diff)
-
templates/form_properties.php (modified) (3 diffs)
-
wp-freshmail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
freshmail-newsletter/trunk/CHANGELOG.md
r1202207 r1205963 1 1 ### 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. 2 7 3 8 - 2.1.2 - 2015-07-20 -
freshmail-newsletter/trunk/readme.txt
r1190834 r1205963 5 5 Requires at least: 3.0 6 6 Tested up to: 4.2.2 7 Stable tag: 2.1 7 Stable tag: 2.1.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 174 174 == Changelog == 175 175 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 176 184 - 2.1.1 - 2015-06-29 177 185 * Fix: alert about php version -
freshmail-newsletter/trunk/src/Plugin/Newsletter/Freshmail.php
r1202207 r1205963 265 265 $postType = get_post_type(get_the_ID()); 266 266 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']))) { 268 268 break; 269 269 } 270 270 } 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']))) { 272 272 break; 273 273 } 274 274 } 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']))) { 276 276 break; 277 277 } … … 283 283 $allowedPages = array_merge($allowedPages, (isset($freshmailForm['allowed_products']) ? $freshmailForm['allowed_products'] : array())); 284 284 /* 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)) { 286 286 break; 287 287 } … … 417 417 $buttonHovered = $freshmailForm['appearance']['button_hovered']; 418 418 $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 419 429 require(WP_FRESHMAIL_DIR.'/templates/shortcode.php'); 420 430 require(WP_FRESHMAIL_DIR.'/templates/google_url.php'); -
freshmail-newsletter/trunk/templates/form_fields.php
r1181908 r1205963 63 63 </td> 64 64 <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) : ''); ?> /> 66 66 </td> 67 67 <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) : ''); ?> /> 69 69 </td> 70 70 </tr> -
freshmail-newsletter/trunk/templates/form_properties.php
r1181908 r1205963 117 117 </label><br> 118 118 <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> 119 120 <?php foreach ($pages as $key => $value): ?> 120 121 <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> … … 133 134 </label><br> 134 135 <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> 135 137 <?php foreach ($mainPosts as $key => $value): ?> 136 138 <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> … … 159 161 <br /> 160 162 <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> 161 164 <?php foreach ($products as $key => $value): ?> 162 165 <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 4 4 * Plugin URI: http://freshmail.com/plugin/wordpress-newsletter/ 5 5 * 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. 26 * Version: 2.1.3 7 7 * Author: Borbis Media 8 8 * Author URI: http://www.borbis.com
Note: See TracChangeset
for help on using the changeset viewer.