Make WordPress Core


Ignore:
Timestamp:
03/18/2009 02:43:45 AM (17 years ago)
Author:
ryan
Message:

Trim trailing whitespace

File:
1 edited

Legend:

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

    r10774 r10810  
    361361function get_body_class( $class = '' ) {
    362362    global $wp_query, $current_user;
    363    
     363
    364364    $classes = array();
    365    
     365
    366366    if ( 'rtl' == get_bloginfo('text_direction') )
    367367        $classes[] = 'rtl';
    368    
     368
    369369    if ( is_front_page() )
    370370        $classes[] = 'home';
     
    383383    if ( is_404() )
    384384        $classes[] = 'error404';
    385    
     385
    386386    if ( is_single() ) {
    387387        the_post();
    388        
     388
    389389        $postID = $wp_query->post->ID;
    390390        $classes[] = 'single postid-' . $postID;
    391        
     391
    392392        if ( is_attachment() ) {
    393393            $mime_type = get_post_mime_type();
     
    395395            $classes[] = 'attachmentid-' . $postID . ' attachment-' . str_replace( $mime_prefix, "", "$mime_type" );
    396396        }
    397        
     397
    398398        rewind_posts();
    399399    } elseif ( is_archive() ) {
     
    413413    } elseif ( is_page() ) {
    414414        the_post();
    415        
     415
    416416        $pageID = $wp_query->post->ID;
    417417        $page_children = wp_list_pages("child_of=$pageID&echo=0");
    418        
     418
    419419        if ( $page_children )
    420420            $classes[] = 'page-parent';
    421        
     421
    422422        if ( $wp_query->post->post_parent )
    423423            $classes[] = 'page-child parent-pageid-' . $wp_query->post->post_parent;
    424        
     424
    425425        if ( is_page_template() )
    426426            $classes[] = 'page-template page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
    427        
     427
    428428        rewind_posts();
    429429    } elseif ( is_search() ) {
    430430        the_post();
    431        
     431
    432432        if ( have_posts() )
    433433            $classes[] = 'search-results';
    434434        else
    435435            $classes[] = 'search-no-results';
    436        
     436
    437437        rewind_posts();
    438438    }
    439    
     439
    440440    if ( is_user_logged_in() )
    441441        $classes[] = 'logged-in';
    442    
     442
    443443    $page = $wp_query->get('page');
    444    
     444
    445445    if ( !$page || $page < 2)
    446446        $page = $wp_query->get('paged');
    447    
     447
    448448    if ( $page && $page > 1 ) {
    449449        $classes[] = 'paged-' . $page;
    450        
     450
    451451        if ( is_single() )
    452452            $classes[] = 'single-paged-' . $page;
     
    464464            $classes[] = 'search-paged-' . $page;
    465465    }
    466    
     466
    467467    if ( !empty($class) ) {
    468468        if ( !is_array( $class ) )
     
    470470        $classes = array_merge($classes, $class);
    471471    }
    472    
     472
    473473    return apply_filters('body_class', $classes, $class);
    474474}
     
    855855 */
    856856function walk_page_tree($pages, $depth, $current_page, $r) {
    857     if ( empty($r['walker']) ) 
     857    if ( empty($r['walker']) )
    858858        $walker = new Walker_Page;
    859859    else
     
    926926
    927927    $post_title = attribute_escape($_post->post_title);
    928    
     928
    929929    if ( $text ) {
    930930        $link_text = attribute_escape($text);
     
    935935    if( trim($link_text) == '' )
    936936        $link_text = $_post->post_title;
    937    
     937
    938938    return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon, $text );
    939939}
Note: See TracChangeset for help on using the changeset viewer.