Dotclear


Ignore:
Timestamp:
08/21/13 00:47:49 (12 years ago)
Author:
Denis Jean-Christian <contact@…>
Branch:
default
Message:

Add count on title for attachments on entry sidebar, fixes #1560

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/attachments/_admin.php

    r1468 r1501  
    2929               $core =& $GLOBALS['core']; 
    3030               $post_media = $core->media->getPostMedia($post->post_id); 
    31                $item = '<h5 class="clear s-attachments">'.__('Attachments').'</h5>'; 
     31               $nb_media = count($post_media); 
     32               $title = !$nb_media ? __('Attachments') : sprintf(__('Attachments (%d)'),$nb_media); 
     33               $item = '<h5 class="clear s-attachments">'.$title.'</h5>'; 
    3234               foreach ($post_media as $f) 
    3335               { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map