WordPress.org

Plugin Directory

Changeset 804337


Ignore:
Timestamp:
11/14/13 11:40:59 (4 years ago)
Author:
ralerin
Message:

Fixed problem with featured images.
Fixed problem with javascript header in subscription form.

Location:
newsletter-composer/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • newsletter-composer/trunk/languages/en-EN.php

    r799708 r804337  
    1010 //For emails.php 
    1111$emails_text = array(); 
    12 $emails_text['button_new']= 'New newsletter'; 
     12$emails_text['button_new']= 'New'; 
    1313$emails_text['title']= 'Title'; 
    1414$emails_text['date_creation']= 'Creation date'; 
    1515 
    1616//For emails-edit.php 
    17 $subject = 'Subject (Title)'; 
    1817$days = array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); 
    1918$months = array("January","February","March","April","May","June","July","August","September","October","November","December");  
    20 $date_separator = ' ';  
     19$date_separator = '';  
    2120 
    2221$emails_edit_text = array(); 
     
    3736$emails_edit_text['Title'] = 'Title'; 
    3837$emails_edit_text['Example'] = 'Example'; 
    39 $emails_edit_text['example_subject'] = $months[date('n')-1]. "".$date_separator.date('Y'); 
    4038$emails_edit_text['Newsletter'] = 'Newsletter'; 
    4139$emails_edit_text['reduce1'] = 'HTML too large. Delete at least '; 
    4240$emails_edit_text['reduce2'] = ' characters.'; 
    43 $emails_edit_text['order_desc'] = 'You can drag title entries and set a new order:'; 
    4441 
    45  
     42$email_error = 'Invalid email'; 
    4643?> 
  • newsletter-composer/trunk/languages/es-ES.php

    r799708 r804337  
    1010//For emails.php 
    1111$emails_text = array(); 
    12 $emails_text['button_new']= 'Nuevo newsletter'; 
     12$emails_text['button_new']= 'Nuevo'; 
    1313$emails_text['title']= 'Título'; 
    1414$emails_text['date_creation']= 'Fecha de creación'; 
    1515 
    1616//For emails-edit.php 
    17 $subject = 'Asunto (Título)'; 
    1817$days = array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"); 
    1918$months = array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"); 
    20 $date_separator = ', ';  
     19$date_separator = 'de ';  
    2120 
    2221$emails_edit_text = array(); 
     
    3736$emails_edit_text['Title'] = 'Título'; 
    3837$emails_edit_text['Example'] = 'Ejemplo'; 
    39 $emails_edit_text['example_subject'] = $months[date('n')-1]. "".$date_separator.date('Y'); 
    4038$emails_edit_text['Newsletter'] = 'Boletín'; 
    4139$emails_edit_text['reduce1'] = 'El html es demasiado grande. Reduzca su tamaño en, al menos, '; 
    4240$emails_edit_text['reduce2'] = ' caracteres.'; 
    43 $emails_edit_text['order_desc'] = 'Puede arrastrar los títulos de las entradas para cambiar su orden:'; 
    4441 
    45  
     42$email_error = 'Debe introducir una dirección válida'; 
    4643?> 
  • newsletter-composer/trunk/plugin-head.inc.php

    r799708 r804337  
    1 <?php $options = get_option('newsletter_profile'); ?> 
     1<?php $options = get_option('newsletter_profile');  
     2//Select language 
     3$blog_language = get_bloginfo('language');  
     4if(!strcmp($blog_language,'es-ES')){ 
     5    @include_once 'languages/es-ES.php'; 
     6}else{ 
     7    @include_once 'languages/en-EN.php'; 
     8} 
     9 
     10?> 
    211<script type="text/javascript"> 
    312//<![CDATA[ 
     
    514    var re = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; 
    615    if (!re.test(f.elements["suscriber_email"].value)) { 
    7         alert("<?php echo addslashes($options['email_error']); ?>"); 
     16        alert("<?php echo $email_error; ?>"); 
    817        return false; 
    918    } 
  • newsletter-composer/trunk/plugin.php

    r799708 r804337  
    276276function nt_post_image($post_id, $size='thumbnail', $alternative=null) { 
    277277 
    278     $attachments = get_children(array('post_parent' => $post_id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')); 
    279  
    280     if (empty($attachments)) { 
     278    if (has_post_thumbnail( $post_id ) ): 
     279        $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), $size ); 
     280    endif;  
     281 
     282    if (empty($image)) { 
    281283        return $alternative; 
    282284    } 
    283285 
    284     foreach ($attachments as $id => $attachment) { 
    285         $image = wp_get_attachment_image_src($id, $size); 
    286         return $image[0]; 
    287     } 
    288     return null; 
     286    return $image[0]; 
    289287} 
    290288 
Note: See TracChangeset for help on using the changeset viewer.