Changeset 6705 for trunk/wp-admin/index.php
- Timestamp:
- 02/02/2008 07:57:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/index.php
r6484 r6705 1 1 <?php 2 2 3 require_once('admin.php'); 4 5 require( './includes/dashboard.php' ); 6 7 wp_dashboard_setup(); 3 8 4 9 function index_js() { … … 6 11 <script type="text/javascript"> 7 12 jQuery(function() { 8 jQuery('#incominglinks').load('index-extra.php?jax=incominglinks'); 9 jQuery('#devnews').load('index-extra.php?jax=devnews'); 10 // jQuery('#planetnews').load('index-extra.php?jax=planetnews'); 13 jQuery('#dashboard_incoming_links div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=incominglinks'); 14 jQuery('#dashboard_primary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=devnews'); 15 jQuery('#dashboard_secondary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=planetnews'); 16 jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ).html( 'TODO' ); 11 17 }); 12 18 </script> … … 78 84 ?> 79 85 <p><?php printf( __( 'You are using %1$s theme with %2$s.' ), $ct->title, "<a href='widgets.php'>$widgets_text</a>" ); ?> <a href="themes.php" class="rbutton"><?php _e('Change Theme'); ?></a> You're using BetaPress TODO.</p> 80 <p>81 86 <?php do_action( 'rightnow_end' ); ?> 82 87 <?php do_action( 'activity_box_end' ); ?> 83 </div> 88 </div><!-- rightnow --> 84 89 85 < div id="dashboard-widgets">90 <?php wp_dashboard(); ?> 86 91 87 <div class="dashboard-widget"> 88 <div class="dashboard-widget-edit"><a href=""><?php _e('See All'); ?></a> | <a href=""><?php _e('Edit'); ?></a></div> 89 <h3>Recent Comments</h3> 92 </div><!-- wrap --> 90 93 91 <?php 92 $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"); 93 $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'"); 94 95 if ( $comments || $numcomments ) : 96 ?> 97 98 <?php if ( $numcomments ) : ?> 99 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s) »'), number_format_i18n($numcomments) ); ?></a></strong></p> 100 <?php endif; ?> 101 102 <ul> 103 <?php 104 if ( $comments ) { 105 foreach ($comments as $comment) { 106 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>'); 107 edit_comment_link(__("Edit"), ' <small>(', ')</small>'); 108 echo '</li>'; 109 } 110 } 111 ?> 112 </ul> 113 <?php endif; ?> 114 </div> 115 116 117 <div class="dashboard-widget"> 118 <?php 119 $more_link = apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ); 120 ?> 121 <div class="dashboard-widget-edit"><a href="<?php echo htmlspecialchars( $more_link ); ?>"><?php _e('See All'); ?></a> | <a href=""><?php _e('Edit'); ?></a></div> 122 <h3><?php _e('Incoming Links'); ?></h3> 123 124 <div id="incominglinks"></div> 125 </div> 126 127 <div class="dashboard-widget"> 128 <?php 129 $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5"); 130 ?> 131 <div class="dashboard-widget-edit"><a href="<?php echo htmlspecialchars( $more_link ); ?>"><?php _e('See All'); ?></a> | <a href=""><?php _e('Edit'); ?></a></div> 132 <h3>Recent Posts</h3> 133 134 <ul> 135 <?php 136 foreach ($recentposts as $post) { 137 if ($post->post_title == '') 138 $post->post_title = sprintf(__('Post #%s'), $post->ID); 139 echo "<li><a href='post.php?action=edit&post=$post->ID'>"; 140 the_title(); 141 echo '</a></li>'; 142 } 143 ?> 144 </ul> 145 </div> 146 147 <div class="dashboard-widget"> 148 <div class="dashboard-widget-edit"><a href="<?php echo htmlspecialchars( $more_link ); ?>"><?php _e('See All'); ?></a> | <a href=""><?php _e('Edit'); ?></a> | <a href=""><?php _e('RSS'); ?></a></div> 149 <h3><?php echo apply_filters( 'dashboard_primary_title', __('Blog') ); ?></h3> 150 151 <div id="devnews"></div> 152 </div> 153 154 <?php do_action( 'dashboard_widgets' ); ?> 155 156 <p><a href=""><?php _e('Customize this page'); ?></a>.</p> 157 158 </div> 159 160 161 <div id="planetnews"></div> 162 163 <div style="clear: both"> 164 <br clear="all" /> 165 </div> 166 </div> 167 168 <?php 169 require('./admin-footer.php'); 170 ?> 94 <?php require('./admin-footer.php'); ?>
Note: See TracChangeset
for help on using the changeset viewer.