Changeset 9219 for trunk/wp-admin/includes/dashboard.php
- Timestamp:
- 10/16/2008 10:35:53 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r9208 r9219 29 29 30 30 // QuickPress Widget 31 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' , 'wp_dashboard_empty_control');31 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); 32 32 33 33 // Recent Drafts … … 185 185 </div> 186 186 187 <h4><label for="quickpress-content"><?php _e('Post') ?></label></h4> 187 <div id="add-media-button" class="alignright"> 188 <a class="thickbox button" href="http://hacek.local/wordpress/wp-admin/media-upload.php?TB_iframe=true" id="add-media-link"><?php _e( 'Insert Media' ); ?></a> 189 </div> 190 191 <h4 id="content-label"><label for="content"><?php _e('Post') ?></label></h4> 188 192 <div class="textarea-wrap"> 189 <textarea name="content" id=" quickpress-content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea>193 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea> 190 194 </div> 191 195 … … 316 320 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>'; 317 321 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 318 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 322 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>'; 323 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 319 324 320 325 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); … … 327 332 328 333 // Reply and quickedit need a hide-if-no-js span 329 if ( 'reply' == $action || 'quickedit' == $action)334 if ( 'reply' == $action ) 330 335 $action .= ' hide-if-no-js'; 336 elseif ( 'quickedit' == $action ) 337 $action .= ' hide-if-no-js hide-if-js'; // hah 331 338 332 339 $actions_string .= "<span class='$action'>$sep$link</span>"; … … 362 369 <blockquote><p><?php comment_excerpt(); ?></p></blockquote> 363 370 <p class="comment-actions"><?php echo $actions_string; ?></p> 371 372 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 373 <textarea class="comment"><?php echo $comment->comment_content; ?></textarea> 374 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div> 375 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div> 376 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 377 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> 378 </div> 379 364 380 </div> 365 381 <?php … … 455 471 function wp_dashboard_rss_output( $widget_id ) { 456 472 $widgets = get_option( 'dashboard_widget_options' ); 473 echo "<div class='rss-widget'>"; 457 474 wp_widget_rss_output( $widgets[$widget_id] ); 475 echo "</div>"; 458 476 } 459 477 … … 463 481 464 482 function wp_dashboard_secondary_control() { 465 wp_dashboard_rss_control( 'dashboard_secondary' , array( 'show_summary' => false, 'show_author' => false, 'show_date' => false ));483 wp_dashboard_rss_control( 'dashboard_secondary' ); 466 484 } 467 485 … … 477 495 @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); 478 496 $rss = @fetch_rss( $url ); 497 479 498 if ( !isset($rss->items) || 0 == count($rss->items) ) 480 499 return false; 481 500 482 echo "<ul id='planetnews'>\n";483 484 501 $rss->items = array_slice($rss->items, 0, $items); 485 foreach ($rss->items as $item ) { 486 $title = wp_specialchars($item['title']); 487 list($author,$post) = explode( ':', $title, 2 ); 488 $link = clean_url($item['link']); 489 490 echo "\t<li><a href='$link'><span class='post'>$post</span><span class='hidden'> - </span><cite>$author</cite></a></li>\n"; 491 } 492 493 echo "</ul>\n<br class='clear' />\n"; 502 503 if ( 'http://planet.wordpress.org/' == $rss->channel['link'] ) { 504 foreach ( array_keys($rss->items) as $i ) { 505 list($site, $description) = explode( ':', wp_specialchars($rss->items[$i]['title']), 2 ); 506 $rss->items[$i]['dc']['creator'] = trim($site); 507 $rss->items[$i]['title'] = trim($description); 508 } 509 } 510 511 echo "<div class='rss-widget'>"; 512 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 513 echo "</div>"; 494 514 } 495 515 … … 605 625 606 626 /* Dashboard Widgets Controls */ 607 608 // Temp609 function wp_dashboard_empty_control() {610 echo "This feature isn't enabled in this prototype.";611 }612 627 613 628 // Calls widget_control callback
Note: See TracChangeset
for help on using the changeset viewer.