Dashboard and option tweaks
git-svn-id: http://svn.automattic.com/wordpress/trunk@2192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
66aa2aad8a
commit
b5a43a4b77
|
@ -84,6 +84,23 @@ if (0 < $numcats) $numcats = number_format($numcats);
|
||||||
<p>There are currently <?php echo $numposts ?> <a href="edit.php" title="posts">posts</a> and <?php echo $numcomms ?> <a href="edit-comments.php" title="Comments">comments</a>, contained within <?php echo $numcats ?> <a href="categories.php" title="categories">categories</a>.</p>
|
<p>There are currently <?php echo $numposts ?> <a href="edit.php" title="posts">posts</a> and <?php echo $numcomms ?> <a href="edit-comments.php" title="Comments">comments</a>, contained within <?php echo $numcats ?> <a href="categories.php" title="categories">categories</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$rss = @fetch_rss('http://feedster.com/links.php?url='. trailingslashit(get_option('home')) .'&type=rss&limit=6');
|
||||||
|
if ( isset($rss->items) && 0 != count($rss->items) ) {
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://feedster.com/links.php?url=<?php echo trailingslashit(get_option('home')); ?>"><?php _e('More'); ?> »</a></cite></h3>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
$rss->items = array_slice($rss->items, 0, 6);
|
||||||
|
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 } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><?php _e('Dashboard'); ?></h2>
|
<h2><?php _e('Dashboard'); ?></h2>
|
||||||
|
@ -94,15 +111,36 @@ if ( $rss ) {
|
||||||
?>
|
?>
|
||||||
<h3>WordPress Development Blog</h3>
|
<h3>WordPress Development Blog</h3>
|
||||||
<?php
|
<?php
|
||||||
$rss->items = array_slice($rss->items, 0, 4);
|
$rss->items = array_slice($rss->items, 0, 3);
|
||||||
foreach ($rss->items as $item ) {
|
foreach ($rss->items as $item ) {
|
||||||
?>
|
?>
|
||||||
<h4><a href='<?php echo $item['link']; ?>'><?php echo wp_specialchars($item['title']); ?></a> — <?php echo human_time_diff( strtotime($item['pubdate'], time() ) ); ?> <?php _e('ago'); ?></h4>
|
<h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> — <?php echo human_time_diff( strtotime($item['pubdate'], time() ) ); ?> <?php _e('ago'); ?></h4>
|
||||||
<p><?php echo $item['description']; ?></p>
|
<p><?php echo $item['description']; ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$rss = @fetch_rss('http://planet.wordpress.org/feed/');
|
||||||
|
//var_dump($rss);
|
||||||
|
if ( $rss ) {
|
||||||
|
?>
|
||||||
|
<h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> »</a></h3>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
$rss->items = array_slice($rss->items, 0, 20);
|
||||||
|
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>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -72,7 +72,7 @@ CREATE TABLE $wpdb->options (
|
||||||
option_name varchar(64) NOT NULL default '',
|
option_name varchar(64) NOT NULL default '',
|
||||||
option_can_override enum('Y','N') NOT NULL default 'Y',
|
option_can_override enum('Y','N') NOT NULL default 'Y',
|
||||||
option_type int(11) NOT NULL default '1',
|
option_type int(11) NOT NULL default '1',
|
||||||
option_value text NOT NULL,
|
option_value longtext NOT NULL,
|
||||||
option_width int(11) NOT NULL default '20',
|
option_width int(11) NOT NULL default '20',
|
||||||
option_height int(11) NOT NULL default '8',
|
option_height int(11) NOT NULL default '8',
|
||||||
option_description tinytext NOT NULL,
|
option_description tinytext NOT NULL,
|
||||||
|
|
|
@ -505,7 +505,12 @@ textarea, input, select {
|
||||||
#zeitgeist h3 {
|
#zeitgeist h3 {
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin: 1em 0;
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zeitgeist h3 cite {
|
||||||
|
font-size: 12px;
|
||||||
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
#zeitgeist li, #zeitgeist p {
|
#zeitgeist li, #zeitgeist p {
|
||||||
|
|
|
@ -598,7 +598,7 @@ function init () {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
|
if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
|
||||||
define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout
|
define('MAGPIE_FETCH_TIME_OUT', 2); // 2 second timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
// use gzip encoding to fetch rss files if supported?
|
// use gzip encoding to fetch rss files if supported?
|
||||||
|
|
Loading…
Reference in New Issue