X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b137f4ce021b4022c56f452c2eafa7abfcef0a7c..refs/tags/wordpress-3.2:/wp-admin/includes/template.php diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 2f16b3c1..a488baf8 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -425,7 +425,7 @@ function list_meta( $meta ) { - + @@ -440,7 +440,7 @@ function list_meta( $meta ) { - + @@ -535,7 +535,7 @@ function meta_form() {
- + @@ -942,10 +942,12 @@ function do_meta_boxes($page, $context, $object) { do { // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) { - foreach ( $sorted as $box_context => $ids ) - foreach ( explode(',', $ids) as $id ) - if ( $id ) + foreach ( $sorted as $box_context => $ids ) { + foreach ( explode(',', $ids ) as $id ) { + if ( $id && 'dashboard_browser_nag' !== $id ) add_meta_box( $id, null, null, $page, $box_context, 'sorted' ); + } + } } $already_sorted = true; @@ -961,7 +963,8 @@ function do_meta_boxes($page, $context, $object) { $style = ''; $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : ''; echo '
' . "\n"; - echo '

'; + if ( 'dashboard_browser_nag' != $box['id'] ) + echo '

'; echo "

{$box['title']}

\n"; echo '
' . "\n"; call_user_func($box['callback'], $object, $box); @@ -1627,16 +1630,16 @@ function _post_states($post) { $post_status = ''; if ( !empty($post->post_password) ) - $post_states[] = __('Password protected'); + $post_states['protected'] = __('Password protected'); if ( 'private' == $post->post_status && 'private' != $post_status ) - $post_states[] = __('Private'); + $post_states['private'] = __('Private'); if ( 'draft' == $post->post_status && 'draft' != $post_status ) - $post_states[] = __('Draft'); + $post_states['draft'] = __('Draft'); if ( 'pending' == $post->post_status && 'pending' != $post_status ) /* translators: post state */ - $post_states[] = _x('Pending', 'post state'); + $post_states['pending'] = _x('Pending', 'post state'); if ( is_sticky($post->ID) ) - $post_states[] = __('Sticky'); + $post_states['sticky'] = __('Sticky'); $post_states = apply_filters( 'display_post_states', $post_states ); @@ -1655,6 +1658,36 @@ function _post_states($post) { echo ' - ' . get_post_format_string( get_post_format( $post->ID ) ) . ''; } +function _media_states( $post ) { + $media_states = array(); + $stylesheet = get_option('stylesheet'); + + if ( current_theme_supports( 'custom-header') ) { + $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true ); + if ( ! empty( $meta_header ) && $meta_header == $stylesheet ) + $media_states[] = __( 'Header Image' ); + } + + if ( current_theme_supports( 'custom-background') ) { + $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true ); + if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) + $media_states[] = __( 'Background Image' ); + } + + $media_states = apply_filters( 'display_media_states', $media_states ); + + if ( ! empty( $media_states ) ) { + $state_count = count( $media_states ); + $i = 0; + echo ' - '; + foreach ( $media_states as $state ) { + ++$i; + ( $i == $state_count ) ? $sep = '' : $sep = ', '; + echo "$state$sep"; + } + } +} + /** * Convert a screen string to a screen object * @@ -1717,6 +1750,8 @@ function screen_meta($screen) { if ( !empty($wp_current_screen_options) ) $show_screen = true; + $show_screen = apply_filters('screen_options_show_screen', $show_screen, $screen); + ?>
@@ -1922,7 +1957,11 @@ function screen_options($screen) { return $return; } -function screen_icon($screen = '') { +function screen_icon( $screen = '' ) { + echo get_screen_icon( $screen ); +} + +function get_screen_icon( $screen = '' ) { global $current_screen, $typenow; if ( empty($screen) ) @@ -1950,9 +1989,7 @@ function screen_icon($screen = '') { $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $post_type ); } -?> -

-
'; } /** @@ -2189,4 +2226,3 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $ return $button; } -