WordPress.org

Make WordPress Core

Ticket #13860: 13860-post-class-post-password.diff

File 13860-post-class-post-password.diff, 634 bytes (added by zeo, 4 years ago)

Add class post-password to post_class(). Also fix minor typo.

  • wp-includes/post-template.php

     
    317317        $classes[] = $post->post_type; 
    318318        $classes[] = 'type-' . $post->post_type; 
    319319 
     320        // post requires password 
     321        if ( post_password_required($post->ID) ) 
     322                $classes[] = 'post-password'; 
     323 
    320324        // sticky for Sticky Posts 
    321325        if ( is_sticky($post->ID) && is_home() && !is_paged() ) 
    322326                $classes[] = 'sticky'; 
    323327 
    324         // hentry for hAtom compliace 
     328        // hentry for hAtom compliance 
    325329        $classes[] = 'hentry'; 
    326330 
    327331        // Categories