Changeset 541614
- Timestamp:
- 05/08/2012 07:59:28 PM (14 years ago)
- Location:
- simplicy-post-view/trunk
- Files:
-
- 2 edited
-
css/simplicy-post-view.css (modified) (1 diff)
-
simplicy-post-view.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simplicy-post-view/trunk/css/simplicy-post-view.css
r515875 r541614 7 7 .SP-post a:hover { text-decoration:none; } 8 8 /* Alignement du texte */ 9 .SP-post p { }9 .SP-post p { margin:0 ; padding:0; float:left;} 10 10 /* Mise en forme image alignement, bordure , marge */ 11 11 .simplicy-post-img { -
simplicy-post-view/trunk/simplicy-post-view.php
r519415 r541614 2 2 /* 3 3 * Plugin Name: Simplicy post view 4 * Version: 1. 85 * Plugin URI: http:// plugins.svn.wordpress.org/simplicy-post-view4 * Version: 1.9 5 * Plugin URI: http://www.naxialis.com/simplicy-post-view 6 6 * Description: afficher vos article avec miniature dans votre sidebar. 7 7 * Author: Naxialis 8 * Author URI: http://www.naxialis.com/ simplicy-post-view8 * Author URI: http://www.naxialis.com/ 9 9 */ 10 10 wp_enqueue_style('simplicy-post-view', '/wp-content/plugins/simplicy-post-view/css/simplicy-post-view.css'); … … 97 97 98 98 <p><?php if ( $instance['excerpt'] ) : ?> 99 <?php echo excerpt_simplicy($instance["excerpt_length"]); ?></p>99 <?php echo simplicy_content($instance["excerpt_length"]); ?></p> 100 100 101 101 <?php endif; ?> … … 272 272 273 273 // 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) . '">' . ' ... »' . '</a>'; 279 280 } else { 280 $ excerpt = implode(" ",$excerpt);281 $content = implode(" ",$content); 281 282 } 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> </p>' ), '', $content ); 286 287 288 return $content; 284 289 } 285 290 286 // modification affichage excert (...) 287 function custom_excerpt_more() { 288 global $post; 289 return '<a href="'. get_permalink($post->ID) . '">' . ' ... »' . '</a>'; 290 } 291 add_filter('excerpt_more', 'custom_excerpt_more'); 291 292 293 292 294 293 295 /**
Note: See TracChangeset
for help on using the changeset viewer.