[wp-trac] [WordPress Trac] #41711: Remove hAtom from core

WordPress Trac noreply at wordpress.org
Wed Aug 23 08:30:43 UTC 2017


#41711: Remove hAtom from core
--------------------------------------+------------------------------
 Reporter:  joostdevalk               |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Formatting                |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback 2nd-opinion  |     Focuses:
--------------------------------------+------------------------------
Changes (by grapplerulrich):

 * keywords:  dev-feedback 2nd-opinion close => dev-feedback 2nd-opinion


Comment:

 > The big problem is that many themes use hentry for styling.

 We can solve the by introducing a `add_theme_support` that allows themes
 to remove it automatically without needs all themes to add hacks like

 {{{#!php
 <?php
 function _s_body_classes( $classes ) {
         // Adds a class of hfeed to non-singular pages.
         if ( ! is_singular() ) {
                 $classes[] = 'hfeed';
         }
         return $classes;
 }
 add_filter( 'body_class', '_s_body_classes' );

 function _s_post_classes( $classes ) {
         if ( 'page' === get_post_type() ) {
                 $classes = array_diff( $classes, array( 'hentry' ) );
         }
         return $classes;
 }
 add_filter( 'post_class', '_s_post_classes' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41711#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list