Implementing new design for Edit Posts, Comments, etc. lists, props mdawaffe, see #8083
git-svn-id: http://svn.automattic.com/wordpress/trunk@9556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e20f26fe7
commit
4a5e7ba2e4
|
@ -338,22 +338,18 @@ div.dashboard-widget-submit input:hover,
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablenav .dots {
|
.tablenav .dots {
|
||||||
background-color: #e4f2fd;
|
border-color: transparent;
|
||||||
border-color: #e4f2fd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablenav .next,
|
.tablenav .next,
|
||||||
.tablenav .prev {
|
.tablenav .prev {
|
||||||
background-color: #e4f2fd;
|
border-color: transparent;
|
||||||
border-bottom-color: #2583ad;
|
|
||||||
border-color: #e4f2fd;
|
|
||||||
color: #2583ad;
|
color: #2583ad;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablenav .next:hover,
|
.tablenav .next:hover,
|
||||||
.tablenav .prev:hover {
|
.tablenav .prev:hover {
|
||||||
border-bottom-color: #d54e21;
|
border-color: transparent;
|
||||||
border-color: #e4f2fd;
|
|
||||||
color: #d54e21;
|
color: #d54e21;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -256,11 +256,16 @@ h6 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.subsubsub a {
|
.subsubsub a {
|
||||||
line-height: 200%;
|
line-height: 2;
|
||||||
padding: 3px;
|
padding: .2em;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subsubsub a .count, .subsubsub a.current .count {
|
||||||
|
color: #999;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.subsubsub a.current {
|
.subsubsub a.current {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: none;
|
background: none;
|
||||||
|
|
|
@ -120,26 +120,33 @@ if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['sp
|
||||||
<?php
|
<?php
|
||||||
$status_links = array();
|
$status_links = array();
|
||||||
$num_comments = wp_count_comments();
|
$num_comments = wp_count_comments();
|
||||||
|
//, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
|
||||||
|
//, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
|
||||||
$stati = array(
|
$stati = array(
|
||||||
'moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
|
'moderated' => __ngettext_noop('Awaiting Moderation <span class="count">(%s)</span>', 'Awaiting Moderation <span class="count">(%s)</span>'),
|
||||||
'approved' => _c('Approved|plural'),
|
'approved' => __ngettext_noop('Approved', 'Approved'), // singular not used
|
||||||
'spam' => sprintf(__ngettext('Spam (%s)', 'Spam (%s)', number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
|
'spam' => __ngettext_noop('Spam <span class="count">(%s)</span>', 'Spam <span class="count">(%s)</span>')
|
||||||
);
|
);
|
||||||
$class = ( '' === $comment_status ) ? ' class="current"' : '';
|
$class = ( '' === $comment_status ) ? ' class="current"' : '';
|
||||||
$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
|
$status_links[] = "<li><a href='edit-comments.php'$class>" . __( 'All' ) . '</a>';
|
||||||
$type = ( !$comment_type && 'all' != $comment_type ) ? '' : "&comment_type=$comment_type";
|
$type = ( !$comment_type && 'all' != $comment_type ) ? '' : "&comment_type=$comment_type";
|
||||||
foreach ( $stati as $status => $label ) {
|
foreach ( $stati as $status => $label ) {
|
||||||
$class = '';
|
$class = '';
|
||||||
|
|
||||||
if ( $status == $comment_status )
|
if ( $status == $comment_status )
|
||||||
$class = ' class="current"';
|
$class = ' class="current"';
|
||||||
|
if ( !isset( $num_comments->$status ) )
|
||||||
|
$num_comments->$status = 10;
|
||||||
|
|
||||||
$status_links[] = "<li class='$status'><a href=\"edit-comments.php?comment_status=$status$type\"$class>$label</a>";
|
$status_links[] = "<li class='$status'><a href='edit-comments.php?comment_status=$status$type'$class>" . sprintf(
|
||||||
|
__ngettext( $label[0], $label[1], $num_comments->$status ),
|
||||||
|
number_format_i18n( $num_comments->$status )
|
||||||
|
) . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$status_links = apply_filters( 'comment_status_links', $status_links );
|
$status_links = apply_filters( 'comment_status_links', $status_links );
|
||||||
|
|
||||||
echo implode(' | </li>', $status_links) . '</li>';
|
echo implode( " |</li>\n", $status_links) . '</li>';
|
||||||
unset($status_links);
|
unset($status_links);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -182,10 +189,14 @@ $page_links = paginate_links( array(
|
||||||
|
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
|
|
||||||
<?php
|
<?php if ( $page_links ) : ?>
|
||||||
if ( $page_links )
|
<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
number_format_i18n( $start + 1 ),
|
||||||
?>
|
number_format_i18n( min( $page * $comments_per_page, $total ) ),
|
||||||
|
number_format_i18n( $total ),
|
||||||
|
$page_links
|
||||||
|
); echo $page_links_text; ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<select name="action">
|
<select name="action">
|
||||||
|
@ -270,7 +281,7 @@ if ( 'spam' == $comment_status ) {
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
<?php
|
<?php
|
||||||
if ( $page_links )
|
if ( $page_links )
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
echo "<div class='tablenav-pages'>$page_links_text</div>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
|
|
|
@ -73,11 +73,11 @@ wp_enqueue_script('inline-edit-post');
|
||||||
wp_enqueue_script('pages');
|
wp_enqueue_script('pages');
|
||||||
|
|
||||||
$post_stati = array( // array( adj, noun )
|
$post_stati = array( // array( adj, noun )
|
||||||
'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published (%s)', 'Published (%s)')),
|
'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')),
|
||||||
'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')),
|
'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')),
|
||||||
'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')),
|
'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')),
|
||||||
'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')),
|
'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts</a> <span class="count">(%s)</span>')),
|
||||||
'private' => array(__('Private'), __('Private pages'), __ngettext_noop('Private (%s)', 'Private (%s)'))
|
'private' => array(__('Private'), __('Private pages'), __ngettext_noop('<a %s>Private</a> <span class="count">(%s)</span>', '<a %s>Private</a> <span class="count">(%s)</span>'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$query = array('post_type' => 'page', 'orderby' => 'menu_order title', 'what_to_show' => 'posts',
|
$query = array('post_type' => 'page', 'orderby' => 'menu_order title', 'what_to_show' => 'posts',
|
||||||
|
@ -137,8 +137,9 @@ $avail_post_stati = get_available_post_statuses('page');
|
||||||
if ( empty($locked_post_status) ) :
|
if ( empty($locked_post_status) ) :
|
||||||
$status_links = array();
|
$status_links = array();
|
||||||
$num_posts = wp_count_posts('page', 'readable');
|
$num_posts = wp_count_posts('page', 'readable');
|
||||||
|
$total_posts = array_sum( (array) $num_posts );
|
||||||
$class = empty($_GET['post_status']) ? ' class="current"' : '';
|
$class = empty($_GET['post_status']) ? ' class="current"' : '';
|
||||||
$status_links[] = "<li><a href=\"edit-pages.php\"$class>".__('All Pages')."</a>";
|
$status_links[] = "<li><a href='edit-pages.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>';
|
||||||
foreach ( $post_stati as $status => $label ) {
|
foreach ( $post_stati as $status => $label ) {
|
||||||
$class = '';
|
$class = '';
|
||||||
|
|
||||||
|
@ -148,10 +149,9 @@ foreach ( $post_stati as $status => $label ) {
|
||||||
if ( isset( $_GET['post_status'] ) && $status == $_GET['post_status'] )
|
if ( isset( $_GET['post_status'] ) && $status == $_GET['post_status'] )
|
||||||
$class = ' class="current"';
|
$class = ' class="current"';
|
||||||
|
|
||||||
$status_links[] = "<li><a href=\"edit-pages.php?post_status=$status\"$class>" .
|
$status_links[] = "<li><a href='edit-pages.php?post_status=$status'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
|
||||||
sprintf(__ngettext($label[2][0], $label[2][1], $num_posts->$status), number_format_i18n( $num_posts->$status ) ) . '</a>';
|
|
||||||
}
|
}
|
||||||
echo implode(' |</li>', $status_links) . '</li>';
|
echo implode( " |</li>\n", $status_links ) . '</li>';
|
||||||
unset($status_links);
|
unset($status_links);
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
@ -186,9 +186,14 @@ $page_links = paginate_links( array(
|
||||||
'current' => $pagenum
|
'current' => $pagenum
|
||||||
));
|
));
|
||||||
|
|
||||||
if ( $page_links )
|
if ( $page_links ) : ?>
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
|
||||||
?>
|
number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
|
||||||
|
number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
|
||||||
|
number_format_i18n( $wp_query->found_posts ),
|
||||||
|
$page_links
|
||||||
|
); echo $page_links_text; ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<select name="action">
|
<select name="action">
|
||||||
|
@ -230,7 +235,7 @@ if ($posts) {
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
<?php
|
<?php
|
||||||
if ( $page_links )
|
if ( $page_links )
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
echo "<div class='tablenav-pages'>$page_links_text</div>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
|
|
|
@ -124,8 +124,11 @@ if ( (int) $_GET['locked'] ) {
|
||||||
if ( empty($locked_post_status) ) :
|
if ( empty($locked_post_status) ) :
|
||||||
$status_links = array();
|
$status_links = array();
|
||||||
$num_posts = wp_count_posts( 'post', 'readable' );
|
$num_posts = wp_count_posts( 'post', 'readable' );
|
||||||
|
$total_posts = array_sum( (array) $num_posts );
|
||||||
$class = empty( $_GET['post_status'] ) ? ' class="current"' : '';
|
$class = empty( $_GET['post_status'] ) ? ' class="current"' : '';
|
||||||
$status_links[] = "<li><a href='edit.php' $class>" . __('All Posts') . '</a>';
|
$status_links[] = "<li><a href='edit.php' $class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>';
|
||||||
|
|
||||||
|
|
||||||
foreach ( $post_stati as $status => $label ) {
|
foreach ( $post_stati as $status => $label ) {
|
||||||
$class = '';
|
$class = '';
|
||||||
|
|
||||||
|
@ -137,10 +140,9 @@ foreach ( $post_stati as $status => $label ) {
|
||||||
if ( isset($_GET['post_status']) && $status == $_GET['post_status'] )
|
if ( isset($_GET['post_status']) && $status == $_GET['post_status'] )
|
||||||
$class = ' class="current"';
|
$class = ' class="current"';
|
||||||
|
|
||||||
$status_links[] = "<li><a href='edit.php?post_status=$status' $class>" .
|
$status_links[] = "<li><a href='edit.php?post_status=$status' $class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
|
||||||
sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
|
|
||||||
}
|
}
|
||||||
echo implode( ' | </li>', $status_links ) . '</li>';
|
echo implode( " |</li>\n", $status_links ) . '</li>';
|
||||||
unset( $status_links );
|
unset( $status_links );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
@ -223,7 +225,12 @@ do_action('restrict_manage_posts');
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ( $page_links ) { ?>
|
<?php if ( $page_links ) { ?>
|
||||||
<div class="tablenav-pages"><?php echo $page_links; ?></div>
|
<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
|
||||||
|
number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
|
||||||
|
number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
|
||||||
|
number_format_i18n( $wp_query->found_posts ),
|
||||||
|
$page_links
|
||||||
|
); echo $page_links_text; ?></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="view-switch">
|
<div class="view-switch">
|
||||||
|
@ -242,7 +249,7 @@ do_action('restrict_manage_posts');
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( $page_links )
|
if ( $page_links )
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
echo "<div class='tablenav-pages'>$page_links_text</div>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
|
|
|
@ -331,7 +331,7 @@ function wp_dashboard_quick_press() {
|
||||||
<?php wp_nonce_field('add-post'); ?>
|
<?php wp_nonce_field('add-post'); ?>
|
||||||
<input type="submit" name="save" id="save-post" class="button" value="<?php _e('Save Draft'); ?>" />
|
<input type="submit" name="save" id="save-post" class="button" value="<?php _e('Save Draft'); ?>" />
|
||||||
<input type="reset" value="<?php _e( 'Cancel' ); ?>" class="cancel" />
|
<input type="reset" value="<?php _e( 'Cancel' ); ?>" class="cancel" />
|
||||||
<input type="submit" name="publish" id="publish" accesskey="p" class="button button-highlighted" value="<?php _e('Publish'); ?>" />
|
<input type="submit" name="publish" id="publish" accesskey="p" class="button button-primary" value="<?php _e('Publish'); ?>" />
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -727,11 +727,11 @@ function wp_edit_posts_query( $q = false ) {
|
||||||
$q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
|
$q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
|
||||||
$q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
|
$q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
|
||||||
$post_stati = array( // array( adj, noun )
|
$post_stati = array( // array( adj, noun )
|
||||||
'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published (%s)', 'Published (%s)')),
|
'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')),
|
||||||
'future' => array(__('Scheduled'), __('Scheduled posts'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')),
|
'future' => array(__('Scheduled'), __('Scheduled posts'), __ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')),
|
||||||
'pending' => array(__('Pending Review'), __('Pending posts'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')),
|
'pending' => array(__('Pending Review'), __('Pending posts'), __ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')),
|
||||||
'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')),
|
'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')),
|
||||||
'private' => array(__('Private'), __('Private posts'), __ngettext_noop('Private (%s)', 'Private (%s)')),
|
'private' => array(__('Private'), __('Private posts'), __ngettext_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>')),
|
||||||
);
|
);
|
||||||
|
|
||||||
$post_stati = apply_filters('post_stati', $post_stati);
|
$post_stati = apply_filters('post_stati', $post_stati);
|
||||||
|
@ -794,9 +794,9 @@ function wp_edit_attachments_query( $q = false ) {
|
||||||
$q['post_status'] = 'any';
|
$q['post_status'] = 'any';
|
||||||
$q['posts_per_page'] = 15;
|
$q['posts_per_page'] = 15;
|
||||||
$post_mime_types = array( // array( adj, noun )
|
$post_mime_types = array( // array( adj, noun )
|
||||||
'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image (%s)', 'Images (%s)')),
|
'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),
|
||||||
'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio (%s)', 'Audio (%s)')),
|
'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),
|
||||||
'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video (%s)', 'Video (%s)')),
|
'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),
|
||||||
);
|
);
|
||||||
$post_mime_types = apply_filters('post_mime_types', $post_mime_types);
|
$post_mime_types = apply_filters('post_mime_types', $post_mime_types);
|
||||||
|
|
||||||
|
|
|
@ -687,7 +687,7 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
|
||||||
function wp_manage_posts_columns() {
|
function wp_manage_posts_columns() {
|
||||||
$posts_columns = array();
|
$posts_columns = array();
|
||||||
$posts_columns['cb'] = '<input type="checkbox" />';
|
$posts_columns['cb'] = '<input type="checkbox" />';
|
||||||
$posts_columns['title'] = __('Title');
|
$posts_columns['title'] = __('Post');
|
||||||
$posts_columns['author'] = __('Author');
|
$posts_columns['author'] = __('Author');
|
||||||
$posts_columns['categories'] = __('Categories');
|
$posts_columns['categories'] = __('Categories');
|
||||||
$posts_columns['tags'] = __('Tags');
|
$posts_columns['tags'] = __('Tags');
|
||||||
|
|
|
@ -665,6 +665,14 @@ class WP_User_Search {
|
||||||
'format' => 'userspage=%#%',
|
'format' => 'userspage=%#%',
|
||||||
'add_args' => $args
|
'add_args' => $args
|
||||||
) );
|
) );
|
||||||
|
if ( $this->paging_text ) {
|
||||||
|
$this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
|
||||||
|
number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
|
||||||
|
number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
|
||||||
|
number_format_i18n( $this->total_users_for_query ),
|
||||||
|
$this->paging_text
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,11 +125,12 @@ function theme_update_available( $theme ) {
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
||||||
<?php if ( $page_links ) : ?>
|
<?php if ( $page_links ) : ?>
|
||||||
<div class="tablenav">
|
<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
|
||||||
<?php echo "<div class='tablenav-pages'>$page_links</div>"; ?>
|
number_format_i18n( $start + 1 ),
|
||||||
<br class="clear" />
|
number_format_i18n( min( $page * $per_page, $theme_total ) ),
|
||||||
</div>
|
number_format_i18n( $theme_total ),
|
||||||
<br class="clear" />
|
$page_links
|
||||||
|
); echo $page_links_text; ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( 1 < $theme_total ) { ?>
|
<?php if ( 1 < $theme_total ) { ?>
|
||||||
|
@ -199,7 +200,7 @@ foreach ( $cols as $col => $theme_name ) {
|
||||||
|
|
||||||
<?php if ( $page_links ) : ?>
|
<?php if ( $page_links ) : ?>
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
<?php echo "<div class='tablenav-pages'>$page_links</div>"; ?>
|
<?php echo "<div class='tablenav-pages'>$page_links_text</div>"; ?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -185,13 +185,14 @@ if ( isset($message) ) { ?>
|
||||||
<?php
|
<?php
|
||||||
$type_links = array();
|
$type_links = array();
|
||||||
$_num_posts = (array) wp_count_attachments();
|
$_num_posts = (array) wp_count_attachments();
|
||||||
|
$_total_posts = array_sum( $_num_posts );
|
||||||
$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
|
$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
|
||||||
foreach ( $matches as $type => $reals )
|
foreach ( $matches as $type => $reals )
|
||||||
foreach ( $reals as $real )
|
foreach ( $reals as $real )
|
||||||
$num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
|
$num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
|
||||||
|
|
||||||
$class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : '';
|
$class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : '';
|
||||||
$type_links[] = "<li><a href=\"upload.php\"$class>".__('All Types')."</a>";
|
$type_links[] = "<li><a href='upload.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts ), number_format_i18n( $_total_posts ) ) . '</a>';
|
||||||
foreach ( $post_mime_types as $mime_type => $label ) {
|
foreach ( $post_mime_types as $mime_type => $label ) {
|
||||||
$class = '';
|
$class = '';
|
||||||
|
|
||||||
|
@ -201,13 +202,12 @@ foreach ( $post_mime_types as $mime_type => $label ) {
|
||||||
if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
|
if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
|
||||||
$class = ' class="current"';
|
$class = ' class="current"';
|
||||||
|
|
||||||
$type_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" .
|
$type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
|
||||||
sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
|
|
||||||
}
|
}
|
||||||
$class = isset($_GET['detached']) ? ' class="current"' : '';
|
$class = isset($_GET['detached']) ? ' class="current"' : '';
|
||||||
$type_links[] = '<li><a href="upload.php?detached=1"' . $class . '>' . __('Unattached') . '</a>';
|
$type_links[] = '<li><a href="upload.php?detached=1"' . $class . '>' . __('Unattached') . '</a>';
|
||||||
|
|
||||||
echo implode(' | </li>', $type_links) . '</li>';
|
echo implode( " |</li>\n", $type_links) . '</li>';
|
||||||
unset($type_links);
|
unset($type_links);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -235,9 +235,14 @@ $page_links = paginate_links( array(
|
||||||
'current' => $_GET['paged']
|
'current' => $_GET['paged']
|
||||||
));
|
));
|
||||||
|
|
||||||
if ( $page_links )
|
if ( $page_links ) : ?>
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
|
||||||
?>
|
number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
|
||||||
|
number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
|
||||||
|
number_format_i18n( $wp_query->found_posts ),
|
||||||
|
$page_links
|
||||||
|
); echo $page_links_text; ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<select name="action" class="select-action">
|
<select name="action" class="select-action">
|
||||||
|
@ -386,7 +391,7 @@ foreach ($arc_result as $arc_row) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( $page_links )
|
if ( $page_links )
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
echo "<div class='tablenav-pages'>$page_links_text</div>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
|
|
|
@ -265,6 +265,7 @@ if ( ! empty($messages) ) {
|
||||||
$role_links = array();
|
$role_links = array();
|
||||||
$avail_roles = array();
|
$avail_roles = array();
|
||||||
$users_of_blog = get_users_of_blog();
|
$users_of_blog = get_users_of_blog();
|
||||||
|
$total_users = count( $users_of_blog );
|
||||||
foreach ( (array) $users_of_blog as $b_user ) {
|
foreach ( (array) $users_of_blog as $b_user ) {
|
||||||
$b_roles = unserialize($b_user->meta_value);
|
$b_roles = unserialize($b_user->meta_value);
|
||||||
foreach ( (array) $b_roles as $b_role => $val ) {
|
foreach ( (array) $b_roles as $b_role => $val ) {
|
||||||
|
@ -277,7 +278,7 @@ unset($users_of_blog);
|
||||||
|
|
||||||
$current_role = false;
|
$current_role = false;
|
||||||
$class = empty($role) ? ' class="current"' : '';
|
$class = empty($role) ? ' class="current"' : '';
|
||||||
$role_links[] = "<li><a href=\"users.php\"$class>" . __('All Users') . "</a>";
|
$role_links[] = "<li><a href='users.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users ), number_format_i18n( $total_users ) ) . '</a>';
|
||||||
foreach ( $wp_roles->get_names() as $this_role => $name ) {
|
foreach ( $wp_roles->get_names() as $this_role => $name ) {
|
||||||
if ( !isset($avail_roles[$this_role]) )
|
if ( !isset($avail_roles[$this_role]) )
|
||||||
continue;
|
continue;
|
||||||
|
@ -290,10 +291,10 @@ foreach ( $wp_roles->get_names() as $this_role => $name ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = translate_with_context($name);
|
$name = translate_with_context($name);
|
||||||
$name = sprintf(_c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$this_role]);
|
$name = sprintf( _c('%1$s <span class="count">(%2$s)</span>|user role with count'), $name, $avail_roles[$this_role] );
|
||||||
$role_links[] = "<li><a href=\"users.php?role=$this_role\"$class>" . $name . '</a>';
|
$role_links[] = "<li><a href='users.php?role=$this_role'$class>$name</a>";
|
||||||
}
|
}
|
||||||
echo implode(' |</li>', $role_links) . '</li>';
|
echo implode( " |</li>\n", $role_links) . '</li>';
|
||||||
unset($role_links);
|
unset($role_links);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#wpbody {
|
#wpbody {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
@ -626,9 +623,11 @@ div.nav {
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-numbers {
|
.page-numbers {
|
||||||
margin-right: 5px;
|
|
||||||
border-bottom-width: 2px;
|
|
||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 1px;
|
||||||
|
padding: 0 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablenav-pages span.current {
|
.tablenav-pages span.current {
|
||||||
|
@ -674,16 +673,23 @@ p.pagenav {
|
||||||
|
|
||||||
.tablenav .tablenav-pages {
|
.tablenav .tablenav-pages {
|
||||||
float: right;
|
float: right;
|
||||||
|
display: block;
|
||||||
|
cursor: default;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
height: 22px;
|
margin: 0 8px 0 0;
|
||||||
line-height: 22px;
|
color: #555;
|
||||||
padding: 7px 8px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablenav .tablenav-pages a {
|
.tablenav .tablenav-pages a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tablenav .displaying-num {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.tablenav .actions {
|
.tablenav .actions {
|
||||||
padding: 7px 8px 0;
|
padding: 7px 8px 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,7 +328,7 @@ function wp_default_styles( &$styles ) {
|
||||||
|
|
||||||
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' );
|
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' );
|
||||||
|
|
||||||
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081105' );
|
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081106' );
|
||||||
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
|
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
|
||||||
|
|
||||||
$styles->add( 'ie', '/wp-admin/css/ie.css' );
|
$styles->add( 'ie', '/wp-admin/css/ie.css' );
|
||||||
|
@ -338,7 +338,7 @@ function wp_default_styles( &$styles ) {
|
||||||
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081031'); // for login.php. Is there a better way?
|
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081031'); // for login.php. Is there a better way?
|
||||||
$styles->add_data( 'colors-fresh', 'rtl', true );
|
$styles->add_data( 'colors-fresh', 'rtl', true );
|
||||||
|
|
||||||
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20081030' );
|
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20081106' );
|
||||||
$styles->add( 'media', '/wp-admin/css/media.css', array(), '20080709' );
|
$styles->add( 'media', '/wp-admin/css/media.css', array(), '20080709' );
|
||||||
$styles->add( 'widgets', '/wp-admin/css/widgets.css' );
|
$styles->add( 'widgets', '/wp-admin/css/widgets.css' );
|
||||||
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081105' );
|
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081105' );
|
||||||
|
|
Loading…
Reference in New Issue