Deprecated in 1.24, for reasons explained in
a0c41ae39d. I don't see any
usage in core or extensions.
Change-Id: I46f9e04ae633e7ff1ee112b652e1865731172f1f
MediaWiki 1.26, in where ResourceLoader became fully asynchronous.
* $wgMasterWaitTimeout was removed (deprecated in 1.24).
* Fields in ParserOptions are now private. Use the accessors instead.
+* Custom LESS functions (defined via $wgResourceLoaderLESSFunctions)
+ have been removed, after being deprecated in 1.24.
=== New features in 1.26 ===
* (T51506) Now action=info gives estimates of actual watchers for a page.
"type": "object",
"description": "ResourceLoader LESS variables"
},
- "ResourceLoaderLESSFunctions": {
- "type": "object",
- "description": "ResourceLoader LESS functions"
- },
"ResourceLoaderLESSImportPaths": {
"type": "object",
"description": "ResourceLoader import paths"
*/
$wgResourceLoaderLESSVars = array();
-/**
- * Custom LESS functions. An associative array mapping function name to PHP
- * callable.
- *
- * Changes to LESS functions do not trigger cache invalidation.
- *
- * @since 1.22
- * @deprecated since 1.24 Questionable usefulness and problematic to support,
- * will be removed in the future.
- */
-$wgResourceLoaderLESSFunctions = array();
-
/**
* Default import paths for LESS modules. LESS files referenced in @import
* statements will be looked up here first, and relative to the importing file
$less->setPreserveComments( true );
$less->setVariables( self::getLessVars( $config ) );
$less->setImportDir( $config->get( 'ResourceLoaderLESSImportPaths' ) );
- foreach ( $config->get( 'ResourceLoaderLESSFunctions' ) as $name => $func ) {
- $less->registerFunction( $name, $func );
- }
return $less;
}
.test-mixin (@value) {
color: @value;
border: @foo solid @Foo;
- line-height: test-sum(@bar, 10, 20);
}
.unit-tests {
color: green;
border: 2px solid #eeeeee;
- line-height: 35;
}
parent::setUp();
$this->setMwGlobals( array(
- 'wgResourceLoaderLESSFunctions' => array(
- 'test-sum' => function ( $frame, $less ) {
- $sum = 0;
- foreach ( $frame[2] as $arg ) {
- $sum += (int)$arg[1];
- }
- return $sum;
- },
- ),
'wgResourceLoaderLESSImportPaths' => array(
dirname( dirname( __DIR__ ) ) . '/data/less/common',
),