Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #52224, comment 14


Ignore:
Timestamp:
11/03/2021 08:52:56 PM (5 years ago)
Author:
sabernhardt

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #52224, comment 14

    v2 v3  
    17173. View source code and record the updated markup for the widget title (h2 heading). It should have an `rss-widget-feed` class added to the first link and `rss-widget-title` on the second link. In some languages, the `alt` text could be something other than "RSS" now. If lazy loading is enabled, the `loading="lazy"` attribute should be included in the image markup.
    18184. Also check the widget editor for error messages. (To see errors, you may need `WP_DEBUG` to be true in wp-config.php.)
    19 5. **For testing 52224.4-filter.diff**, skip ahead to [#Verifysiteappearancedoesnotchangewhenremovinganiconlink "Verify site appearance does not change" section]. ~~Verify that the existing RSS widget's settings include a new "Display feed icon?" option and that this option is checked by default.~~
     195. **For testing 52224.4-filter.diff**, skip ahead to the [#Testthefilter "Test the filter" section]. ~~Verify that the existing RSS widget's settings include a new "Display feed icon?" option and that this option is checked by default.~~
    2020
    2121=== Create another legacy widget
    … …  
    37377. Uncheck the new feed icon checkbox and verify that the feed link is removed on the front end. The text link should appear the same as it was before removing the icon.
    3838
     39=== Test the filter
     40
     411. Activate Twenty Twenty-One theme.
     422. Apply [https://core.trac.wordpress.org/raw-attachment/ticket/52880/52880.filter.patch 52880.filter.patch]. (Do not revert the other patch.)
     433. Go to Appearance > Widgets to make sure an RSS widget is in the desired sidebar area.
     444. ~~Verify that the "Display feed icon?" option is **not** available.~~
     455. Visit the site, and view source code to verify that the feed link is not included in the widget heading. The text link should have the `rss-widget-title` class.
     466. Activate another theme.
     477. Use the same filter in a custom plugin (or child theme): \\ {{{ add_filter( 'rss_widget_feed_link', '__return_false' ); }}}
     488. Again, check that the widget is in the desired sidebar area, verify that the option is not available, and check that the icon link is removed from the source code.
     499. If you would like, try creating a custom filter to ''change'' the output instead of removing it entirely. I'll upload a child theme with two custom filter functions that I tested, but the main purpose of the `rss_widget_feed_link` filter is to remove the link.
     50
    3951=== Verify site appearance does not change when removing an icon link
    4052
    … …  
    46586. Go to Appearance > Widgets to make sure an RSS widget is in the desired sidebar area.
    47597. View the site and refresh the browser (clearing cache).
    48 8. Verify that the widget title text link displays, either with or without the icon link checkbox checked. Even when the checkbox is checked, the icon is hidden with CSS.
     608. Verify that the widget title text link displays, either with or without the icon link **in the markup**. Even when the icon is there, it is hidden with CSS.
    49619. Continue checking other themes, as desired.
    50 
    51 === Test the filter
    52 
    53 1. Activate Twenty Twenty-One theme.
    54 2. Apply [https://core.trac.wordpress.org/raw-attachment/ticket/52880/52880.filter.patch 52880.filter.patch]. (Do not revert the other patch.)
    55 3. Go to Appearance > Widgets to make sure an RSS widget is in the desired sidebar area.
    56 4. Verify that the "Display feed icon?" option is **not** available.
    57 5. Visit the site, and view source code to verify that the feed link is not included in the widget heading. The text link should have the `rss-widget-title` class.
    58 6. Activate another theme.
    59 7. Use the same filter in a custom plugin (or child theme): \\ {{{ add_filter( 'rss_widget_feed_link', '__return_false' ); }}}
    60 8. Again, check that the widget is in the desired sidebar area, verify that the option is not available, and check that the icon link is removed from the source code.
    61 9. If you would like, try creating a custom filter to ''change'' the output instead of removing it entirely. I'll upload a child theme with two custom filter functions that I tested, but the main purpose of the `rss_widget_feed_link` filter is to remove the link.