/// 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;
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 );
- }
- }
-
/**
* Add a new \<link\> tag to the page header.
*
* Actually output something with print.
*
* @param string $ins the string to output
- * @deprecated since 1.20 Use echo yourself.
+ * @deprecated since 1.22 Use echo yourself.
*/
public function out( $ins ) {
wfDeprecated( __METHOD__, '1.22' );
// The spec recommends defining XHTML5's charset using the XML declaration
// instead of meta.
// Our XML declaration is output by Html::htmlHeader.
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-meta-http-equiv-content-type
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset
+ // http://www.whatwg.org/html/semantics.html#attr-meta-http-equiv-content-type
+ // http://www.whatwg.org/html/semantics.html#charset
$ret .= Html::element( 'meta', array( 'charset' => 'UTF-8' ) );
}
) );
}
- 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 )
- )
- ) );
- }
-
foreach ( $this->mMetatags as $tag ) {
if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) {
$a = 'http-equiv';
* this stylesheet
*/
public static function transformCssMedia( $media ) {
- global $wgRequest, $wgHandheldForIPhone;
+ global $wgRequest;
// http://www.w3.org/TR/css3-mediaqueries/#syntax
$screenMediaQueryRegex = '/^(?:only\s+)?screen\b/i';
}
}
- // Expand longer media queries as iPhone doesn't grok 'handheld'
- if ( $wgHandheldForIPhone ) {
- $mediaAliases = array(
- 'screen' => 'screen and (min-device-width: 481px)',
- 'handheld' => 'handheld, only screen and (max-device-width: 480px)',
- );
-
- if ( isset( $mediaAliases[$media] ) ) {
- $media = $mediaAliases[$media];
- }
- }
-
return $media;
}