Changeset 9603
- Timestamp:
- 03/18/2020 11:30:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r9489 r9603 38 38 add_filter( 'bbp_after_get_reply_author_link_parse_args', array( $this, 'get_author_link' ) ); 39 39 add_filter( 'bbp_after_get_author_link_parse_args', array( $this, 'get_author_link' ) ); 40 41 // Mark avatar images as being lazy-loadable. 42 add_filter( 'get_avatar', array( $this, 'avatar_lazy_load' ) ); 40 43 41 44 // remove nofollow filter from topic and reply author links, since those are wordpress.org profile urls, not user inputs … … 574 577 575 578 /** 579 * Change avatar `img` markup to indicate lazy loading of image. 580 */ 581 public function avatar_lazy_load( $markup ) { 582 return str_replace( '<img ', '<img loading="lazy" ', $markup ); 583 } 584 585 /** 576 586 * Removes oEmbed discovery links for bbPress' post types. 577 587 *
Note: See TracChangeset
for help on using the changeset viewer.