Brion VIBBER has submitted this change and it was merged.
Change subject: Kill <meta name="keywords" content="..."> in a blazing fire.
......................................................................
Kill <meta name="keywords" content="..."> in a blazing fire.
meta-keywords is completely and totally useless. It has absolutely no effect
on search engine and no-one uses it anymore. Time to euthanize it.
There isn't a single user of OutputPage::addKeywords inside any extension
inside of Gerrit. So I'm just deleting this method without a deprecation.
Change-Id: I188755521dcde3a9e191975d1ae3cabf7a5d67cd
---
M RELEASE-NOTES-1.22
M includes/OutputPage.php
2 files changed, 2 insertions(+), 31 deletions(-)
Approvals:
Brion VIBBER: Verified; Looks good to me, approved
diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index e32d484..1bdc9d9 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -209,6 +209,8 @@
* (bug 40785) mediawiki.legacy.ajax has been marked as deprecated. The
following
properties now emit mw.log.warn when accessed: sajax_debug,
sajax_init_object,
sajax_do_call and wfSupportsAjax.
+* BREAKING CHANGE: meta keywords are no longer supported. A <meta
name="keywords"
+ will no longer be output and OutputPage::addKeyword no longer exists.
== Compatibility ==
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 0849afd..45e91a0 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -39,9 +39,6 @@
/// Should be private. Used with addMeta() which adds "<meta>"
var $mMetatags = array();
- /// "<meta keywords='stuff'>" most of the time the first 10 links to an
article
- var $mKeywords = array();
-
var $mLinktags = array();
var $mCanonicalUrl = false;
@@ -311,19 +308,6 @@
*/
function addMeta( $name, $val ) {
array_push( $this->mMetatags, array( $name, $val ) );
- }
-
- /**
- * Add a keyword or a list of keywords in the page header
- *
- * @param string $text or array of strings
- */
- function addKeyword( $text ) {
- if ( is_array( $text ) ) {
- $this->mKeywords = array_merge( $this->mKeywords, $text
);
- } else {
- array_push( $this->mKeywords, $text );
- }
}
/**
@@ -3137,21 +3121,6 @@
$tags['meta-robots'] = Html::element( 'meta', array(
'name' => 'robots',
'content' => $p,
- ) );
- }
-
- if ( count( $this->mKeywords ) > 0 ) {
- $strip = array(
- "/<.*?" . ">/" => '',
- "/_/" => ' '
- );
- $tags['meta-keywords'] = Html::element( 'meta', array(
- 'name' => 'keywords',
- 'content' => preg_replace(
- array_keys( $strip ),
- array_values( $strip ),
- implode( ',', $this->mKeywords )
- )
) );
}
--
To view, visit https://gerrit.wikimedia.org/r/67606
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I188755521dcde3a9e191975d1ae3cabf7a5d67cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits