Plugin Directory

Changeset 2223857


Ignore:
Timestamp:
01/08/2020 12:47:14 AM (6 years ago)
Author:
brewlabs
Message:

Push release version

Location:
sendpress/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • sendpress/trunk/classes/class-sendpress-ajax-loader.php

    r1872400 r2223857  
    180180                $first = '';
    181181            }
    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');
    183190            if($last == null){
    184191                $last = '';
    185192            }
     193
     194//          $last  = $data->_string('sp_lastname');
     195//          if($last == null) {
     196//              $last = '';
     197//          }
     198
    186199            $phone  = $data->_string('phonenumber');
    187200            $salutation = $data->_string('salutation');
     
    337350        $this->verify_ajax_call();
    338351        $listid = SPNL()->validate->_int('listid');
     352        $user_email_meta_key     = get_post_meta( $listid, 'meta-custom-email', true );
    339353        $offset = SPNL()->validate->_int('offset');
    340354        $role   = get_post_meta( $listid, 'sync_role', true );
     
    357371        $email_list = array();
    358372        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,
    360382                                                                            'firstname' => $user->first_name,
    361383                                                                            'lastname'  => $user->last_name
    362384            ) );
    363             $email_list[] = $user->user_email;
     385            $email_list[] = $email;
    364386        }
    365387        SendPress_Data::sync_emails_to_list( $listid, $email_list );
  • sendpress/trunk/classes/class-sendpress-data.php

    r2108147 r2223857  
    14881488        if( $result ){ return $result; }
    14891489        global $wpdb;
     1490
    14901491        $result = $wpdb->insert($table,$values);
    14911492        //$result = $this->wpdbQuery("SELECT @lastid2 := LAST_INSERT_ID()",'query');
  • sendpress/trunk/classes/class-sendpress-email.php

    r2139804 r2223857  
    212212                if($this->link_tracker()){
    213213                $aTags = $dom->getElementsByTagName('a');
     214                  $disable_pdf =  SendPress_Option::get('open_tracker_pdf_disable');
    214215                foreach ($aTags as $aElement) {
    215216                    $href = $aElement->getAttribute('href');
     
    225226                   
    226227                    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
    228236                            if( SendPress_Option::get('skip_mailto', false ) == true && strrpos( $href, "mailto" ) !== false  ) {
    229237                                continue;
  • sendpress/trunk/classes/public-views/class-sendpress-public-view-post.php

    r2161605 r2223857  
    2121        } else {
    2222
    23         // echo '<pre>';
    24         // print_r($_POST);
    25         // echo '</pre>';
    26 
    2723        //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']);
    3525
    3626        //build post_options array
     
    4232
    4333        $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');
    4535
    4636        foreach ($basic_form_options as $key => $value) {
     
    5646            $user_info[$opt] = isset($_POST['sp_' . $opt]) ?  $_POST['sp_' . $opt]: false ;
    5747        }
    58 
    5948
    6049        $valid_user = array();
     
    119108                $valid_user['phonenumber'] = '';
    120109            }
     110
    121111
    122112            //validate required custom fields
  • sendpress/trunk/classes/views/class-sendpress-view-settings-pro-extras.php

    r2139804 r2223857  
    2727        } else {
    2828            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 );
    2935        }
    3036
     
    6268                <input type="checkbox" name="track_opens" value="true" <?php if($ctype){echo "checked='checked'"; } ?> /> &nbsp;<?php _e('Do not track email opens','sendpress'); ?>
    6369                <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'"; } ?> /> &nbsp;<?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>
    6473
    6574                <?php $this->panel_end(); ?>
  • sendpress/trunk/classes/views/class-sendpress-view-subscribers-listcreate.php

    r1598832 r2223857  
    2424        update_post_meta($list_id, 'meta-value',SPNL()->validate->_string('meta-value'));
    2525        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'));
    2627
    2728        SendPress_Admin::redirect('Subscribers');
     
    8081
    8182        <br><br>
     83            <label>User Meta Field to get email from</label>
     84            <input type="text" name="meta-custom-email" value="" />
     85            <br><br>
    8286
    8387        <?php
  • sendpress/trunk/classes/views/class-sendpress-view-subscribers-listedit.php

    r1598832 r2223857  
    2626        update_post_meta($listid, 'meta-compare', SPNL()->validate->_string('meta-compare'));
    2727        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'));
    2829        update_post_meta($listid, 'opt-in-id', SPNL()->validate->_int('opt-in-id'));
    2930        }
     
    9798
    9899        <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>
    100103        <?php
    101104
     
    103106        $current_opt_in_id = get_post_meta($listinfo->ID, 'opt-in-id', true);
    104107        ?>
     108
     109
     110
    105111        <label>Double Opt In E-mail</label>
    106112        <select name="opt-in-id">
  • sendpress/trunk/classes/views/class-sendpress-view-subscribers-listform.php

    r1598832 r2223857  
    6363    &lt;input type="hidden" name="sendpress" value="post" />
    6464    <div id="form-wrap">
    65         <p name="email">
    66             <label for="email">EMail:</label>
     65        <p>
     66            <label for="sp_email">EMail:</label>
    6767            &lt;input type="text" value="" name="sp_email"/>
    6868        </p>
    69         <p name="firstname">
    70             <label for="email">First Name:</label>
     69        <p>
     70            <label for="sp_firstname">First Name:</label>
    7171            &lt;input type="text" value="" name="sp_firstname"/>
    7272        </p>
    73         <p name="lastname">
    74             <label for="email">Last Name:</label>
     73        <p>
     74            <label for="sp_lastname">Last Name:</label>
    7575            &lt;input type="text" value="" name="sp_lastname"/>
    7676        </p>
  • sendpress/trunk/classes/views/class-sendpress-view-subscribers-sync.php

    r1750249 r2223857  
    2020
    2121    function html() {
    22 
     22        $blogusers = 0;
     23        $role_to_sync = '';
    2324        $list = SPNL()->validate->_int('listID');
    2425        if( $list > 0 ){
     
    6566<input type="hidden" id="post_ID" name="post_ID" value="<?php echo $list; ?>" />
    6667<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>
    6869<br>
    6970
  • sendpress/trunk/readme.txt

    r2161605 r2223857  
    44Tags: newsletter, newsletters, manager newsletter, newsletter signup, newsletter widget, subscribers, subscription, email marketing, email, emailing, smtp, sendpress, sendgrid, mandrill, mailchimp
    55Requires at least: 4.4
    6 Tested up to: 5.2.1
    7 Stable tag: 1.10.9.23
     6Tested up to: 5.3.2
     7Stable tag: 1.20.1.7
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    119119Previous releases can be downloaded from [GitHub](https://github.com/brewlabs/sendpress/releases)
    120120
     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
    121127= 1.10.9.23 - 2019.9.23 =
    122128* remove debug log
  • sendpress/trunk/sendpress.php

    r2161605 r2223857  
    22/*
    33Plugin Name: SendPress Newsletters
    4 Version: 1.10.9.23
     4Version: 1.20.1.7
    55Plugin URI: https://sendpress.com
    66Description: Easy to manage Newsletters for WordPress.
     
    2020define( 'SENDPRESS_API_VERSION', 1 );
    2121define( 'SENDPRESS_MINIMUM_WP_VERSION', '3.6' );
    22 define( 'SENDPRESS_VERSION', '1.10.9.23' );
     22define( 'SENDPRESS_VERSION', '1.20.1.7' );
    2323define( 'SENDPRESS_URL', plugin_dir_url( __FILE__ ) );
    2424define( 'SENDPRESS_PATH', plugin_dir_path( __FILE__ ) );
     
    441441        $this->add_custom_post();
    442442
    443 
     443        /*
    444444        if( defined( 'DOING_AJAX' ) || ( isset( $_GET['sendpress_display'] ) && 'true' == $_GET['sendpress_display'] ) ) {
    445445            $this->loader->add_action( 'customize_register', $this->customizer, 'register_customize_sections' );
     
    455455            $this->customizer->remove_all_actions();
    456456        }
     457        */
    457458        $this->loader->run();
    458459
Note: See TracChangeset for help on using the changeset viewer.