Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -110,8 +110,15 @@ class Crawl_Cleanup_Basic implements Integration_Interface {
*/
public function resource_hints_plain_cleanup( $hints ) {
foreach ( $hints as $key => $hint ) {
if ( \strpos( $hint, '//s.w.org' ) !== false ) {
unset( $hints[ $key ] );
if ( \is_array( $hint ) && isset( $hint['href'] ) ) {
if ( \strpos( $hint['href'], '//s.w.org' ) !== false ) {
unset( $hints[ $key ] );
}
}
else {
if ( \strpos( $hint, '//s.w.org' ) !== false ) {
unset( $hints[ $key ] );
}
}
}

View File

@@ -182,13 +182,13 @@ class RSS_Footer_Embed implements Integration_Interface {
protected function get_link_template() {
/**
* Filter: 'nofollow_rss_links' - Allow the developer to determine whether or not to follow the links in
* the bits Yoast SEO adds to the RSS feed, defaults to true.
* the bits Yoast SEO adds to the RSS feed, defaults to false.
*
* @api bool $unsigned Whether or not to follow the links in RSS feed, defaults to true.
*
* @since 1.4.20
*/
if ( \apply_filters( 'nofollow_rss_links', true ) ) {
if ( \apply_filters( 'nofollow_rss_links', false ) ) {
return '<a rel="nofollow" href="%1$s">%2$s</a>';
}