ID ) ) { $rev_id = absint( sanitize_text_field( (string) wp_unslash( $_GET['rev_id'] ) ) ); $revision_post = get_post( $rev_id ); if ( $revision_post instanceof WP_Post && $revision_post->post_parent === $current_post->ID ) { $current_post = $revision_post; } } $story->load_from_post( $current_post ); $renderer = new HTML( $story ); echo $renderer->render(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } // Some themes like the Sage theme override the WordPress template hierarchy in an unusual way, // which the Single Renderer tries to work around with filters. // However, that means this template potentially gets loaded twice when using such a theme, causing duplicate markup. // Exiting here avoids that, while still guaranteeing the output buffer to function properly. exit;