Plugin Directory

Changeset 615558


Ignore:
Timestamp:
10/22/2012 12:44:06 PM (13 years ago)
Author:
fred91
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • simplicy-post-view/trunk/simplicy-post-view.php

    r604799 r615558  
    22/*
    33 * Plugin Name: Simplicy post view
    4  * Version: 1.9.1
     4 * Version: 1.9.2
    55 * Plugin URI: http://www.naxialis.com/simplicy-post-view
    66 * Description: afficher vos article avec miniature dans votre sidebar.
     
    9191                     <?php } ?>
    9292                     <!-- affichage de la miniature -->
     93                     <?php if ( $instance['view_thumbs'] ) : ?>
    9394                     <?php
    9495                    if (has_post_thumbnail()) { ?>
     
    104105                   </a>
    105106                   <?php } else { } // Si il n'y a pas d'image on affiche rien ?>
    106                    <!-- caption image -->
     107                    <?php endif; ?>
     108                    <!-- caption image -->
    107109                   <?php if ( $instance['caption_view'] ) : ?>
    108110                   <dt class="wp-caption-text-simplicy" style="width: <?php echo $thumb_w ; ?>px;"><?php if (the_post_thumbnail_caption()) { echo the_post_thumbnail_caption() ; }?> </dt>
     
    116118                   <dt class="simplicy-date_post"> Le <?php the_time('j F, Y') ?>| <strong><?php comments_number('0','1 ','%' );?></strong> </dt>
    117119                   <?php endif; ?>
     120                   
    118121                   <!-- affichage de l'extrait -->
    119122                   <?php if ( $instance['excerpt'] ) : ?>
     
    445448      $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);
    446449     
     450     
     451     
    447452      return $excerpt;
    448453    }
    449454       
    450 
     455// Excerpt filter html tags
     456     function simplicy_content_tags($limit) {
     457      $content = explode(' ', get_the_content(), $limit);
     458     
     459      if (count($content)>=$limit) {
     460        array_pop($content);
     461        $content = implode(" ",$content).'';
     462      } else {
     463        $content = implode(" ",$content);
     464      }
     465      $content = preg_replace('/<img[^>]+./','', $content);
     466      $content = apply_filters('the_content', $content);
     467       
     468      $content = str_replace( array( '<p>&nbsp;</p>' ), '', $content );
     469     
     470   
     471      return $content;
     472    }
    451473
    452474
Note: See TracChangeset for help on using the changeset viewer.