Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r12162 r12311  
    449449            $url = get_edit_post_link( $draft->ID );
    450450            $title = _draft_or_post_title( $draft->ID );
    451             $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit &#8220;%s&#8221;' ), 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 &#8220;%s&#8221;' ), 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>';
    452452            if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) )
    453453                $item .= '<p>' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '&hellip;' : '' ) . '</p>';
     
    530530    $comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>';
    531531
    532     $actions = array();
    533 
    534532    $actions_string = '';
    535533    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
    536543        $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
    537544        $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
     
    553560            $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>';
    554561
    555         $actions = apply_filters( 'comment_row_actions', $actions, $comment );
     562        $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
    556563
    557564        $i = 0;
     
    630637    if ( !$rss->get_item_quantity() ) {
    631638        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&hellip; yet. It&#8217;s okay &#8212; there is no rush.') . "</p>\n";
     639        $rss->__destruct();
     640        unset($rss);
    632641        return;
    633642    }
     
    683692
    684693    echo "</ul>\n";
    685 
     694    $rss->__destruct();
     695    unset($rss);
    686696}
    687697
     
    739749        }
    740750    } elseif ( !$rss->get_item_quantity() ) {
     751        $rss->__destruct();
     752        unset($rss);
    741753        return false;
    742754    } else {
     
    744756        wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] );
    745757        echo '</div>';
     758        $rss->__destruct();
     759        unset($rss);
    746760    }
    747761}
     
    826840        echo "<h5><a href='$link'>$title</a></h5>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n";
    827841        echo "<p>$description</p>\n";
     842       
     843        $$feed->__destruct();
     844        unset($$feed);
    828845    }
    829846}
     
    919936        if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) {
    920937            $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) ) {
    924939                $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            }
    925945        }
    926946        update_option( 'dashboard_widget_options', $widget_options );
Note: See TracChangeset for help on using the changeset viewer.