listen ) && betterdocs()->listen->has_listen( get_the_ID() ) ) { echo do_shortcode( '[betterdocs_listen]' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- rendered template parts, escaped at source. } /** * Extra content on the leading edge of the doc meta row, after reading time and * the Listen pill. * * @since 4.8.0 */ do_action( 'betterdocs_doc_meta_start' ); $meta_start = ob_get_clean(); ob_start(); if ( isset( betterdocs()->ai_actions ) && betterdocs()->ai_actions->has_actions() ) { // No per-instance overrides here — the classic templates render whatever the // global settings say — so this needs no context handoff. echo do_shortcode( '[betterdocs_ai_actions]' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- rendered template parts, escaped at source. } /** * Extra content on the trailing edge of the doc meta row, after AI Actions. * * @since 4.8.0 */ do_action( 'betterdocs_doc_meta_end' ); $meta_end = ob_get_clean(); $leading = $reading_time . $meta_start; $trailing = $meta_end; // Nothing on either side: emit no wrapper at all rather than an empty flex row. if ( '' === trim( $leading ) && '' === trim( $trailing ) ) { return; } ?>