Changeset 2139804
- Timestamp:
- 08/15/2019 01:04:23 AM (7 years ago)
- Location:
- sendpress/trunk
- Files:
-
- 6 edited
-
classes/class-sendpress-email.php (modified) (4 diffs)
-
classes/class-sendpress-manager.php (modified) (4 diffs)
-
classes/class-sendpress-queue.php (modified) (2 diffs)
-
classes/views/class-sendpress-view-settings-pro-extras.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
sendpress.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sendpress/trunk/classes/class-sendpress-email.php
r2059327 r2139804 36 36 private $_html = false; 37 37 private $_tracker = true; 38 private $_link_tracker = true; 39 private $_open_tracker = true; 38 40 39 41 … … 53 55 $this->_tracker = $tracker; 54 56 } 57 58 function open_tracker($tracker = NULL){ 59 if ( ! isset( $tracker ) ) 60 return $this->_open_tracker; 61 $this->_open_tracker = $tracker; 62 } 63 64 function link_tracker($tracker = NULL){ 65 if ( ! isset( $tracker ) ) 66 return $this->_link_tracker; 67 $this->_link_tracker = $tracker; 68 } 55 69 56 70 function subscriber_id($subscriber_id = NULL){ … … 196 210 $pElement->setAttribute('style', ' margin-top:0; margin-bottom:10px; '. $body_font . $body_size . $px ); 197 211 } 198 if($this-> tracker()){212 if($this->link_tracker()){ 199 213 $aTags = $dom->getElementsByTagName('a'); 200 214 foreach ($aTags as $aElement) { … … 333 347 334 348 335 336 if($this-> tracker()) {349 $tracker = ""; 350 if($this->open_tracker()) { 337 351 $tracker = "<img src='" . $link . "' width='1' height='1' alt='' border='0' style='height:1px !important; width:1px !important; border-width:0 !important; margin-top:0 !important; margin-bottom:0 !important; margin-right:0 !important; margin-left:0 !important; padding-top:0 !important; padding-bottom:0 !important; padding-right:0 !important; padding-left:0 !important;'/>"; 338 352 } -
sendpress/trunk/classes/class-sendpress-manager.php
r1975180 r2139804 226 226 $attempts++; 227 227 SendPress_Data::queue_email_process( $email->id ); 228 $result = SendPress_Manager::send_email_from_queue( $email , $user_tracker);228 $result = SendPress_Manager::send_email_from_queue( $email ); 229 229 230 230 if ($result) { … … 360 360 * @return boolean true if mail sent successfully, false if an error 361 361 */ 362 static function send_email_from_queue( $email , $tracker = true ) { 362 static function send_email_from_queue( $email ) { 363 364 $link_tracker = SendPress_Option::get( 'tracker_off', false); 365 $user_tracker = true; 366 if( $link_tracker == "true" || $link_tracker == true){ 367 $user_tracker = false; 368 } 369 370 $open_tracker = SendPress_Option::get( 'open_tracker_off', false); 371 $user_open_tracker = true; 372 if( $open_tracker == "true" || $open_tracker == true){ 373 $user_open_tracker = false; 374 } 363 375 364 376 $message = new SendPress_Email(); 365 377 $message->id( $email->emailID ); 366 378 $message->subscriber_id( $email->subscriberID ); 367 $message->tracker( $tracker ); 379 $message->tracker( $user_tracker ); 380 $message->link_tracker($user_tracker); 381 $message->open_tracker($user_open_tracker); 368 382 $message->list_id( $email->listID ); 369 383 $body = $message->html(); … … 389 403 static function send_test_email( $email ) { 390 404 SendPress_Email_Cache::build_cache_for_email($email->emailID); 405 406 $link_tracker = SendPress_Option::get( 'tracker_off', false); 407 $user_tracker = true; 408 if( $link_tracker == "true" || $link_tracker == true){ 409 $user_tracker = false; 410 } 411 412 $open_tracker = SendPress_Option::get( 'open_tracker_off', false); 413 $user_open_tracker = true; 414 if( $open_tracker == "true" || $open_tracker == true){ 415 $user_open_tracker = false; 416 } 417 391 418 $message = new SendPress_Email(); 392 419 $message->id( $email->emailID ); … … 394 421 $message->subscriber_id( $email->subscriberID ); 395 422 $message->list_id( $email->listID ); 396 423 $message->link_tracker($user_tracker); 424 $message->open_tracker($user_open_tracker); 397 425 $fromname = ''; 398 426 if(isset($email->from_name)){ -
sendpress/trunk/classes/class-sendpress-queue.php
r1748979 r2139804 55 55 if( $email != null ) { 56 56 57 $tracker_disable = SendPress_Option::get( 'tracker_off', false); 58 $user_tracker = true; 59 if( $tracker_disable == "true" ){ 60 $user_tracker = false; 61 } 57 62 58 63 59 global $wpdb; 64 60 if( is_email( trim($email->to_email) ) && ( isset($email->is_confirm) || SendPress_Data::is_subscriber_active_or_unconfirmed($email->subscriberID ) ) ){ 65 61 SendPress_Data::queue_email_process( $email->id ); 66 $result = SendPress_Manager::send_email_from_queue( $email , $user_tracker);62 $result = SendPress_Manager::send_email_from_queue( $email ); 67 63 68 64 if ($result) { … … 120 116 121 117 SendPress_Data::queue_email_process( $email->id ); 122 $result = SendPress_Manager::send_email_from_queue( $email , $user_tracker);118 $result = SendPress_Manager::send_email_from_queue( $email ); 123 119 $email_count++; 124 120 if ($result) { -
sendpress/trunk/classes/views/class-sendpress-view-settings-pro-extras.php
r1957583 r2139804 16 16 SendPress_Option::set('import_update', false ); 17 17 } 18 19 if(isset( $post['track_links'] )){ 20 SendPress_Option::set('tracker_off', true ); 21 } else { 22 SendPress_Option::set('tracker_off', false ); 23 } 24 25 if(isset( $post['track_opens'] )){ 26 SendPress_Option::set('open_tracker_off', true ); 27 } else { 28 SendPress_Option::set('open_tracker_off', false ); 29 } 18 30 19 31 SendPress_Admin::redirect('Settings_Pro_Extras'); … … 43 55 <?php $this->panel_end(); ?> 44 56 57 <?php $this->panel_start( __('Stat Tracking Settings','sendpress') ); ?> 58 <?php $ctype = SendPress_Option::get('tracker_off'); ?> 59 <input type="checkbox" name="track_links" value="true" <?php if($ctype){echo "checked='checked'"; } ?> /> <?php _e('Do not track link clicks in emails','sendpress'); ?> 60 <p> <?php _e('This will disable the link tracker for all emails sent from now on.','sendpress'); ?></p> 61 <?php $ctype = SendPress_Option::get('open_tracker_off'); ?> 62 <input type="checkbox" name="track_opens" value="true" <?php if($ctype){echo "checked='checked'"; } ?> /> <?php _e('Do not track email opens','sendpress'); ?> 63 <p> <?php _e('This will disable the open tracker for all emails sent from now on.','sendpress'); ?></p> 45 64 65 <?php $this->panel_end(); ?> 46 66 47 67 -
sendpress/trunk/readme.txt
r2108147 r2139804 5 5 Requires at least: 4.4 6 6 Tested up to: 5.2.1 7 Stable tag: 1.10. 6.187 Stable tag: 1.10.8.14 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.10.8.14 - 2019.8.14 = 122 * update settings for tracking in Pro 123 121 124 = 1.10.6.18 - 2019.6.18 = 122 125 * update list import query for better error handling -
sendpress/trunk/sendpress.php
r2108147 r2139804 2 2 /* 3 3 Plugin Name: SendPress Newsletters 4 Version: 1.10. 6.184 Version: 1.10.8.14 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. 6.18' );22 define( 'SENDPRESS_VERSION', '1.10.8.14' ); 23 23 define( 'SENDPRESS_URL', plugin_dir_url( __FILE__ ) ); 24 24 define( 'SENDPRESS_PATH', plugin_dir_path( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.