- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r12311 r12162 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 ) ) . "'> " . 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>';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>'; 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 532 534 $actions_string = ''; 533 535 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 534 // preorder it: Approve | Reply | Edit | Spam | Trash535 $actions = array(536 'approve' => '', 'unapprove' => '',537 'reply' => '',538 'edit' => '',539 'spam' => '',540 'trash' => '', 'delete' => ''541 );542 543 536 $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); 544 537 $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); … … 560 553 $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>'; 561 554 562 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );555 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 563 556 564 557 $i = 0; … … 637 630 if ( !$rss->get_item_quantity() ) { 638 631 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);641 632 return; 642 633 } … … 692 683 693 684 echo "</ul>\n"; 694 $rss->__destruct(); 695 unset($rss); 685 696 686 } 697 687 … … 749 739 } 750 740 } elseif ( !$rss->get_item_quantity() ) { 751 $rss->__destruct();752 unset($rss);753 741 return false; 754 742 } else { … … 756 744 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 757 745 echo '</div>'; 758 $rss->__destruct();759 unset($rss);760 746 } 761 747 } … … 840 826 echo "<h5><a href='$link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n"; 841 827 echo "<p>$description</p>\n"; 842 843 $$feed->__destruct();844 unset($$feed);845 828 } 846 829 } … … 936 919 if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { 937 920 $rss = fetch_feed($widget_options[$widget_id]['url']); 938 if ( is_wp_error($rss) ) { 921 if ( ! is_wp_error($rss) ) 922 $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); 923 else 939 924 $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 }945 925 } 946 926 update_option( 'dashboard_widget_options', $widget_options );
Note: See TracChangeset
for help on using the changeset viewer.