Changeset 9470
- Timestamp:
- 02/05/2020 05:43:15 AM (5 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r9187 r9470 46 46 add_filter( 'query_vars', array( $this, 'filter_query_vars' ) ); 47 47 add_filter( 'single_term_title', array( $this, 'filter_single_term_title' ) ); 48 add_filter( 'the_content', array( $this, 'filter_rel_nofollow ' ) );48 add_filter( 'the_content', array( $this, 'filter_rel_nofollow_ugc' ) ); 49 49 add_action( 'wp_head', array( Template::class, 'json_ld_schema' ), 1 ); 50 50 add_action( 'wp_head', array( Template::class, 'output_meta' ), 1 ); … … 704 704 705 705 /** 706 * Filter content to make links rel= nofollowon plugin pages only706 * Filter content to make links rel="nofollow ugc" on plugin pages only 707 707 * 708 708 * @param string $content The content. 709 709 * @return string 710 710 */ 711 public function filter_rel_nofollow ( $content ) {711 public function filter_rel_nofollow_ugc( $content ) { 712 712 if ( get_post_type() == 'plugin' ) { 713 // regex copied from wp_rel_nofollow(). Not calling that function because it messes with slashes. 714 $content = preg_replace_callback( '|<a (.+?)>|i', 'wp_rel_nofollow_callback', $content ); 715 } 713 // regex copied from wp_rel_ugc(). Not calling that function because it messes with slashes. 714 $content = preg_replace_callback( 715 '|<a (.+?)>|i', 716 function( $matches ) { 717 return wp_rel_callback( $matches, 'nofollow ugc' ); 718 }, 719 $content 720 ); 721 } 722 716 723 return $content; 717 724 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-donate.php
r4223 r9470 37 37 <p class="aside"><?php _e( 'Would you like to support the advancement of this plugin?', 'wporg-plugins' ); ?></p> 38 38 <p> 39 <a class="button button-secondary" href="<?php echo esc_url( $donate_link ); ?>" rel="nofollow ">39 <a class="button button-secondary" href="<?php echo esc_url( $donate_link ); ?>" rel="nofollow ugc"> 40 40 <?php _e( 'Donate to this plugin', 'wporg-plugins' ); ?> 41 41 </a>
Note: See TracChangeset
for help on using the changeset viewer.