remove leading <li> from get_views() and add it later. Fixes #15321

git-svn-id: http://svn.automattic.com/wordpress/trunk@16205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-11-05 14:34:09 +00:00
parent e7318d2068
commit c0b067fcf5
14 changed files with 33 additions and 30 deletions

File diff suppressed because one or more lines are too long

View File

@ -206,13 +206,13 @@ strong .post-com-count span {
border-top-color: #dfdfdf;
}
.error,
div.error,
.login #login_error {
background-color: #ffebe8;
border-color: #c00;
}
.error a {
div.error a {
color: #c00;
}
@ -437,7 +437,7 @@ div.dashboard-widget-submit input:hover,
color: #d54e21;
}
.updated,
div.updated,
.login .message {
background-color: #ffffe0;
border-color: #e6db55;

File diff suppressed because one or more lines are too long

View File

@ -206,13 +206,13 @@ strong .post-com-count span {
border-top-color: #dfdfdf;
}
.error,
div.error,
.login #login_error {
background-color: #ffebe8;
border-color: #c00;
}
.error a {
div.error a {
color: #c00;
}
@ -437,7 +437,7 @@ div.dashboard-widget-submit input:hover,
color: #d54e21;
}
.updated,
div.updated,
.login .message {
background-color: #ffffe0;
border-color: #e6db55;

File diff suppressed because one or more lines are too long

View File

@ -474,8 +474,8 @@ ol.ol-decimal > li {
margin: 0 15px 0 5px;
}
.updated,
.error {
div.updated,
div.error {
border-width: 1px;
border-style: solid;
padding: 0 0.6em;
@ -486,14 +486,14 @@ ol.ol-decimal > li {
border-radius: 3px;
}
.updated p,
.error p {
div.updated p,
div.error p {
margin: 0.5em 0;
padding: 2px;
}
.wrap .updated,
.wrap .error {
.wrap div.updated,
.wrap div.error {
margin: 5px 0 15px;
}

View File

@ -157,7 +157,7 @@ class WP_Comments_List_Table extends WP_List_Table {
if ( !empty( $_REQUEST['s'] ) )
$link = add_query_arg( 's', esc_attr( stripslashes( $_REQUEST['s'] ) ), $link );
*/
$status_links[$status] = "<li class='$status'><a href='$link'$class>" . sprintf(
$status_links[$status] = "<a href='$link'$class>" . sprintf(
translate_nooped_plural( $label, $num_comments->$status ),
number_format_i18n( $num_comments->$status )
) . '</a>';

View File

@ -210,6 +210,9 @@ class WP_List_Table {
return;
echo "<ul class='subsubsub'>\n";
foreach ( $views as $class => $view ) {
$views[ $class ] = "\t<li class='$class'>$view";
}
echo implode( " |</li>\n", $views ) . "</li>\n";
echo "</ul>";
}

View File

@ -57,7 +57,7 @@ class WP_Media_List_Table extends WP_List_Table {
$num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
$class = ( empty($_GET['post_mime_type']) && !$detached && !isset($_GET['status']) ) ? ' class="current"' : '';
$type_links['all'] = "<li><a href='upload.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</a>';
$type_links['all'] = "<a href='upload.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</a>';
foreach ( $post_mime_types as $mime_type => $label ) {
$class = '';
@ -67,12 +67,12 @@ class WP_Media_List_Table extends WP_List_Table {
if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
$class = ' class="current"';
if ( !empty( $num_posts[$mime_type] ) )
$type_links[$mime_type] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
$type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
}
$type_links['detached'] = '<li><a href="upload.php?detached=1"' . ( $detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>';
$type_links['detached'] = '<a href="upload.php?detached=1"' . ( $detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>';
if ( !empty($_num_posts['trash']) )
$type_links['trash'] = '<li><a href="upload.php?status=trash"' . ( (isset($_GET['status']) && $_GET['status'] == 'trash' ) ? ' class="current"' : '') . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
$type_links['trash'] = '<a href="upload.php?status=trash"' . ( (isset($_GET['status']) && $_GET['status'] == 'trash' ) ? ' class="current"' : '') . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
return $type_links;
}

View File

@ -187,7 +187,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
break;
}
$status_links[$type] = sprintf( "<li><a href='%s' %s>%s</a>",
$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
add_query_arg('theme_status', $type, 'themes.php'),
( $type == $status ) ? ' class="current"' : '',
sprintf( $text, number_format_i18n( $count ) )

View File

@ -238,7 +238,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
break;
}
$status_links[$type] = sprintf( "<li><a href='%s' %s>%s</a>",
$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
add_query_arg('plugin_status', $type, 'plugins.php'),
( $type == $status ) ? ' class="current"' : '',
sprintf( $text, number_format_i18n( $count ) )

View File

@ -142,7 +142,7 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( $this->user_posts_count ) {
if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user_id ) )
$class = ' class="current"';
$status_links['mine'] = "<li><a href='edit.php?post_type=$post_type&author=$current_user_id'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . '</a>';
$status_links['mine'] = "<a href='edit.php?post_type=$post_type&author=$current_user_id'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . '</a>';
$allposts = '&all_posts=1';
}
@ -153,7 +153,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$total_posts -= $num_posts->$state;
$class = empty( $class ) && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : '';
$status_links['all'] = "<li><a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>';
$status_links['all'] = "<a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>';
foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) {
$class = '';
@ -169,13 +169,13 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] )
$class = ' class="current"';
$status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
$status_links[$status_name] = "<a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
}
if ( ! empty( $this->sticky_posts_count ) ) {
$class = ! empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : '';
$sticky_link = array( 'sticky' => "<li><a href='edit.php?post_type=$post_type&amp;show_sticky=1'$class>" . sprintf( _nx( 'Sticky <span class="count">(%s)</span>', 'Sticky <span class="count">(%s)</span>', $this->sticky_posts_count, 'posts' ), number_format_i18n( $this->sticky_posts_count ) ) . '</a>' );
$sticky_link = array( 'sticky' => "<a href='edit.php?post_type=$post_type&amp;show_sticky=1'$class>" . sprintf( _nx( 'Sticky <span class="count">(%s)</span>', 'Sticky <span class="count">(%s)</span>', $this->sticky_posts_count, 'posts' ), number_format_i18n( $this->sticky_posts_count ) ) . '</a>' );
// Sticky comes after Publish, or if not listed, after All.
$split = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ) );

View File

@ -63,7 +63,7 @@ class WP_Users_List_Table extends WP_List_Table {
$current_role = false;
$class = empty($role) ? ' class="current"' : '';
$role_links = array();
$role_links['all'] = "<li><a href='users.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
$role_links['all'] = "<a href='users.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
foreach ( $wp_roles->get_names() as $this_role => $name ) {
if ( !isset($avail_roles[$this_role]) )
continue;
@ -78,7 +78,7 @@ class WP_Users_List_Table extends WP_List_Table {
$name = translate_user_role( $name );
/* translators: User role name with count */
$name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, $avail_roles[$this_role] );
$role_links[$this_role] = "<li><a href='users.php?role=$this_role'$class>$name</a>";
$role_links[$this_role] = "<a href='users.php?role=$this_role'$class>$name</a>";
}
return $role_links;

View File

@ -473,7 +473,7 @@ function wp_default_styles( &$styles ) {
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
// all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20101103';
$colors_version = '20101105';
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
$styles->add( 'colors', true, array(), $colors_version );
@ -483,7 +483,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version );
$styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20100528' );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20101027' );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20101105' );
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20101020' );
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20100610' );
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20101020' );