MediaWiki  1.23.2
styleTest.css.php
Go to the documentation of this file.
1 <?php
25 header( 'Content-Type: text/css; charset=utf-8' );
26 
35 function cssfilter( $val ) {
36  return preg_replace( '/[^A-Za-z0-9\.\- #]/', '', $val );
37 }
38 
39 // Do basic sanitization
40 $params = array_map( 'cssfilter', $_GET );
41 
42 // Defaults
43 $selector = isset( $params['selector'] ) ? $params['selector'] : '.mw-test-example';
44 $property = isset( $params['prop'] ) ? $params['prop'] : 'float';
45 $value = isset( $params['val'] ) ? $params['val'] : 'right';
46 $wait = isset( $params['wait'] ) ? (int)$params['wait'] : 0; // seconds
47 
48 sleep( $wait );
49 
50 $css = "
56 $selector {
57  $property: $value;
58 }
59 ";
60 
61 echo trim( $css ) . "\n";
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
$params
$params
Definition: styleTest.css.php:40
$css
$css
Definition: styleTest.css.php:50
$property
$property
Definition: styleTest.css.php:44
$selector
$selector
Definition: styleTest.css.php:43
$value
$value
Definition: styleTest.css.php:45
cssfilter
cssfilter( $val)
Allows characters in ranges [a-z], [A-Z] and [0-9], in addition to a dot ("."), dash ("-"),...
Definition: styleTest.css.php:35
$wait
$wait
Definition: styleTest.css.php:46