[wp-hackers] Re: [wp-svn] [8993] trunk/wp-admin: Add breadcrumb, remove h2 from edit.php.

Matt speedboxer at gmail.com
Sat Sep 27 02:09:29 GMT 2008


Will the "View Site" button be making a return soon?

2008/9/26  <m at wordpress.org>:
> Revision 8993 Author ryan Date 2008-09-26 22:27:48 +0000 (Fri, 26 Sep 2008)
>
> Log Message
>
> Add breadcrumb, remove h2 from edit.php. Styling carnage to be fixed
>
> Modified Paths
>
> trunk/wp-admin/admin-header.php
> trunk/wp-admin/edit-post-drafts.php
> trunk/wp-admin/edit.php
> trunk/wp-admin/wp-admin.css
>
> Diff
>
> Modified: trunk/wp-admin/admin-header.php (8992 => 8993)
>
> --- trunk/wp-admin/admin-header.php	2008-09-26 21:53:26 UTC (rev 8992)
> +++ trunk/wp-admin/admin-header.php	2008-09-26 22:27:48 UTC (rev 8993)
> @@ -30,13 +30,13 @@
>  }
>
>  get_admin_page_title();
> -
> +$title = wp_specialchars( strip_tags( $title ) );
>  ?>
>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>  <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns');
> ?> <?php language_attributes(); ?>>
>  <head>
>  <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>;
> charset=<?php echo get_option('blog_charset'); ?>" />
> -<title><?php bloginfo('name') ?> &rsaquo; <?php echo wp_specialchars(
> strip_tags( $title ) ); ?> &#8212; WordPress</title>
> +<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212;
> WordPress</title>
>  <?php
>
>  wp_admin_css( 'css/global' );
> @@ -80,7 +80,7 @@
>  <div id="sidemenu-bg"><br /></div>
>  <div id="wpcontent">
>  <div id="wphead">
> -<h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else
> echo get_bloginfo('name', 'display'); ?><span id="viewsite"><a href="<?php
> echo trailingslashit( get_option('home') ); ?>"><?php _e('Visit Site')
> ?></a></span></h1>
> +<h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else
> echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><a
> href="index.php"><?php _e('Dashboard') ?></a> &rsaquo; <?php echo $title
> ?></span></h1>
>  </div>
>
>  <?php
>
> Modified: trunk/wp-admin/edit-post-drafts.php (8992 => 8993)
>
> --- trunk/wp-admin/edit-post-drafts.php	2008-09-26 21:53:26 UTC (rev 8992)
> +++ trunk/wp-admin/edit-post-drafts.php	2008-09-26 22:27:48 UTC (rev 8993)
> @@ -1,7 +1,8 @@
>  <?php
>  $locked_post_status = 'draft';
>  $_GET['post_status'] = 'draft';
> -
> +require_once('admin.php');
> +$title = __('View Drafts');
>  require_once('edit.php');
>
>  ?>
> \ No newline at end of file
>
> Modified: trunk/wp-admin/edit.php (8992 => 8993)
>
> --- trunk/wp-admin/edit.php	2008-09-26 21:53:26 UTC (rev 8992)
> +++ trunk/wp-admin/edit.php	2008-09-26 22:27:48 UTC (rev 8993)
> @@ -67,7 +67,8 @@
>  	 exit;
>  }
>
> -$title = __('Posts');
> +if ( empty($title) )
> +	$title = __('View All Posts');
>  $parent_file = 'edit.php';
>  wp_enqueue_script('admin-forms');
>  wp_enqueue_script('inline-edit');
> @@ -123,37 +124,6 @@
>  <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
>  </div></form>
>
> -<h2><?php
> -if ( is_single() ) {
> -	printf(__('Comments on %s'), apply_filters( "the_title",
> $post->post_title));
> -} else {
> -	$post_status_label = _c('Posts|manage posts header');
> -	if ( isset($_GET['post_status']) && in_array( $_GET['post_status'],
> array_keys($post_stati) ) )
> -        $post_status_label = $post_stati[$_GET['post_status']][1];
> -   	//TODO: Unreachable code: $post_listing_pageable is undefined, Similar
> code in upload.php
> -	//if ( $post_listing_pageable && !is_archive() && !is_search() )
> -	//	$h2_noun = is_paged() ? sprintf(__( 'Previous %s' ),
> $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
> -	//else
> -		$h2_noun = $post_status_label;
> -	// Use $_GET instead of is_ since they can override each other
> -	$h2_author = '';
> -	$_GET['author'] = isset($_GET['author']) ? (int) $_GET['author'] : 0;
> -	if ( $_GET['author'] != 0 ) {
> -		if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion
> -			$h2_author = ' ' . __('by other authors');
> -		} else {
> -			$author_user = get_userdata( get_query_var( 'author' ) );
> -			$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars(
> $author_user->display_name ));
> -		}
> -	}
> -	$h2_search = isset($_GET['s'])   && $_GET['s']   ? ' ' .
> sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query()
> ) ) : '';
> -	$h2_cat    = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in
> &#8220;%s&#8221;'), single_cat_title('', false) ) : '';
> -	$h2_tag    = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf(
> __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : '';
> -	$h2_month  = isset($_GET['m'])   && $_GET['m']   ? ' ' . sprintf(
> __('during %s'), single_month_title(' ', false) ) : '';
> -	printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s">Add New</a>)|You can
> reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged
> with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat,
> $h2_tag, $h2_month, 'post-new.php' );
> -}
> -?></h2>
> -
>  <form id="posts-filter" action="" method="get">
>  <ul class="subsubsub">
>  <?php
>
> Modified: trunk/wp-admin/wp-admin.css (8992 => 8993)
>
> --- trunk/wp-admin/wp-admin.css	2008-09-26 21:53:26 UTC (rev 8992)
> +++ trunk/wp-admin/wp-admin.css	2008-09-26 22:27:48 UTC (rev 8993)
> @@ -631,22 +631,13 @@
>  	text-decoration: none;
>  }
>
> -#wphead #viewsite {
> +#wphead #breadcrumb {
>  	position: absolute;
>  	margin-top: 12px;
>  	margin-left: 10px;
> -}
> -#wphead #viewsite a {
> -	font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana,
> sans-serif;
> +	font: 16px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana,
> sans-serif;
>  	padding: 3px 4px;
> -	display: block;
>  	letter-spacing: normal;
> -	border-width: 1px;
> -	border-style: solid;
> -	-moz-border-radius: 3px;
> -	-khtml-border-radius: 3px;
> -	-webkit-border-radius: 3px;
> -	border-radius: 3px;
>  }
>
>  ul#adminmenu li.write-new-button {
>
> _______________________________________________
> wp-svn mailing list
> wp-svn at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-svn
>
>



-- 
Matt (http://mattsblog.ca/)


More information about the wp-hackers mailing list