"capitallinkoverride": {
"type": "boolean",
"description": "Set $wgCapitalLinks on a per-namespace basis"
+ },
+ "conditional": {
+ "type": "boolean",
+ "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)",
+ "default": false
}
},
"required": ["id", "constant", "name"]
"capitallinkoverride": {
"type": "boolean",
"description": "Set $wgCapitalLinks on a per-namespace basis"
+ },
+ "conditional": {
+ "type": "boolean",
+ "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)",
+ "default": false
}
},
"required": ["id", "constant", "name"]
foreach ( $info['namespaces'] as $ns ) {
$id = $ns['id'];
$this->defines[$ns['constant']] = $id;
- $this->attributes['ExtensionNamespaces'][$id] = $ns['name'];
+ if ( !( isset( $ns['conditional'] ) && $ns['conditional'] ) ) {
+ // If it is not conditional, register it
+ $this->attributes['ExtensionNamespaces'][$id] = $ns['name'];
+ }
if ( isset( $ns['gender'] ) ) {
$this->globals['wgExtraGenderNamespaces'][$id] = $ns['gender'];
}