Automattic\WooCommerce\Blocks\BlockTypes
ProductFiltersOverlayNavigation::render_icon()
Gets the icon to render depending on the triggerType attribute.
Method of the class: ProductFiltersOverlayNavigation{}
No Hooks.
Return
String
. Label to render on the block
Usage
// private - for code of main (parent) class only $result = $this->render_icon( $attributes );
- $attributes(array) (required)
- Block attributes.
ProductFiltersOverlayNavigation::render_icon() ProductFiltersOverlayNavigation::render icon code WC 9.4.2
private function render_icon( $attributes ) { if ( 'open-overlay' === $attributes['triggerType'] ) { return '<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg" style="width: 16px; height: 16px;"><path d="M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z" fill="currentColor"></path></svg>'; } return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor" aria-hidden="true" focusable="false" style="width: 16px; height: 16px;"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>'; }