Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Quote::get_citation_wrapper
Returns the citation content with a wrapper.
Метод класса: Quote{}
Хуков нет.
Возвращает
Строку
. The wrapped citation HTML or empty string if no citation.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_citation_wrapper( $citation_content, $parsed_block ): string;
- $citation_content(строка) (обязательный)
- The citation text.
- $parsed_block(массив) (обязательный)
- Parsed block.
Код Quote::get_citation_wrapper() Quote::get citation wrapper WC 10.0.2
private function get_citation_wrapper( string $citation_content, array $parsed_block ): string { if ( empty( $citation_content ) ) { return ''; } return $this->add_spacer( sprintf( '<p style="margin: 0; %2$s"><cite class="email-block-quote-citation" style="display: block; margin: 0;">%1$s</cite></p>', $citation_content, WP_Style_Engine::compile_css( array( 'text-align' => $parsed_block['attrs']['textAlign'] ?? '' ), '' ), ), $parsed_block['email_attrs'] ?? array() ); }