WordPress.org

Make WordPress Core

Opened 10 months ago

Last modified 10 months ago

#41711 new defect (bug)

Remove hAtom from core

Reported by: joostdevalk Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Formatting Keywords: dev-feedback 2nd-opinion
Focuses: Cc:

Description

We output hAtom in core and well, it's just not really needed anymore, so I'd like to get rid of it.

Here, amongst other places:

https://core.trac.wordpress.org/browser/tags/4.8.1/src/wp-includes/post-template.php?marks=505,506#L496

Change History (5)

#1 @SergeyBiryukov
10 months ago

Introduced in [8641] as a part of sticky posts. No reasoning for hentry is mentioned in the ticket though: #7457.

#2 follow-up: @swissspidy
10 months ago

See #32336 and #32326. The big problem is that many themes use hentry for styling.

#3 in reply to: ↑ 2 @netweb
10 months ago

  • Keywords close added

Replying to swissspidy:

See #32336 and #32326. The big problem is that many themes use hentry for styling.

Also https://core.trac.wordpress.org/ticket/30783#comment:27 tl;dr: - hentry will *not* be removed from core

#4 @grapplerulrich
10 months ago

  • Keywords close removed

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
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' );

Did not mean to remove the close keyword but I don't agree it should be closed.

Last edited 10 months ago by grapplerulrich (previous) (diff)

This ticket was mentioned in Slack in #themereview by grapplerulrich. View the logs.


10 months ago

Note: See TracTickets for help on using tickets.