Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks

List_Item{}WC 1.0└─ Abstract_Block_Renderer

Renders a list item block.

No Hooks.

Usage

$List_Item = new List_Item();
// use class methods

Methods

  1. protected add_spacer( $content, $email_attrs )
  2. protected render_content( $block_content, array $parsed_block, Rendering_Context $rendering_context )

List_Item{} code WC 10.5.0

class List_Item extends Abstract_Block_Renderer {
	/**
	 * Override this method to disable spacing (block gap) for list items.
	 *
	 * @param string $content Content.
	 * @param array  $email_attrs Email attributes.
	 */
	protected function add_spacer( $content, $email_attrs ): string {
		return $content;
	}

	/**
	 * Renders the block content.
	 *
	 * @param string            $block_content Block content.
	 * @param array             $parsed_block Parsed block.
	 * @param Rendering_Context $rendering_context Rendering context.
	 * @return string
	 */
	protected function render_content( $block_content, array $parsed_block, Rendering_Context $rendering_context ): string {
		return $block_content;
	}
}