wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/config/Wikibase.example.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/**
 * Example configuration for the Wikibase extension.
 *
 * This file is NOT an entry point the Wikibase extension.
 * It should not be included from outside the extension.
 *
 * @see docs/options.wiki
 *
 * @license GPL-2.0-or-later
 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 */

if ( !defined( 'MEDIAWIKI' ) ) {
    die( 'Not an entry point.' );
}

call_user_func( function() {
    $baseNs = 120;

    // Define these constants immediately so they can be used in LocalSettings.php
    define( 'WB_NS_ITEM', $baseNs );
    define( 'WB_NS_ITEM_TALK', $baseNs + 1 );
    define( 'WB_NS_PROPERTY', $baseNs + 2 );
    define( 'WB_NS_PROPERTY_TALK', $baseNs + 3 );
} );

// Tell Wikibase to register these namespaces (later)
global $wgWBRepoSettings;
$wgWBRepoSettings['defaultEntityNamespaces'] = true;