array( __CLASS__, 'render_faq' ) ) ); register_block_type( AEOORA_DIR . 'blocks/tldr', array( 'render_callback' => array( __CLASS__, 'render_tldr' ) ) ); } /** * Render FAQ block. * * @return string */ public static function render_faq() { $id = get_the_ID(); $html = $id ? Aeoora_Schema::faq_html( $id ) : ''; if ( '' === $html && defined( 'REST_REQUEST' ) && REST_REQUEST ) { return '

' . esc_html__( 'aeoora FAQ: add questions in the aeoora panel below the editor (or generate them with AI).', 'aeoora' ) . '

'; } return $html; } /** * Render TL;DR block. * * @return string */ public static function render_tldr() { $html = Aeoora_Schema::shortcode_tldr( array() ); if ( '' === $html && defined( 'REST_REQUEST' ) && REST_REQUEST ) { return '

' . esc_html__( 'aeoora key takeaway: write it in the aeoora panel below the editor.', 'aeoora' ) . '

'; } return $html; } }