Plugin Directory

Changeset 541614


Ignore:
Timestamp:
05/08/2012 07:59:28 PM (14 years ago)
Author:
fred91
Message:
 
Location:
simplicy-post-view/trunk
Files:
2 edited

Legend:

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

    r515875 r541614  
    77.SP-post a:hover { text-decoration:none; }
    88/* Alignement du texte */
    9 .SP-post p {}
     9.SP-post p { margin:0 ; padding:0; float:left;}
    1010/* Mise en forme image alignement, bordure , marge */
    1111.simplicy-post-img {
  • simplicy-post-view/trunk/simplicy-post-view.php

    r519415 r541614  
    22/*
    33 * Plugin Name: Simplicy post view
    4  * Version: 1.8
    5  * Plugin URI: http://plugins.svn.wordpress.org/simplicy-post-view
     4 * Version: 1.9
     5 * Plugin URI: http://www.naxialis.com/simplicy-post-view
    66 * Description: afficher vos article avec miniature dans votre sidebar.
    77 * Author: Naxialis
    8  * Author URI: http://www.naxialis.com/simplicy-post-view
     8 * Author URI: http://www.naxialis.com/
    99 */
    1010 wp_enqueue_style('simplicy-post-view', '/wp-content/plugins/simplicy-post-view/css/simplicy-post-view.css');
     
    9797
    9898                    <p><?php if ( $instance['excerpt'] ) : ?>
    99                      <?php echo excerpt_simplicy($instance["excerpt_length"]); ?></p>
     99                     <?php echo simplicy_content($instance["excerpt_length"]); ?></p>
    100100                   
    101101                    <?php endif; ?>
     
    272272
    273273// Excerpt length filter
    274     function excerpt_simplicy($limit) {
    275       $excerpt = explode(' ', get_the_excerpt(), $limit);
    276       if (count($excerpt)>=$limit) {
    277         array_pop($excerpt);
    278         $excerpt = implode(" ",$excerpt).'...';
     274     function simplicy_content($limit) {
     275      $content = explode(' ', get_the_content(), $limit);
     276     
     277      if (count($content)>=$limit) {
     278        array_pop($content);
     279        $content = implode(" ",$content).'<a href="'. get_permalink($post->ID) . '">' . ' ... &raquo;' . '</a>';
    279280      } else {
    280         $excerpt = implode(" ",$excerpt);
     281        $content = implode(" ",$content);
    281282      }
    282       $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);
    283       return $excerpt;
     283      $content = preg_replace('/<img[^>]+./','', $content);
     284      $content = apply_filters('the_content', $content);
     285      $content = str_replace( array( '<p>&nbsp;</p>' ), '', $content );
     286     
     287   
     288      return $content;
    284289    }
    285290       
    286         // modification affichage excert (...)
    287 function custom_excerpt_more() {
    288     global $post;
    289     return '<a href="'. get_permalink($post->ID) . '">' . ' ... &raquo;' . '</a>';
    290 }
    291 add_filter('excerpt_more', 'custom_excerpt_more'); 
     291
     292
     293   
    292294
    293295/**
Note: See TracChangeset for help on using the changeset viewer.