File tree Expand file tree Collapse file tree
tests/phpunit/tests/rest-api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,14 +87,15 @@ public function widget( $args, $instance ) {
8787 $ title = apply_filters ( 'widget_title ' , $ title , $ instance , $ this ->id_base );
8888
8989 if ( $ title ) {
90- $ feed_link = '' ;
9190 $ feed_url = strip_tags ( $ url );
9291 $ feed_icon = includes_url ( 'images/rss.png ' );
92+
9393 $ feed_link = sprintf (
9494 '<a class="rsswidget rss-widget-feed" href="%1$s"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="%2$s" alt="%3$s"%4$s /></a> ' ,
9595 esc_url ( $ feed_url ),
9696 esc_url ( $ feed_icon ),
97- esc_attr__ ( 'RSS ' ),
97+ /* translators: %s: RSS feed title. */
98+ esc_attr ( sprintf ( __ ( 'RSS feed: %s ' ), wp_strip_all_tags ( $ title ) ) ),
9899 ( wp_lazy_loading_enabled ( 'img ' , 'rss_widget_feed_icon ' ) ? ' loading="lazy" ' : '' )
99100 );
100101
Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ public function test_get_items() {
412412 'id ' => 'rss-1 ' ,
413413 'id_base ' => 'rss ' ,
414414 'sidebar ' => 'sidebar-1 ' ,
415- 'rendered ' => '<a class="rsswidget rss-widget-feed" href="https://wordpress.org/news/feed"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="http:// ' . WP_TESTS_DOMAIN . '/wp-includes/images/rss.png" alt="RSS" loading="lazy" /></a> <a class="rsswidget rss-widget-title" href="https://wordpress.org/news">RSS test</a><ul><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/introducing-learn-wordpress/ \'>Introducing Learn WordPress</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/simone/ \'>WordPress 5.6 “Simone”</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/state-of-the-word-2020/ \'>State of the Word 2020</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/the-month-in-wordpress-november-2020/ \'>The Month in WordPress: November 2020</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/wordpress-5-6-release-candidate-2/ \'>WordPress 5.6 Release Candidate 2</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/wordpress-5-6-release-candidate/ \'>WordPress 5.6 Release Candidate</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/wordpress-5-6-beta-4/ \'>WordPress 5.6 Beta 4</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/wordpress-5-6-beta-3/ \'>WordPress 5.6 Beta 3</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/the-month-in-wordpress-october-2020/ \'>The Month in WordPress: October 2020</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/10/wordpress-5-5-3-maintenance-release/ \'>WordPress 5.5.3 Maintenance Release</a></li></ul> ' ,
415+ 'rendered ' => '<a class="rsswidget rss-widget-feed" href="https://wordpress.org/news/feed"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="http:// ' . WP_TESTS_DOMAIN . '/wp-includes/images/rss.png" alt="RSS feed: RSS test" loading="lazy" /></a> <a class="rsswidget rss-widget-title" href="https://wordpress.org/news">RSS test</a><ul><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/introducing-learn-wordpress/ \'>Introducing Learn WordPress</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/simone/ \'>WordPress 5.6 “Simone”</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/state-of-the-word-2020/ \'>State of the Word 2020</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/the-month-in-wordpress-november-2020/ \'>The Month in WordPress: November 2020</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/12/wordpress-5-6-release-candidate-2/ \'>WordPress 5.6 Release Candidate 2</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/wordpress-5-6-release-candidate/ \'>WordPress 5.6 Release Candidate</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/wordpress-5-6-beta-4/ \'>WordPress 5.6 Beta 4</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/wordpress-5-6-beta-3/ \'>WordPress 5.6 Beta 3</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/11/the-month-in-wordpress-october-2020/ \'>The Month in WordPress: October 2020</a></li><li><a class= \'rsswidget \' href= \'https://wordpress.org/news/2020/10/wordpress-5-5-3-maintenance-release/ \'>WordPress 5.5.3 Maintenance Release</a></li></ul> ' ,
416416 ),
417417 array (
418418 'id ' => 'testwidget ' ,
You can’t perform that action at this time.
0 commit comments