Changeset 8894 for trunk/wp-admin/edit-attachment-rows.php
- Timestamp:
- 09/15/2008 05:53:30 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-attachment-rows.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-attachment-rows.php
r8682 r8894 13 13 <tr> 14 14 15 <?php $posts_columns = wp_manage_media_columns(); ?> 16 <?php foreach($posts_columns as $post_column_key => $column_display_name) { 15 <?php 16 $posts_columns = wp_manage_media_columns(); 17 $hidden = (array) get_user_option( 'manage-media-columns-hidden' ); 18 ?> 19 <?php foreach ($posts_columns as $post_column_key => $column_display_name ) { 17 20 if ( 'cb' === $post_column_key ) 18 21 $class = ' class="check-column"'; 19 22 elseif ( 'comments' === $post_column_key ) 20 $class = ' class="num"'; 23 $class = ' class="manage-column column-comments num"'; 24 elseif ( 'modified' === $post_column_key ) 25 $class = ' class="manage-column column-date"'; 21 26 else 22 $class = ''; 23 ?> 24 <th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th> 27 $class = " class=\"manage-column column-$post_column_key\""; 28 29 $style = ''; 30 if ( in_array($post_column_key, $hidden) ) 31 $style = ' style="display:none;"'; 32 ?> 33 <th scope="col"<?php echo "id=\"$post_column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th> 25 34 <?php } ?> 26 35 … … 45 54 <?php 46 55 47 foreach($posts_columns as $column_name=>$column_display_name) { 56 foreach ($posts_columns as $column_name => $column_display_name ) { 57 $class = "class=\"$column_name column-$column_name\""; 58 59 $style = ''; 60 if ( in_array($column_name, $hidden) ) 61 $style = ' style="display:none;"'; 62 63 $attributes = "$class$style"; 48 64 49 65 switch($column_name) { … … 51 67 case 'cb': 52 68 ?> 53 <th scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /></th>69 <th scope="row" <?php echo $attributes ?>><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /></th> 54 70 <?php 55 71 break; 56 72 57 73 case 'icon': 74 $attributes = 'class="post-title column-title"' . $style; 58 75 ?> 59 76 <td class="media-icon"><?php … … 73 90 case 'media': 74 91 ?> 75 <td ><strong><a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br />92 <td <?php echo $attributes ?>><strong><a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br /> 76 93 <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?> 77 94 <p> … … 87 104 case 'tags': 88 105 ?> 89 <td ><?php106 <td <?php echo $attributes ?>><?php 90 107 $tags = get_the_tags(); 91 108 if ( !empty( $tags ) ) { … … 103 120 case 'desc': 104 121 ?> 105 <td ><?php echo has_excerpt() ? $post->post_excerpt : ''; ?></td>122 <td <?php echo $attributes ?>><?php echo has_excerpt() ? $post->post_excerpt : ''; ?></td> 106 123 <?php 107 124 break; … … 124 141 } 125 142 ?> 126 <td ><?php echo $h_time ?></td>143 <td <?php echo $attributes ?>><?php echo $h_time ?></td> 127 144 <?php 128 145 break; … … 137 154 } 138 155 ?> 139 <td ><strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong>, <?php echo get_the_time(__('Y/m/d')); ?></td>156 <td <?php echo $attributes ?>><strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong>, <?php echo get_the_time(__('Y/m/d')); ?></td> 140 157 <?php 141 158 } else { 142 159 ?> 143 <td > </td>160 <td <?php echo $attributes ?>> </td> 144 161 <?php 145 162 } … … 148 165 149 166 case 'comments': 150 ?> 151 <td class="num"><div class="post-com-count-wrapper"> 167 $attributes = 'class="comments column-comments num"' . $style; 168 ?> 169 <td <?php echo $attributes ?>><div class="post-com-count-wrapper"> 152 170 <?php 153 171 $left = get_pending_comments_num( $post->ID ); … … 165 183 case 'actions': 166 184 ?> 167 <td >185 <td <?php echo $attributes ?>> 168 186 <a href="media.php?action=edit&attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php _e('Edit'); ?></a> | 169 187 <a href="<?php the_permalink(); ?>"><?php _e('Get permalink'); ?></a> … … 174 192 default: 175 193 ?> 176 <td ><?php do_action('manage_media_custom_column', $column_name, $id); ?></td>194 <td <?php echo $attributes ?>><?php do_action('manage_media_custom_column', $column_name, $id); ?></td> 177 195 <?php 178 196 break;
Note: See TracChangeset
for help on using the changeset viewer.