Changeset 8860
- Timestamp:
- 09/11/2008 05:36:34 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-pages.php
r8857 r8860 46 46 wp_enqueue_script('admin-forms'); 47 47 wp_enqueue_script('inline-edit'); 48 wp_enqueue_script('pages'); 48 49 49 50 $post_stati = array( // array( adj, noun ) … … 78 79 <div class="wrap"> 79 80 <form id="posts-filter" action="" method="get"> 81 82 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a> 83 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div> 84 85 <div id="edit-settings" class="hide-if-js hide-if-no-js"> 86 <div id="edit-settings-wrap"> 87 <h5><?php _e('Show on screen') ?></h5> 88 <div class="metabox-prefs"> 89 <?php manage_columns_prefs('page') ?> 90 <br class="clear" /> 91 </div></div> 92 </div> 93 80 94 <h2><?php 81 95 // Use $_GET instead of is_ since they can override each other … … 176 190 <thead> 177 191 <tr> 178 <?php $posts_columns = wp_manage_pages_columns(); ?> 179 <?php foreach($posts_columns as $post_column_key => $column_display_name) { 192 <?php 193 $posts_columns = wp_manage_pages_columns(); 194 $hidden = (array) get_user_option( 'manage-page-columns-hidden' ); 195 foreach($posts_columns as $post_column_key => $column_display_name) { 180 196 if ( 'cb' === $post_column_key ) 181 197 $class = ' class="check-column"'; 182 198 elseif ( 'comments' === $post_column_key ) 183 $class = ' class="num"'; 199 $class = ' class="manage-column column-comments num"'; 200 elseif ( 'modified' === $post_column_key ) 201 $class = ' class="manage-column column-date"'; 184 202 else 185 $class = ''; 186 ?> 187 <th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th> 203 $class = " class=\"manage-column column-$post_column_key\""; 204 205 $style = ''; 206 if ( in_array($post_column_key, $hidden) ) 207 $style = ' style="display:none;"'; 208 ?> 209 <th scope="col"<?php echo "id=\"$post_column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th> 188 210 <?php } ?> 189 211 </tr> … … 194 216 </tbody> 195 217 </table> 218 219 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 196 220 197 221 </form> -
trunk/wp-admin/includes/template.php
r8858 r8860 892 892 $class = ('alternate' == $class ) ? '' : 'alternate'; 893 893 $posts_columns = wp_manage_pages_columns(); 894 $hidden = (array) get_user_option( 'manage-page-columns-hidden' ); 894 895 $title = get_the_title(); 895 896 if ( empty($title) ) … … 902 903 903 904 foreach ($posts_columns as $column_name=>$column_display_name) { 905 $class = "class=\"$column_name column-$column_name\""; 906 907 $style = ''; 908 if ( in_array($column_name, $hidden) ) 909 $style = ' style="display:none;"'; 910 911 $attributes = "$class$style"; 904 912 905 913 switch ($column_name) { … … 912 920 case 'modified': 913 921 case 'date': 922 $attributes = 'class="date column-date"' . $style; 914 923 if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) { 915 924 $t_time = $h_time = __('Unpublished'); … … 934 943 } 935 944 ?> 936 <td class="date"><abbr title="<?php echo $t_time ?>"><?php echo $h_time ?></abbr></td>945 <td <?php echo $attributes ?>><abbr title="<?php echo $t_time ?>"><?php echo $h_time ?></abbr></td> 937 946 <?php 938 947 break; 939 948 case 'title': 949 $attributes = 'class="post-title page-title column-title"' . $style; 940 950 $edit_link = get_edit_post_link( $page->ID ); 941 951 ?> 942 <td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; } ?></strong>952 <td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; } ?></strong> 943 953 <?php 944 954 if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); } 945 946 if ( 'excerpt' == $mode )947 the_excerpt();948 955 949 956 $actions = array(); … … 964 971 965 972 case 'comments': 966 ?> 967 <td class="comments num"><div class="post-com-count-wrapper"> 973 $attributes = 'class="comments column-comments num"' . $style; 974 ?> 975 <td <?php echo $attributes ?>><div class="post-com-count-wrapper"> 968 976 <?php 969 977 $left = get_pending_comments_num( $page->ID ); … … 981 989 case 'author': 982 990 ?> 983 <td class="author"><a href="edit-pages.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td>991 <td <?php echo $attributes ?>><a href="edit-pages.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td> 984 992 <?php 985 993 break; … … 987 995 case 'status': 988 996 ?> 989 <td class="status">997 <td <?php echo $attributes ?>> 990 998 <a href="<?php the_permalink(); ?>" title="<?php echo attribute_escape(sprintf(__('View "%s"'), $title)); ?>" rel="permalink"> 991 999 <?php -
trunk/wp-includes/script-loader.php
r8858 r8860 260 260 261 261 $scripts->add( 'posts', '/wp-admin/js/posts.js', array('columns'), '20080910' ); 262 $scripts->add( 'pages', '/wp-admin/js/pages.js', array('columns'), '20080910' ); 262 263 263 264 $scripts->add( 'columns', '/wp-admin/js/columns.js', false, '20080910' );
Note: See TracChangeset
for help on using the changeset viewer.