- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r12162 r12311 449 449 $url = get_edit_post_link( $draft->ID ); 450 450 $title = _draft_or_post_title( $draft->ID ); 451 $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit “%s”' ), esc_attr( $title ) ) . "'> $title</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>';451 $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit “%s”' ), esc_attr( $title ) ) . "'>" . esc_html($title) . "</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>'; 452 452 if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) 453 453 $item .= '<p>' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '</p>'; … … 530 530 $comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>'; 531 531 532 $actions = array();533 534 532 $actions_string = ''; 535 533 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 534 // preorder it: Approve | Reply | Edit | Spam | Trash 535 $actions = array( 536 'approve' => '', 'unapprove' => '', 537 'reply' => '', 538 'edit' => '', 539 'spam' => '', 540 'trash' => '', 'delete' => '' 541 ); 542 536 543 $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); 537 544 $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); … … 553 560 $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>'; 554 561 555 $actions = apply_filters( 'comment_row_actions', $actions, $comment );562 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); 556 563 557 564 $i = 0; … … 630 637 if ( !$rss->get_item_quantity() ) { 631 638 echo '<p>' . __('This dashboard widget queries <a href="http://blogsearch.google.com/">Google Blog Search</a> so that when another blog links to your site it will show up here. It has found no incoming links… yet. It’s okay — there is no rush.') . "</p>\n"; 639 $rss->__destruct(); 640 unset($rss); 632 641 return; 633 642 } … … 683 692 684 693 echo "</ul>\n"; 685 694 $rss->__destruct(); 695 unset($rss); 686 696 } 687 697 … … 739 749 } 740 750 } elseif ( !$rss->get_item_quantity() ) { 751 $rss->__destruct(); 752 unset($rss); 741 753 return false; 742 754 } else { … … 744 756 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 745 757 echo '</div>'; 758 $rss->__destruct(); 759 unset($rss); 746 760 } 747 761 } … … 826 840 echo "<h5><a href='$link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n"; 827 841 echo "<p>$description</p>\n"; 842 843 $$feed->__destruct(); 844 unset($$feed); 828 845 } 829 846 } … … 919 936 if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { 920 937 $rss = fetch_feed($widget_options[$widget_id]['url']); 921 if ( ! is_wp_error($rss) ) 922 $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); 923 else 938 if ( is_wp_error($rss) ) { 924 939 $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); 940 } else { 941 $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); 942 $rss->__destruct(); 943 unset($rss); 944 } 925 945 } 926 946 update_option( 'dashboard_widget_options', $widget_options );
Note: See TracChangeset
for help on using the changeset viewer.