Punt inbox
git-svn-id: https://develop.svn.wordpress.org/trunk@9005 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ab0313390
commit
63ff25ab3b
@ -156,49 +156,4 @@ if ( is_admin() && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) )
|
||||
add_filter( 'comment_author', 'floated_admin_avatar' );
|
||||
}
|
||||
|
||||
function wp_get_inbox_items() {
|
||||
$r = array();
|
||||
$r[] = (object) array(
|
||||
'text' => 'Your take on the evolution of Dr. Who is ridiculous. The fact that the actors are getting younger has nothing to do with Gallifrey lore, and everything to do with celebrity culture.',
|
||||
'date' => '2008/09/07',
|
||||
'time' => '4:19pm',
|
||||
'from' => 'I. monroe',
|
||||
'type' => 'comment',
|
||||
'parent' => '1',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
$r[] = (object) array(
|
||||
'text' => 'Announcement: WordPress introduces new features for mobile blogging.',
|
||||
'date' => '2008/09/06',
|
||||
'time' => '3:24pm',
|
||||
'from' => 'WordPress.org',
|
||||
'type' => 'announcement',
|
||||
'parent' => '0',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
$r[] = (object) array(
|
||||
'text' => 'Great review. You left out a few things, but maybe you were trying to avoid spoilers? Will check back later in a week.',
|
||||
'date' => '2008/09/06',
|
||||
'time' => '2:46pm',
|
||||
'from' => 'matt',
|
||||
'type' => 'comment',
|
||||
'parent' => '2',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
$r[] = (object) array(
|
||||
'text' => 'nice picture!',
|
||||
'date' => '2008/08/05',
|
||||
'time' => '9:17am',
|
||||
'from' => 'caped crusader',
|
||||
'type' => 'comment',
|
||||
'parent' => '3',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -66,14 +66,6 @@ function wp_dashboard_setup() {
|
||||
array( 'widget_id' => 'dashboard_quick_press' )
|
||||
);
|
||||
|
||||
// Inbox Widget
|
||||
wp_register_sidebar_widget( 'dashboard_inbox', __( 'Inbox' ), 'wp_dashboard_inbox',
|
||||
array( 'all_link' => 'inbox.php', 'height' => 'double' )
|
||||
);
|
||||
wp_register_widget_control( 'dashboard_inbox', __( 'Inbox' ), 'wp_dashboard_empty_control',
|
||||
array( 'widget_id' => 'dashboard_inbox' )
|
||||
);
|
||||
|
||||
// Incoming Links Widget
|
||||
if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) {
|
||||
$update = true;
|
||||
@ -171,10 +163,9 @@ function wp_dashboard_setup() {
|
||||
|
||||
// Hard code the sidebar's widgets and order
|
||||
$dashboard_widgets = array();
|
||||
$dashboard_widgets[] = 'dashboard_inbox';
|
||||
$dashboard_widgets[] = 'dashboard_quick_press';
|
||||
/*
|
||||
$dashboard_widgets[] = 'dashboard_recent_comments';
|
||||
/*
|
||||
$dashboard_widgets[] = 'dashboard_incoming_links';
|
||||
$dashboard_widgets[] = 'dashboard_primary';
|
||||
if ( current_user_can( 'activate_plugins' ) )
|
||||
@ -448,71 +439,6 @@ jQuery( quickPressLoad );
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
function wp_dashboard_inbox( $sidebar_args ) {
|
||||
extract( $sidebar_args, EXTR_SKIP );
|
||||
|
||||
echo $before_widget;
|
||||
|
||||
echo $before_title;
|
||||
echo $widget_name;
|
||||
echo $after_title;
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery( function($) {
|
||||
$('#inbox-filter').submit( function() { return false; } )
|
||||
.find( ':button' ).click( function() {
|
||||
var done = $(':checked').size().toString(), txt = (done == '1') ? '<?php _e(' item archived'); ?>' : '<?php _e(' items archived'); ?>';
|
||||
$(':checked').parent().slideUp( 'normal', function() {
|
||||
$('.inbox-count').text( $('#inbox-filter li:visible').size().toString() );
|
||||
$('#inbox-message').addClass('updated');
|
||||
$('#inbox-message').text(done+txt+" (This feature isn't enabled in this prototype)");
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
|
||||
<form id="inbox-filter" action="" method="get">
|
||||
<p class="actions"><input type="button" value="Archive" name="archive" class="button"></p>
|
||||
<div id="inbox-message"></div>
|
||||
<br class="clear" />
|
||||
|
||||
<ul>
|
||||
|
||||
<?php $crazy_posts = array( '', 'some post', 'a post', 'my cool post' ); foreach ( wp_get_inbox_items() as $k => $item ) : // crazyhorse ?>
|
||||
|
||||
<li id="message-<?php echo $k; ?>">
|
||||
<input type="checkbox" name="messages[]" value="<?php echo $k; ?>" class="checkbox" />
|
||||
<p><?php
|
||||
if ( $item->href )
|
||||
echo "<a href='$item->href' class='no-crazy'>";
|
||||
echo wp_specialchars( $item->text );
|
||||
if ( strlen( $item->text ) > 180 ) // crazyhorse
|
||||
echo '<br/><span class="inbox-more">more…</span>';
|
||||
if ( $item->href )
|
||||
echo '</a>';
|
||||
?><br />
|
||||
-- <cite><?php
|
||||
echo $item->from;
|
||||
if ( 'comment' == $item->type ) // crazyhorse
|
||||
echo " on "<a href='#' class='no-crazy'>{$crazy_posts[$item->parent]}</a>"";
|
||||
?></cite>, <?php echo "$item->date, $item->time"; ?>
|
||||
</p>
|
||||
<br class="clear" />
|
||||
</li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display recent comments dashboard widget content.
|
||||
*
|
||||
|
@ -22,10 +22,6 @@
|
||||
$awaiting_mod = wp_count_comments();
|
||||
$awaiting_mod = $awaiting_mod->moderated;
|
||||
|
||||
$inbox_num = count( wp_get_inbox_items() );
|
||||
$awaiting_mod = wp_count_comments();
|
||||
$awaiting_mod = $awaiting_mod->moderated;
|
||||
|
||||
$top_menu = $top_submenu = $menu = $submenu = array();
|
||||
|
||||
$top_menu[5] = array( __('My Account'), 'read', 'profile.php' );
|
||||
@ -38,8 +34,6 @@ $top_menu[25] = array( __('Help'), 'read', 'index.php?help' ); // place holder
|
||||
$top_submenu['profile.php'][5] = array( __('Profile'), 'read', 'profile.php' );
|
||||
|
||||
$menu[0] = array( __('Dashboard'), 'read', 'index.php' );
|
||||
$submenu['index.php'][5] = array( __('Overview'), 'read', 'index.php' );
|
||||
$submenu['index.php'][10] = array( __('Inbox'), 'read', 'inbox.php' );
|
||||
|
||||
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', 'wp-menu-open' );
|
||||
$submenu['edit.php'][5] = array( __('Write'), 'edit_posts', 'post-new.php' );
|
||||
|
Loading…
Reference in New Issue
Block a user