Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12311 r12162  
    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 ) ) . "'>" . 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 &#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>';
    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
    532534    $actions_string = '';
    533535    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 
    543536        $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
    544537        $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
     
    560553            $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>';
    561554
    562         $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
     555        $actions = apply_filters( 'comment_row_actions', $actions, $comment );
    563556
    564557        $i = 0;
     
    637630    if ( !$rss->get_item_quantity() ) {
    638631        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);
    641632        return;
    642633    }
     
    692683
    693684    echo "</ul>\n";
    694     $rss->__destruct();
    695     unset($rss);
     685
    696686}
    697687
     
    749739        }
    750740    } elseif ( !$rss->get_item_quantity() ) {
    751         $rss->__destruct();
    752         unset($rss);
    753741        return false;
    754742    } else {
     
    756744        wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] );
    757745        echo '</div>';
    758         $rss->__destruct();
    759         unset($rss);
    760746    }
    761747}
     
    840826        echo "<h5><a href='$link'>$title</a></h5>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n";
    841827        echo "<p>$description</p>\n";
    842        
    843         $$feed->__destruct();
    844         unset($$feed);
    845828    }
    846829}
     
    936919        if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) {
    937920            $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
    939924                $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             }
    945925        }
    946926        update_option( 'dashboard_widget_options', $widget_options );
Note: See TracChangeset for help on using the changeset viewer.