be installed and running for any such queues to work.
* $wgAutopromoteOnce no longer supports the 'view' event. For keeping some
compatibility, any 'view' event triggers will still trigger on 'edit'.
+* $wgExtensionDirectory was added for when your extensions directory is somewhere
+ other than $IP/extensions (as $wgStyleDirectory does with the skins directory).
=== New features in 1.25 ===
* (T64861) Updated plural rules to CLDR 26. Includes incompatible changes
*/
$wgExtensionAssetsPath = false;
+/**
+ * Filesystem extensions directory.
+ * Defaults to "{$IP}/extensions".
+ * @since 1.25
+ */
+$wgExtensionDirectory = "{$IP}/extensions";
+
/**
* Filesystem stylesheets directory.
* Defaults to "{$IP}/skins".
* @since 1.3
*/
-$wgStyleDirectory = false;
+$wgStyleDirectory = "{$IP}/skins";
/**
* The URL path for primary article page views. This path should contain $1,
* This queues an extension to be loaded through
* the ExtensionRegistry system.
*
- * @param string $name Name of the extension to load
+ * @param string $ext Name of the extension to load
* @param string|null $path Absolute path of where to find the extension.json file
*/
-function wfLoadExtension( $name, $path = null ) {
+function wfLoadExtension( $ext, $path = null ) {
if ( !$path ) {
- global $IP;
- $path = "$IP/extensions/$name/extension.json";
+ global $wgExtensionDirectory;
+ $path = "$wgExtensionDirectory/$ext/extension.json";
}
ExtensionRegistry::getInstance()->queue( $path );
}
* @param string[] $exts Array of extension names to load
*/
function wfLoadExtensions( array $exts ) {
- global $IP;
+ global $wgExtensionDirectory;
$registry = ExtensionRegistry::getInstance();
foreach ( $exts as $ext ) {
- $registry->queue( "$IP/extensions/$ext/extension.json" );
+ $registry->queue( "$wgExtensionDirectory/$ext/extension.json" );
}
}
* Load a skin
*
* @see wfLoadExtension
- * @param string $name Name of the extension to load
+ * @param string $skin Name of the extension to load
* @param string|null $path Absolute path of where to find the skin.json file
*/
-function wfLoadSkin( $name, $path = null ) {
+function wfLoadSkin( $skin, $path = null ) {
if ( !$path ) {
- global $IP;
- $path = "$IP/skins/$name/skin.json";
+ global $wgStyleDirectory;
+ $path = "$wgStyleDirectory/$skin/skin.json";
}
ExtensionRegistry::getInstance()->queue( $path );
}
* @param string[] $skins Array of extension names to load
*/
function wfLoadSkins( array $skins ) {
- global $IP;
+ global $wgStyleDirectory;
$registry = ExtensionRegistry::getInstance();
foreach ( $skins as $skin ) {
- $registry->queue( "$IP/skins/$skin/skin.json" );
+ $registry->queue( "$wgStyleDirectory/$skin/skin.json" );
}
}