Changeset 53157 for trunk/src/wp-includes/blocks/navigation-link.php
- Timestamp:
- 04/12/2022 03:10:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation-link.php
r52402 r53157 111 111 */ 112 112 function block_core_navigation_link_render_submenu_icon() { 113 return '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img"aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg>';113 return '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg>'; 114 114 } 115 115 … … 117 117 * Renders the `core/navigation-link` block. 118 118 * 119 * @param array $attributes The block attributes.120 * @param array $contentThe saved content.121 * @param array $blockThe parsed block.119 * @param array $attributes The block attributes. 120 * @param string $content The saved content. 121 * @param WP_Block $block The parsed block. 122 122 * 123 123 * @return string Returns the post content with the legacy widget added. … … 194 194 195 195 if ( isset( $attributes['label'] ) ) { 196 $html .= wp_kses( 197 $attributes['label'], 198 array( 199 'code' => array(), 200 'em' => array(), 201 'img' => array( 202 'scale' => array(), 203 'class' => array(), 204 'style' => array(), 205 'src' => array(), 206 'alt' => array(), 207 ), 208 's' => array(), 209 'span' => array( 210 'style' => array(), 211 ), 212 'strong' => array(), 213 ) 214 ); 196 $html .= wp_kses_post( $attributes['label'] ); 215 197 } 216 198 217 199 $html .= '</span>'; 200 201 // Add description if available. 202 if ( ! empty( $attributes['description'] ) ) { 203 $html .= '<span class="wp-block-navigation-item__description">'; 204 $html .= wp_kses_post( $attributes['description'] ); 205 $html .= '</span>'; 206 } 207 208 $html .= '</a>'; 209 // End anchor tag content. 218 210 219 211 if ( isset( $block->context['showSubmenuIcon'] ) && $block->context['showSubmenuIcon'] && $has_submenu ) { … … 221 213 $html .= '<span class="wp-block-navigation__submenu-icon">' . block_core_navigation_link_render_submenu_icon() . '</span>'; 222 214 } 223 224 $html .= '</a>';225 // End anchor tag content.226 215 227 216 if ( $has_submenu ) {
Note: See TracChangeset
for help on using the changeset viewer.