Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/177589
Change subject: Prevent Google indexing of the SiteNotice div ...................................................................... Prevent Google indexing of the SiteNotice div Site notice and CentralNotice should be omitted from search snippets. We're diluting page content. Change-Id: I95473e22de83e585044a4f917bbd1b00db7db71b --- M includes/skins/Skin.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/177589/1 diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 5604bc2..40318c0 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1559,6 +1559,11 @@ } wfRunHooks( 'SiteNoticeAfter', array( &$siteNotice, $this ) ); + + // Prevent Google from indexing announcements, cos this dilutes + // content results. + $siteNotice = "<!--googleoff: all-->{$siteNotice}<!--googleon: all-->"; + wfProfileOut( __METHOD__ ); return $siteNotice; } -- To view, visit https://gerrit.wikimedia.org/r/177589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95473e22de83e585044a4f917bbd1b00db7db71b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits