Make WordPress Core

Changeset 16283


Ignore:
Timestamp:
11/10/2010 10:07:07 PM (14 years ago)
Author:
westi
Message:

Add support for ID style classes in get_body_class(). Fixes #12397 props filosofo

File:
1 edited

Legend:

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

    r16204 r16283  
    444444            $classes[] = 'author';
    445445            $classes[] = 'author-' . sanitize_html_class( $author->user_nicename , $author->ID );
     446            $classes[] = 'author-' . $author->ID;
    446447        } elseif ( is_category() ) {
    447448            $cat = $wp_query->get_queried_object();
    448449            $classes[] = 'category';
    449450            $classes[] = 'category-' . sanitize_html_class( $cat->slug, $cat->term_id );
     451            $classes[] = 'category-' . $cat->term_id;
    450452        } elseif ( is_tag() ) {
    451453            $tags = $wp_query->get_queried_object();
    452454            $classes[] = 'tag';
    453455            $classes[] = 'tag-' . sanitize_html_class( $tags->slug, $tags->term_id );
     456            $classes[] = 'tag-' . $tags->term_id;
    454457        } elseif ( is_tax() ) {
    455458            $term = $wp_query->get_queried_object();
    456459            $classes[] = 'tax-' . sanitize_html_class( $term->taxonomy );
    457460            $classes[] = 'term-' . sanitize_html_class( $term->slug, $term->term_id );
     461            $classes[] = 'term-' . $term->term_id;
    458462        }
    459463    } elseif ( is_page() ) {
Note: See TracChangeset for help on using the changeset viewer.