Plugin Directory

Changeset 1461459


Ignore:
Timestamp:
07/27/2016 03:24:13 PM (10 years ago)
Author:
joshl
Message:

Bug fixes

Location:
sendpress/trunk
Files:
7 edited

Legend:

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

    r1441238 r1461459  
    451451        foreach($link as $key => $url ){
    452452                if($px !== 'text'){
    453                     $output .= '<a href="'. $url .'" ><img src="'.  SENDPRESS_URL .'img/'. $px .'/'. $key .'.png" alt="'. $key .'" /></a> ';
     453                    $output .= '<a href="'. $url .'" ><img class="sp-social" src="'.  SENDPRESS_URL .'img/'. $px .'/'. $key .'.png" alt="'. $key .'" /></a> ';
    454454                } else {
    455455                    if($c > 1){
     
    10551055        $has_data = SendPress_Data::get_subscriber_meta( $subscriber_id, $meta_key, $list_id, true );
    10561056        if(empty($has_data)){
    1057             return SendPress_Data::add_subscriber_meta( $subscriber_id, $meta_key, $meta_value, $list_id, $app_only );
     1057            return SendPress_Data::add_subscriber_meta( $subscriber_id, $meta_key, $meta_value, $list_id );
    10581058        } else {
    1059             return $wpdb->update( $meta_table, array('meta_value'=>$meta_value), array('subscriberID'=>$subscriber_id,'meta_key' => $meta_key , 'meta_value' => $has_data[0]->meta_value, 'app_only' => $app_only ) );
     1059            return $wpdb->update( $meta_table, array('meta_value'=>$meta_value), array('subscriberID'=>$subscriber_id,'meta_key' => $meta_key , 'meta_value' => $has_data[0]->meta_value) );
    10601060        }
    10611061
  • sendpress/trunk/classes/class-sendpress-template.php

    r1456109 r1461459  
    552552            )
    553553             */
     554            $strings = array('sp-img','sp-social','sp-skip');
    554555
    555556            foreach ($dom->getElementsByTagName('img') as $k => $img) {
    556557                $c = explode(' ',$img->getAttribute('class'));
    557558                $styled = $img->getAttribute('style');
    558                 if( is_array($c) ){
     559                $replace_w = false;
     560                $replace_h = false;
     561
     562                $width_r = $img->setAttribute('width','');
     563                $w_r = strpos($width_r, '%');
     564                if($w_r === false){
     565                    $replace_w = true;
     566                }
     567
     568                $height_r = $img->setAttribute('height','');
     569                $h_r = strpos($height_r, '%');
     570                if($h_r === false){
     571                    $replace_h = true;
     572                }
     573
     574
     575
     576                if( is_array($c) && ( count(array_intersect($c, $strings)) == 0 ) ){
    559577                    $replace_image = false;
    560578                    if( in_array('alignleft',$c) ){
     
    564582                            $img->setAttribute('style','margin-right: 10px');
    565583                            $img->setAttribute('class', 'sp-img ' . implode(' ', $c) );
    566                             $img->setAttribute('width','');
    567                                     $img->setAttribute('height','');
     584                            if( $replace_w ){
     585                                $img->setAttribute('width','');
     586                            }
     587                            if( $replace_h ){
     588                                $img->setAttribute('height','');
     589                            }
    568590                        }
    569591
     
    575597                            $img->setAttribute('style','margin-left: 10px');
    576598                            $img->setAttribute('class', 'sp-img ' . implode(' ', $c) );
    577                             $img->setAttribute('width','');
    578                                     $img->setAttribute('height','');
     599                            if( $replace_w ){
     600                                $img->setAttribute('width','');
     601                            }
     602                            if( $replace_h ){
     603                                $img->setAttribute('height','');
     604                            }
    579605                        }
    580606                    }
    581607                    //Center any image that has not been updated..
    582                     if( in_array('aligncenter',$c) ||  ( $replace_image ==false && !in_array('sp-img',$c) ) ){
     608                    if( in_array('aligncenter',$c) ||   $replace_image ==false ){
    583609
    584610                            $table = $dom->createElement('table');
     
    600626                            $img_r = $img->clonenode(true);
    601627                            $img_r->setAttribute('align','center');
    602                                 $img_r->setAttribute('width','');
    603                                     $img_r->setAttribute('height','');
     628                            if( $replace_w ){
     629                                $img_r->setAttribute('width','');
     630                            }
     631                            if( $replace_h ){
     632                                $img_r->setAttribute('height','');
     633                            }
    604634
    605635                            $img_r->setAttribute('class', 'sp-img ' .implode(' ', $c) );
  • sendpress/trunk/classes/views/class-sendpress-view-emails-create.php

    r1437458 r1461459  
    121121            'orderby' => 'title',
    122122            'order' => 'ASC',
     123            'posts_per_page' => -1,
    123124            );
    124125
     
    142143            'orderby' => 'title',
    143144            'order' => 'ASC',
     145            'posts_per_page' => -1,
    144146            );
    145147
  • sendpress/trunk/classes/views/class-sendpress-view-emails-edit.php

    r1450201 r1461459  
    219219            'post_type' => 'sp_template' ,
    220220            'post_status' => array('sp-standard'),
     221            'posts_per_page' => -1,
    221222            );
    222223
     
    243244            'post_type' => 'sp_template' ,
    244245            'post_status' => array('sp-custom'),
     246            'posts_per_page' => -1,
    245247            );
    246248
  • sendpress/trunk/classes/views/class-sendpress-view-subscribers-subscriber.php

    r1437458 r1461459  
    209209</div>
    210210</form>
    211 <h3>Subscriber Actions and Events</h3>
     211<!--<h3>Subscriber Actions and Events</h3>-->
    212212    <div class="well">
    213213        <?php
     214        /*
    214215        if(!defined("SENDPRESS_PRO_VERSION") ){
    215216            _e('This feature requires SendPress Pro.','sendpress');
     
    217218            do_action('sendpress_subscriber_events_view', SPNL()->validate->_int('subscriberID') );
    218219        }
     220        */
    219221        ?>
    220222    </div>
     223   
    221224
    222225   
  • sendpress/trunk/readme.txt

    r1456109 r1461459  
    55Requires at least: 3.7
    66Tested up to: 4.5.3
    7 Stable tag: 1.7.7.17
     7Stable tag: 1.7.7.27
    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.7.7.27 - 2016.7.27 =
     122* Fix: Post notification error
     123* Fix: Social Icon alignment
     124* Fix: Template list limited to 10
     125
    121126= 1.7.7.17 - 2016.7.17 =
    122127* Fix: Error when sending
  • sendpress/trunk/sendpress.php

    r1456109 r1461459  
    22/*
    33Plugin Name: SendPress Newsletters
    4 Version: 1.7.7.17
     4Version: 1.7.7.27
    55Plugin URI: https://sendpress.com
    66Description: Easy to manage Newsletters for WordPress.
     
    1919define( 'SENDPRESS_API_VERSION', 1 );
    2020define( 'SENDPRESS_MINIMUM_WP_VERSION', '3.6' );
    21 define( 'SENDPRESS_VERSION', '1.7.7.17' );
     21define( 'SENDPRESS_VERSION', '1.7.7.27' );
    2222define( 'SENDPRESS_URL', plugin_dir_url( __FILE__ ) );
    2323define( 'SENDPRESS_PATH', plugin_dir_path( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.