Automattic\WooCommerce\EmailEditor\Integrations\Utils
Table_Wrapper_Helper::render_outlook_table_cell
Render an Outlook-specific table cell using conditional comments.
Method of the class: Table_Wrapper_Helper{}
No Hooks.
Returns
String. The generated table cell HTML with Outlook conditionals.
Usage
$result = Table_Wrapper_Helper::render_outlook_table_cell( $content, $cell_attrs ): string;
- $content(string) (required)
- The content to wrap.
- $cell_attrs(array)
- Cell attributes.
Default:array()
Table_Wrapper_Helper::render_outlook_table_cell() Table Wrapper Helper::render outlook table cell code WC 10.8.1
public static function render_outlook_table_cell(
string $content,
array $cell_attrs = array()
): string {
$content_with_outlook_conditional = '<![endif]-->' . $content . '<!--[if mso | IE]>';
return '<!--[if mso | IE]>' . self::render_table_cell( $content_with_outlook_conditional, $cell_attrs ) . '<![endif]-->';
}