• jomo

    (@jonathanmoorebcsorg)


    BadgeOS filtering is a little over-aggressive filtering all post types which introduces subtle bugs.

    In this example BadgeOS forces and extra autop call for all post types which breaks some things: it should just return the content without autop.
    Also there are other filters and for example, it could be possible to do an early exit based on commonly known non-Badgeos post types.

    content-filters.php

    function badgeos_reformat_entries( $content ) {
    
    	wp_enqueue_style( 'badgeos-front' );
    
    	$badge_id = get_the_ID();
    
    	// filter, but only on the main loop!
    	if ( !badgeos_is_main_loop( $badge_id ) )
    		return wpautop( $content );

    … simply return $content; instead

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fix: content filtering is over-aggressive’ is closed to new replies.