Automattic\WooCommerce\EmailEditor\Integrations\Utils
Table_Wrapper_Helper::render_outlook_table_wrapper
Render an Outlook-specific table wrapper using conditional comments.
Метод класса: Table_Wrapper_Helper{}
Хуков нет.
Возвращает
string. The generated table wrapper HTML.
Использование
$result = Table_Wrapper_Helper::render_outlook_table_wrapper( $content, $table_attrs, $cell_attrs, $row_attrs, $render_cell ): string;
- $content(строка) (обязательный)
- The content to wrap (e.g., '{block_content}').
- $table_attrs(массив)
- Table attributes to merge with defaults.
По умолчанию:array() - $cell_attrs(массив)
- Cell attributes.
По умолчанию:array() - $row_attrs(массив)
- Row attributes.
По умолчанию:array() - $render_cell(true|false)
- Whether to render the td wrapper (default true).
По умолчанию:true
Код Table_Wrapper_Helper::render_outlook_table_wrapper() Table Wrapper Helper::render outlook table wrapper WC 11.2.2
public static function render_outlook_table_wrapper(
string $content,
array $table_attrs = array(),
array $cell_attrs = array(),
array $row_attrs = array(),
bool $render_cell = true
): string {
$content_with_outlook_conditional = '<![endif]-->' . $content . '<!--[if mso | IE]>';
return '<!--[if mso | IE]>' . self::render_table_wrapper( $content_with_outlook_conditional, $table_attrs, $cell_attrs, $row_attrs, $render_cell ) . '<![endif]-->';
}