Make WordPress Core


Ignore:
Timestamp:
08/09/2008 05:36:14 AM (18 years ago)
Author:
ryan
Message:

Trailing whitespace cleanup

File:
1 edited

Legend:

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

    r8589 r8600  
    5858                        echo "\t" . _cat_row( $category, $level );
    5959
    60                 unset($categories[$i]); // Prune the working set               
     60                unset($categories[$i]); // Prune the working set
    6161                $count++;
    6262
     
    192192
    193193        $args = array();
    194        
     194
    195195        if ( is_array( $selected_cats ) )
    196196                $args['selected_cats'] = $selected_cats;
     
    548548        }
    549549
    550         /* 
     550        /*
    551551         * arrange pages into two parts: top level pages and children_pages
    552          * children_pages is two dimensional array, eg. 
    553          * children_pages[10][] contains all sub-pages whose parent is 10. 
     552         * children_pages is two dimensional array, eg.
     553         * children_pages[10][] contains all sub-pages whose parent is 10.
    554554         * It only takes O(N) to arrange this and it takes O(1) for subsequent lookup operations
    555555         * If searching, ignore hierarchy and treat everything as top level
    556556         */
    557557        if ( empty($_GET['s']) )  {
    558                
     558
    559559                $top_level_pages = array();
    560560                $children_pages  = array();
    561                
     561
    562562                foreach ( $pages as $page ) {
    563                        
     563
    564564                        // catch and repair bad pages
    565565                        if ( $page->post_parent == $page->ID ) {
     
    568568                                clean_page_cache( $page->ID );
    569569                        }
    570        
     570
    571571                        if ( 0 == $page->post_parent )
    572572                                $top_level_pages[] = $page;
     
    581581        $start = ($pagenum - 1) * $per_page;
    582582        $end = $start + $per_page;
    583        
     583
    584584        foreach ( $pages as $page ) {
    585585                if ( $count >= $end )
     
    594594                        _page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page );
    595595        }
    596        
     596
    597597        // if it is the last pagenum and there are orphaned pages, display them with paging as well
    598598        if ( isset($children_pages) && $count < $end ){
     
    614614 */
    615615function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
    616        
     616
    617617        if ( ! isset( $children_pages[$parent] ) )
    618                 return; 
    619                
     618                return;
     619
    620620        $start = ($pagenum - 1) * $per_page;
    621621        $end = $start + $per_page;
    622        
     622
    623623        foreach ( $children_pages[$parent] as $page ) {
    624                
     624
    625625                if ( $count >= $end )
    626626                        break;
    627                        
     627
    628628                // If the page starts in a subtree, print the parents.
    629629                if ( $count == $start && $page->post_parent > 0 ) {
     
    646646                if ( $count >= $start )
    647647                        echo "\t" . display_page_row( $page, $level );
    648                        
     648
    649649                $count++;
    650650
    651651                _page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page );
    652652        }
    653        
     653
    654654        unset( $children_pages[$parent] ); //required in order to keep track of orphans
    655655}
     
    659659
    660660        $current_user = wp_get_current_user();
    661        
     661
    662662        if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) )
    663663                $user_object = new WP_User( (int) $user_object );
     
    748748
    749749                $post_link .= get_the_title($comment->comment_post_ID) . '</a>';
    750                        
     750
    751751                $edit_link_start = "<a class='row-title' href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>";
    752752                $edit_link_end = '</a>';
     
    755755                $edit_link_start = $edit_link_end ='';
    756756        }
    757        
     757
    758758        $author_url = get_comment_author_url();
    759759        if ( 'http://' == $author_url )
     
    789789    <?php endif; ?>
    790790    <a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=detail"><?php comment_author_IP() ?></a>
    791         <?php endif; //current_user_can?>   
     791        <?php endif; //current_user_can?>
    792792    </p>
    793793        <?php if ( 'detail' == $mode ) comment_text(); ?>
     
    11721172        global $wp_meta_boxes;
    11731173
    1174        
     1174
    11751175        if  ( !isset($wp_meta_boxes) )
    11761176                $wp_meta_boxes = array();
Note: See TracChangeset for help on using the changeset viewer.