Changeset 2223857
- Timestamp:
- 01/08/2020 12:47:14 AM (6 years ago)
- Location:
- sendpress/trunk
- Files:
-
- 11 edited
-
classes/class-sendpress-ajax-loader.php (modified) (3 diffs)
-
classes/class-sendpress-data.php (modified) (1 diff)
-
classes/class-sendpress-email.php (modified) (2 diffs)
-
classes/public-views/class-sendpress-public-view-post.php (modified) (4 diffs)
-
classes/views/class-sendpress-view-settings-pro-extras.php (modified) (2 diffs)
-
classes/views/class-sendpress-view-subscribers-listcreate.php (modified) (2 diffs)
-
classes/views/class-sendpress-view-subscribers-listedit.php (modified) (3 diffs)
-
classes/views/class-sendpress-view-subscribers-listform.php (modified) (1 diff)
-
classes/views/class-sendpress-view-subscribers-sync.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
sendpress.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sendpress/trunk/classes/class-sendpress-ajax-loader.php
r1872400 r2223857 180 180 $first = ''; 181 181 } 182 $last = $data->_string('last'); 182 183 // $first = $data->_string('sp_firstname'); 184 // if($first == null) { 185 // $first = ''; 186 // } 187 188 189 $last = $data->_string('last'); 183 190 if($last == null){ 184 191 $last = ''; 185 192 } 193 194 // $last = $data->_string('sp_lastname'); 195 // if($last == null) { 196 // $last = ''; 197 // } 198 186 199 $phone = $data->_string('phonenumber'); 187 200 $salutation = $data->_string('salutation'); … … 337 350 $this->verify_ajax_call(); 338 351 $listid = SPNL()->validate->_int('listid'); 352 $user_email_meta_key = get_post_meta( $listid, 'meta-custom-email', true ); 339 353 $offset = SPNL()->validate->_int('offset'); 340 354 $role = get_post_meta( $listid, 'sync_role', true ); … … 357 371 $email_list = array(); 358 372 foreach ( $blogusers as $user ) { 359 SendPress_Data::update_subscriber_by_wp_user( $user->ID, array( 'email' => $user->user_email, 373 $email = $user->user_email; 374 if (!empty($user_email_meta_key)) { 375 $alt_email = get_user_meta($user->ID,$user_email_meta_key,true); 376 if(!empty($user_email_meta_key) && is_email($alt_email)){ 377 $email = $alt_email; 378 } 379 } 380 381 SendPress_Data::update_subscriber_by_wp_user( $user->ID, array( 'email' => $email, 360 382 'firstname' => $user->first_name, 361 383 'lastname' => $user->last_name 362 384 ) ); 363 $email_list[] = $ user->user_email;385 $email_list[] = $email; 364 386 } 365 387 SendPress_Data::sync_emails_to_list( $listid, $email_list ); -
sendpress/trunk/classes/class-sendpress-data.php
r2108147 r2223857 1488 1488 if( $result ){ return $result; } 1489 1489 global $wpdb; 1490 1490 1491 $result = $wpdb->insert($table,$values); 1491 1492 //$result = $this->wpdbQuery("SELECT @lastid2 := LAST_INSERT_ID()",'query'); -
sendpress/trunk/classes/class-sendpress-email.php
r2139804 r2223857 212 212 if($this->link_tracker()){ 213 213 $aTags = $dom->getElementsByTagName('a'); 214 $disable_pdf = SendPress_Option::get('open_tracker_pdf_disable'); 214 215 foreach ($aTags as $aElement) { 215 216 $href = $aElement->getAttribute('href'); … … 225 226 226 227 if(strrpos( $href, "*|" ) === false && strrpos($href, "#") !== 0 ) { 227 228 if($disable_pdf ) { 229 $path = parse_url($href, PHP_URL_PATH); 230 $ext = pathinfo($path, PATHINFO_EXTENSION); 231 if ($ext == "pdf") { 232 continue; 233 } 234 } 235 228 236 if( SendPress_Option::get('skip_mailto', false ) == true && strrpos( $href, "mailto" ) !== false ) { 229 237 continue; -
sendpress/trunk/classes/public-views/class-sendpress-public-view-post.php
r2161605 r2223857 21 21 } else { 22 22 23 // echo '<pre>';24 // print_r($_POST);25 // echo '</pre>';26 27 23 //get options 28 $options = SendPress_Data::get_post_meta_object($_POST['formid']); 29 30 //echo '<pre>'; 31 //print_r($options); 32 //echo '</pre>'; 33 34 24 $options = SendPress_Data::get_post_meta_object($_POST['formid']); 35 25 36 26 //build post_options array … … 42 32 43 33 $post_options_old = array('list','email','firstname','lastname','return','status'); 44 $post_options = array('list','status','email' );34 $post_options = array('list','status','email','firstname','lastname'); 45 35 46 36 foreach ($basic_form_options as $key => $value) { … … 56 46 $user_info[$opt] = isset($_POST['sp_' . $opt]) ? $_POST['sp_' . $opt]: false ; 57 47 } 58 59 48 60 49 $valid_user = array(); … … 119 108 $valid_user['phonenumber'] = ''; 120 109 } 110 121 111 122 112 //validate required custom fields -
sendpress/trunk/classes/views/class-sendpress-view-settings-pro-extras.php
r2139804 r2223857 27 27 } else { 28 28 SendPress_Option::set('open_tracker_off', false ); 29 } 30 31 if(isset( $post['open_pdf'] )){ 32 SendPress_Option::set('open_tracker_pdf_disable', true ); 33 } else { 34 SendPress_Option::set('open_tracker_pdf_disable', false ); 29 35 } 30 36 … … 62 68 <input type="checkbox" name="track_opens" value="true" <?php if($ctype){echo "checked='checked'"; } ?> /> <?php _e('Do not track email opens','sendpress'); ?> 63 69 <p> <?php _e('This will disable the open tracker for all emails sent from now on.','sendpress'); ?></p> 70 <?php $ctype = SendPress_Option::get('open_tracker_pdf_disable'); ?> 71 <input type="checkbox" name="open_pdf" value="true" <?php if($ctype){echo "checked='checked'"; } ?> /> <?php _e('Do not track pdf file opens','sendpress'); ?> 72 <p> <?php _e('This will disable pdf link tracker for all emails sent from now on.','sendpress'); ?></p> 64 73 65 74 <?php $this->panel_end(); ?> -
sendpress/trunk/classes/views/class-sendpress-view-subscribers-listcreate.php
r1598832 r2223857 24 24 update_post_meta($list_id, 'meta-value',SPNL()->validate->_string('meta-value')); 25 25 update_post_meta($list_id, 'opt-in-id', SPNL()->validate->_int('opt-in-id')); 26 update_post_meta($list_id, 'meta-custom-email',SPNL()->validate->_string('meta-custom-email')); 26 27 27 28 SendPress_Admin::redirect('Subscribers'); … … 80 81 81 82 <br><br> 83 <label>User Meta Field to get email from</label> 84 <input type="text" name="meta-custom-email" value="" /> 85 <br><br> 82 86 83 87 <?php -
sendpress/trunk/classes/views/class-sendpress-view-subscribers-listedit.php
r1598832 r2223857 26 26 update_post_meta($listid, 'meta-compare', SPNL()->validate->_string('meta-compare')); 27 27 update_post_meta($listid, 'meta-value',SPNL()->validate->_string('meta-value')); 28 update_post_meta($listid, 'meta-custom-email',SPNL()->validate->_string('meta-custom-email')); 28 29 update_post_meta($listid, 'opt-in-id', SPNL()->validate->_int('opt-in-id')); 29 30 } … … 97 98 98 99 <br><br> 99 100 <label>User Meta Field to get email from</label> 101 <input type="text" name="meta-custom-email" value="<?php echo get_post_meta($listinfo->ID, 'meta-custom-email', true); ?>" /> 102 <br><br> 100 103 <?php 101 104 … … 103 106 $current_opt_in_id = get_post_meta($listinfo->ID, 'opt-in-id', true); 104 107 ?> 108 109 110 105 111 <label>Double Opt In E-mail</label> 106 112 <select name="opt-in-id"> -
sendpress/trunk/classes/views/class-sendpress-view-subscribers-listform.php
r1598832 r2223857 63 63 <input type="hidden" name="sendpress" value="post" /> 64 64 <div id="form-wrap"> 65 <p name="email">66 <label for=" email">EMail:</label>65 <p> 66 <label for="sp_email">EMail:</label> 67 67 <input type="text" value="" name="sp_email"/> 68 68 </p> 69 <p name="firstname">70 <label for=" email">First Name:</label>69 <p> 70 <label for="sp_firstname">First Name:</label> 71 71 <input type="text" value="" name="sp_firstname"/> 72 72 </p> 73 <p name="lastname">74 <label for=" email">Last Name:</label>73 <p> 74 <label for="sp_lastname">Last Name:</label> 75 75 <input type="text" value="" name="sp_lastname"/> 76 76 </p> -
sendpress/trunk/classes/views/class-sendpress-view-subscribers-sync.php
r1750249 r2223857 20 20 21 21 function html() { 22 22 $blogusers = 0; 23 $role_to_sync = ''; 23 24 $list = SPNL()->validate->_int('listID'); 24 25 if( $list > 0 ){ … … 65 66 <input type="hidden" id="post_ID" name="post_ID" value="<?php echo $list; ?>" /> 66 67 <div class='well' id="sync-wordpress-roles"> 67 <h2><strong><?php _e('Syncing ','sendpress'); ?> <?php echo ucwords($role ); ?> <?php _e(' Role to List','sendpress'); ?> <?php echo get_the_title($list); ?> </strong></h2>68 <h2><strong><?php _e('Syncing ','sendpress'); ?> <?php echo ucwords($role_to_sync); ?> <?php _e(' Role to List','sendpress'); ?> <?php echo get_the_title($list); ?> </strong></h2> 68 69 <br> 69 70 -
sendpress/trunk/readme.txt
r2161605 r2223857 4 4 Tags: newsletter, newsletters, manager newsletter, newsletter signup, newsletter widget, subscribers, subscription, email marketing, email, emailing, smtp, sendpress, sendgrid, mandrill, mailchimp 5 5 Requires at least: 4.4 6 Tested up to: 5. 2.17 Stable tag: 1. 10.9.236 Tested up to: 5.3.2 7 Stable tag: 1.20.1.7 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 119 119 Previous releases can be downloaded from [GitHub](https://github.com/brewlabs/sendpress/releases) 120 120 121 = 1.20.1.7 - 2020.1.7 = 122 * update sync to use custom field on user 123 * update link tracking to allow not tracking of pdf ( PRO ) 124 * html form submit not getting first and last name 125 * fix error with customizer 126 121 127 = 1.10.9.23 - 2019.9.23 = 122 128 * remove debug log -
sendpress/trunk/sendpress.php
r2161605 r2223857 2 2 /* 3 3 Plugin Name: SendPress Newsletters 4 Version: 1. 10.9.234 Version: 1.20.1.7 5 5 Plugin URI: https://sendpress.com 6 6 Description: Easy to manage Newsletters for WordPress. … … 20 20 define( 'SENDPRESS_API_VERSION', 1 ); 21 21 define( 'SENDPRESS_MINIMUM_WP_VERSION', '3.6' ); 22 define( 'SENDPRESS_VERSION', '1. 10.9.23' );22 define( 'SENDPRESS_VERSION', '1.20.1.7' ); 23 23 define( 'SENDPRESS_URL', plugin_dir_url( __FILE__ ) ); 24 24 define( 'SENDPRESS_PATH', plugin_dir_path( __FILE__ ) ); … … 441 441 $this->add_custom_post(); 442 442 443 443 /* 444 444 if( defined( 'DOING_AJAX' ) || ( isset( $_GET['sendpress_display'] ) && 'true' == $_GET['sendpress_display'] ) ) { 445 445 $this->loader->add_action( 'customize_register', $this->customizer, 'register_customize_sections' ); … … 455 455 $this->customizer->remove_all_actions(); 456 456 } 457 */ 457 458 $this->loader->run(); 458 459
Note: See TracChangeset
for help on using the changeset viewer.