Changeset 48349 for trunk/src/wp-includes/widgets/class-wp-widget-rss.php
- Timestamp:
- 07/06/2020 08:42:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-rss.php
r47774 r48349 95 95 echo $args['before_title'] . $title . $args['after_title']; 96 96 } 97 98 $format = current_theme_supports( 'html5', 'navigation-widgets' ) ? 'html5' : 'xhtml'; 99 100 /** 101 * Filters the HTML format of widgets with navigation links. 102 * 103 * @since 5.5.0 104 * 105 * @param string $format The type of markup to use in widgets with navigation links. 106 * Accepts 'html5', 'xhtml'. 107 */ 108 $format = apply_filters( 'navigation_widgets_format', $format ); 109 110 if ( 'html5' === $format ) { 111 // The title may be filtered: Strip out HTML and make sure the aria-label is never empty. 112 $title = trim( strip_tags( $title ) ); 113 $aria_label = $title ? $title : __( 'RSS Feed' ); 114 echo '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">'; 115 } 116 97 117 wp_widget_rss_output( $rss, $instance ); 118 119 if ( 'html5' === $format ) { 120 echo '</nav>'; 121 } 122 98 123 echo $args['after_widget']; 99 124
Note: See TracChangeset
for help on using the changeset viewer.