Make WordPress Core


Ignore:
Timestamp:
02/05/2008 06:47:27 AM (17 years ago)
Author:
ryan
Message:

Trailing whitespace cleanup

File:
1 edited

Legend:

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

    r6713 r6726  
    240240        $count = number_format_i18n( $tag->count );
    241241        $count = ( $count > 0 ) ? "<a href='edit.php?tag=$tag->slug'>$count</a>" : $count;
    242        
     242
    243243        $out = '';
    244244        $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>';
     
    247247        $out .= '<td>' . apply_filters( 'term_name', $tag->name ) . '</td>';
    248248
    249         $out .= "<td>$count</td>";     
     249        $out .= "<td>$count</td>";
    250250        $out .= '<td><a href="edit-tags.php?action=edit&amp;tag_ID=' . $tag->term_id . '" class="edit">' .
    251251            __( 'Edit' ) . "</a></td>" .
    252             '<td><a href="' . wp_nonce_url( "edit-tags.php?action=delete&amp;tag_ID=$tag->term_id", 
    253                     'delete-tag_' . $tag->term_id ) . 
     252            '<td><a href="' . wp_nonce_url( "edit-tags.php?action=delete&amp;tag_ID=$tag->term_id",
     253                    'delete-tag_' . $tag->term_id ) .
    254254                '" class="delete:the-list:tag-' . $tag->term_id . ' delete">' .
    255255                __( 'Delete' ) . "</a></td>";
    256256        $out .= '</tr>';
    257        
     257
    258258        return $out;
    259259}
    260260
    261261// Outputs appropriate rows for the Nth page of the Tag Management screen,
    262 // assuming M tags displayed at a time on the page 
     262// assuming M tags displayed at a time on the page
    263263// Returns the number of tags displayed
    264264function tag_rows( $page = 0, $pagesize = 20, $searchterms = '' ) {
    265    
     265
    266266    // Get a page worth of tags
    267267    $start = $page * $pagesize;
    268268
    269269    $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0);
    270  
     270
    271271    if ( !empty( $searchterms ) ) {
    272272        $args['name__like'] = '%' . like_escape( $searchterms );
     
    274274
    275275    $tags = get_terms( 'post_tag', $args );
    276    
     276
    277277    // convert it to table rows
    278278    $out = '';
     
    292292        $count++;
    293293    }
    294    
     294
    295295    // filter and send to screen
    296296    $out = apply_filters('tag_rows', $out);
     
    331331    global $post;
    332332    static $class;
    333    
     333
    334334    $post = $page;
    335335    setup_postdata($page);
     
    356356
    357357    if ( ! $children_pages )
    358         return true; 
     358        return true;
    359359
    360360    for ( $i = 0; $i < count($children_pages); $i++ ) {
    361361
    362362        $child = $children_pages[$i];
    363            
     363
    364364        if ( $child->post_parent == $id ) {
    365             array_splice($children_pages, $i, 1); 
     365            array_splice($children_pages, $i, 1);
    366366            display_page_row($child, $children_pages, $level+1);
    367367            $i = -1; //as numeric keys in $children_pages are not preserved after splice
     
    371371
    372372/*
    373  * displays pages in hierarchical order 
     373 * displays pages in hierarchical order
    374374 */
    375375function page_rows( $pages ) {
     
    386386
    387387    foreach ( $pages as $page ) {
    388        
    389         // catch and repair bad pages 
     388
     389        // catch and repair bad pages
    390390        if ( $page->post_parent == $page->ID ) {
    391             $page->post_parent = 0; 
     391            $page->post_parent = 0;
    392392            $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) );
    393393            clean_page_cache( $page->ID );
    394394        }
    395          
     395
    396396        if ( 0 == $page->post_parent )
    397             $top_level_pages[] = $page; 
     397            $top_level_pages[] = $page;
    398398        else
    399             $children_pages[] = $page; 
     399            $children_pages[] = $page;
    400400    }
    401401
    402402    foreach ( $top_level_pages as $page )
    403403        display_page_row($page, $children_pages, 0);
    404    
    405     /* 
     404
     405    /*
    406406     * display the remaining children_pages which are orphans
    407407     * having orphan requires parental attention
    408408     */
    409409     if ( count($children_pages) > 0 ) {
    410         $empty_array = array(); 
    411         foreach ( $children_pages as $orphan_page ) { 
     410        $empty_array = array();
     411        foreach ( $children_pages as $orphan_page ) {
    412412            clean_page_cache( $orphan_page->ID);
    413413            display_page_row( $orphan_page, $empty_array, 0 );
    414         } 
     414        }
    415415     }
    416416}
     
    650650    if ( $for_post )
    651651        $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true;
    652    
     652
    653653    $tab_index_attribute = '';
    654654    if ( (int) $tab_index > 0 )
Note: See TracChangeset for help on using the changeset viewer.