Clean up plugins and dashboard
git-svn-id: http://svn.automattic.com/wordpress/trunk@2759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b6af74e8bf
commit
851ac5a414
|
@ -8,8 +8,56 @@ $today = current_time('mysql', 1);
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<h2><?php _e('Dashboard'); ?></h2>
|
||||
|
||||
<div id="zeitgeist">
|
||||
<h2><?php _e('Latest Activity'); ?></h2>
|
||||
|
||||
<?php
|
||||
$rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashit(get_option('home')) .'&partner=wordpress');
|
||||
if ( isset($rss->items) && 0 != count($rss->items) ) {
|
||||
?>
|
||||
<div id="incominglinks">
|
||||
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/cosmos/search.html?url=<?php echo trailingslashit(get_option('home')); ?>&partner=wordpress"><?php _e('More'); ?> »</a></cite></h3>
|
||||
<ul>
|
||||
<?php
|
||||
$rss->items = array_slice($rss->items, 0, 10);
|
||||
foreach ($rss->items as $item ) {
|
||||
?>
|
||||
<li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp_specialchars($item['title']); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5") ) :
|
||||
?>
|
||||
<div>
|
||||
<h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">»</a></h3>
|
||||
|
||||
<?php
|
||||
if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) :
|
||||
?>
|
||||
<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
if ( $comments ) {
|
||||
foreach ($comments as $comment) {
|
||||
echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
|
||||
edit_comment_link(__("Edit"), ' <small>(', ')</small>');
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) :
|
||||
?>
|
||||
|
@ -46,31 +94,6 @@ foreach ($scheduled as $post) {
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5") ) :
|
||||
?>
|
||||
<div>
|
||||
<h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">»</a></h3>
|
||||
|
||||
<?php
|
||||
if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) :
|
||||
?>
|
||||
<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($comments as $comment) {
|
||||
echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
|
||||
edit_comment_link(__("Edit"), ' <small>(', ')</small>');
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<h3><?php _e('Blog Stats'); ?></h3>
|
||||
<?php
|
||||
|
@ -86,27 +109,9 @@ if (0 < $numcats) $numcats = number_format($numcats);
|
|||
<p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashit(get_option('home')) .'&partner=wordpress');
|
||||
if ( isset($rss->items) && 0 != count($rss->items) ) {
|
||||
?>
|
||||
<div id="incominglinks">
|
||||
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/cosmos/search.html?url=<?php echo trailingslashit(get_option('home')); ?>&partner=wordpress"><?php _e('More'); ?> »</a></cite></h3>
|
||||
<ul>
|
||||
<?php
|
||||
$rss->items = array_slice($rss->items, 0, 10);
|
||||
foreach ($rss->items as $item ) {
|
||||
?>
|
||||
<li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp_specialchars($item['title']); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php do_action('activity_box_end'); ?>
|
||||
</div>
|
||||
|
||||
<h2><?php _e('Dashboard'); ?></h2>
|
||||
<p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>
|
||||
<?php
|
||||
$rss = @fetch_rss('http://wordpress.org/development/feed/');
|
||||
|
|
|
@ -60,7 +60,7 @@ foreach ($check_plugins as $check_plugin) {
|
|||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Plugin Management'); ?></h2>
|
||||
<p><?php _e('Plugins are files you usually download separately from WordPress that add functionality. To install a plugin you generally just need to put the plugin file into your <code>wp-content/plugins</code> directory. Once a plugin is installed, you may activate it or deactivate it here. If something goes wrong with a plugin and you can’t use WordPress, delete that plugin from the <code>wp-content/plugins</code> directory and it will be automatically deactivated.'); ?></p>
|
||||
<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p>
|
||||
<?php
|
||||
|
||||
if ( get_settings('active_plugins') )
|
||||
|
@ -76,7 +76,6 @@ if (empty($plugins)) {
|
|||
<tr>
|
||||
<th><?php _e('Plugin'); ?></th>
|
||||
<th><?php _e('Version'); ?></th>
|
||||
<th><?php _e('Author'); ?></th>
|
||||
<th><?php _e('Description'); ?></th>
|
||||
<th><?php _e('Action'); ?></th>
|
||||
</tr>
|
||||
|
@ -96,11 +95,10 @@ if (empty($plugins)) {
|
|||
if ($style != '') $style = 'class="' . $style . '"';
|
||||
echo "
|
||||
<tr $style>
|
||||
<td class=\"name\">{$plugin_data['Title']}</td>
|
||||
<td class=\"vers\">{$plugin_data['Version']}</td>
|
||||
<td class=\"auth\">{$plugin_data['Author']}</td>
|
||||
<td class=\"desc\">{$plugin_data['Description']}</td>
|
||||
<td class=\"togl\">$action</td>
|
||||
<td class='name'>{$plugin_data['Title']}</td>
|
||||
<td class='vers'>{$plugin_data['Version']}</td>
|
||||
<td class='desc'>{$plugin_data['Description']} <cite>By {$plugin_data['Author']}.</cite></td>
|
||||
<td class='togl'>$action</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
|
@ -110,6 +108,8 @@ if (empty($plugins)) {
|
|||
}
|
||||
?>
|
||||
|
||||
<p><?php _e('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>wp-content/plugins</code> directory and it will be automatically deactivated.'); ?></p>
|
||||
|
||||
<h2><?php _e('Get More Plugins'); ?></h2>
|
||||
<p><?php _e('You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>. To install a plugin you generally just need to upload the plugin file into your <code>wp-content/plugins</code> directory. Once a plugin is uploaded, you may activate it here.'); ?></p>
|
||||
|
||||
|
|
|
@ -290,6 +290,10 @@ textarea, input, select {
|
|||
clear: both;
|
||||
}
|
||||
|
||||
table .vers, table .name {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#adminmenu {
|
||||
background: #6da6d1;
|
||||
border-top: 3px solid #448abd;
|
||||
|
@ -573,6 +577,10 @@ textarea, input, select {
|
|||
border-bottom: none;
|
||||
}
|
||||
|
||||
#zeitgeist h2 {
|
||||
margin-top: .4em;
|
||||
}
|
||||
|
||||
#zeitgeist h3 {
|
||||
border-bottom: 1px solid #ccc;
|
||||
font-size: 16px;
|
||||
|
|
Loading…
Reference in New Issue