Changeset 476555
- Timestamp:
- 12/16/2011 09:08:46 PM (14 years ago)
- Location:
- simplicy-post-view/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
simplicy-post-view.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simplicy-post-view/trunk/readme.txt
r470662 r476555 36 36 == Changelog == 37 37 38 = Version 1.0 (21/05/2011) = = Version 1.1 (27/06/2011) = = Version 1.2 (28/10/2011) = = Fixed minor bugs and add css style sheet= = Version 1.3 (18/11/2011) = = Fixed minor bugs == Version 1.4 (3/12/2011) = = Fixed bugs Excerpt 39 2 38 = Version 1.0 (21/05/2011) =<br /> = Version 1.1 (27/06/2011) =<br /> = Version 1.2 (28/10/2011) = = Fixed minor bugs and add css style sheet= <br />= Version 1.3 (18/11/2011) = = Fixed minor bugs = <br />= Version 1.4 (3/12/2011) = = Fixed bugs Excerpt = 39 <br />= Version 1.5 (16/12/2011) = = adding option Select all category 40 -
simplicy-post-view/trunk/simplicy-post-view.php
r470662 r476555 2 2 /* 3 3 * Plugin Name: Simplicy post view 4 * Version: 1. 34 * Version: 1.5 5 5 * Plugin URI: http://plugins.svn.wordpress.org/simplicy-post-view/ 6 6 * Description: afficher vos article avec miniature dans votre sidebar. … … 21 21 extract($args); 22 22 $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']); 23 $item = empty($instance['item']) ? null: $instance['item'];23 $item = empty($instance['item']) ? '0' : $instance['item']; 24 24 $nb_posts = empty($instance['posts_nb']) ? 5 : $instance['posts_nb'] ; 25 25 $thumb_w = empty($instance['thumb_w']) ? null : $instance['thumb_w']; … … 167 167 echo '<p style="text-align:left;"><label for="' . $this->get_field_name('title') . '">' . __('<p>Titre:</p>') . ' <input style="width: 250px;float:left;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>'; ?> 168 168 169 <?php //La catégorie ?>169 <?php //La catégorie ?> 170 170 <br /><br /> 171 171 <p> 172 <label for="<?php echo $this->get_field_name('item'); ?>"><?php echo __('Selectioner un article ou une catégorie:'); ?></label><br><br /> 172 <label style=" margin-bottom:0; padding-bottom:0;" for="<?php echo $this->get_field_name('item'); ?>"><?php echo __('Selectioner une catégorie: '); ?><p style="font-size:9px; padding-top:0; margin-top:0;"><em>Laissez le champ vide pour afficher toutes les catégories.</em></p></label> 173 173 174 <select name="<?php echo $this->get_field_name('item'); ?>" id="<?php echo $this->get_field_id('item'); ?>"> 174 <option value=""> Choisir un article ou une catégorie</option>175 <option value=""> </option> 175 176 <?php foreach(spp_get_dropdown() as $category) : ?> 176 177 <option style="width: 225px;" <?php echo ('c:' . $category['category_id'] == $instance['item']) ? 'selected' : '' ?> value="c:<?php echo $category['category_id']; ?>"> 177 Catégorie: <?php echo $category['category_name']; ?> 178 Catégorie: <?php echo $category['category_name']; ?> 179 178 180 </option> 179 181 … … 354 356 */ 355 357 function spp_get_categories() { 356 global $wpdb;358 global $wpdb; 357 359 $categories = $wpdb->get_results( 358 360 "SELECT {$wpdb->terms}.term_id, name FROM {$wpdb->terms} … … 366 368 367 369 function spp_get_dropdown() { 368 $categories = spp_get_categories();370 $categories = spp_get_categories(); 369 371 $i = 0; 370 372 foreach($categories as $category) {
Note: See TracChangeset
for help on using the changeset viewer.