Changeset 52324 for trunk/src/wp-includes/blocks/page-list.php
- Timestamp:
- 12/06/2021 06:18:27 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/page-list.php
r52275 r52324 174 174 } 175 175 176 $title = wp_kses( $page['title'], wp_kses_allowed_html( 'post' ) ); 177 176 178 $markup .= '<li class="wp-block-pages-list__item' . $css_class . '"' . $style_attribute . '>'; 177 179 178 180 if ( isset( $page['children'] ) && $is_navigation_child && $open_submenus_on_click ) { 179 $markup .= '<button class="' . $navigation_child_content_class . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . wp_kses( 180 $page['title'], 181 wp_kses_allowed_html( 'post' ) 182 ) . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><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></span>' . 181 $markup .= '<button aria-label="' . $title . ' ' . __( 'submenu', 'gutenberg' ) . '" class="' . $navigation_child_content_class . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . $title . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><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></span>' . 183 182 '</button>'; 184 183 } else { 185 $markup .= '<a class="wp-block-pages-list__item__link' . $navigation_child_content_class . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' . wp_kses( 186 $page['title'], 187 wp_kses_allowed_html( 'post' ) 188 ) . '</a>'; 184 $markup .= '<a class="wp-block-pages-list__item__link' . $navigation_child_content_class . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' . $title . '</a>'; 189 185 } 190 186 191 187 if ( isset( $page['children'] ) ) { 192 188 if ( $is_navigation_child && $show_submenu_icons && ! $open_submenus_on_click ) { 193 $markup .= '<button class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">';189 $markup .= '<button aria-label="' . $title . ' ' . __( 'submenu', 'gutenberg' ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">'; 194 190 $markup .= '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><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></span>'; 195 191 $markup .= '</button>';
Note: See TracChangeset
for help on using the changeset viewer.