MediaWiki REL1_34
ReplaceText.php
Go to the documentation of this file.
1<?php
20if ( function_exists( 'wfLoadExtension' ) ) {
21 wfLoadExtension( 'ReplaceText' );
22 // Keep i18n globals so mergeMessageFileList.php doesn't break
23 $wgMessagesDirs['ReplaceText'] = __DIR__ . '/i18n';
24 $wgExtensionMessagesFiles['ReplaceTextAlias'] = __DIR__ . '/ReplaceText.i18n.alias.php';
25 wfWarn(
26 'Deprecated PHP entry point used for Replace Text extension. ' .
27 'Please use wfLoadExtension instead, ' .
28 'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
29 );
30 return;
31}
32
33if ( !defined( 'MEDIAWIKI' ) ) {
34 die();
35}
36
37define( 'REPLACE_TEXT_VERSION', '1.4.1' );
38
39// credits
40$wgExtensionCredits['specialpage'][] = [
41 'path' => __FILE__,
42 'name' => 'Replace Text',
43 'version' => REPLACE_TEXT_VERSION,
44 'author' => [ 'Yaron Koren', 'Niklas Laxström', '...' ],
45 'url' => 'https://www.mediawiki.org/wiki/Extension:Replace_Text',
46 'descriptionmsg' => 'replacetext-desc',
47 'license-name' => 'GPL-2.0-or-later'
48];
49
50$wgMessagesDirs['ReplaceText'] = __DIR__ . '/i18n';
51$wgExtensionMessagesFiles['ReplaceTextAlias'] = __DIR__ . '/ReplaceText.i18n.alias.php';
52$wgJobClasses['replaceText'] = 'ReplaceTextJob';
53
54// This extension uses its own permission type, 'replacetext'
55$wgAvailableRights[] = 'replacetext';
56$wgGroupPermissions['sysop']['replacetext'] = true;
57
58$wgHooks['AdminLinks'][] = 'ReplaceTextHooks::addToAdminLinks';
59
60$wgSpecialPages['ReplaceText'] = 'SpecialReplaceText';
61$wgAutoloadClasses['ReplaceTextHooks'] = __DIR__ . '/src/ReplaceTextHooks.php';
62$wgAutoloadClasses['SpecialReplaceText'] = __DIR__ . '/src/SpecialReplaceText.php';
63$wgAutoloadClasses['ReplaceTextJob'] = __DIR__ . '/src/ReplaceTextJob.php';
64$wgAutoloadClasses['ReplaceTextSearch'] = __DIR__ . '/src/ReplaceTextSearch.php';
65
66$wgResourceModules['ext.ReplaceText'] = [
67 'scripts' => 'ext.ReplaceText.js',
68 'localBasePath' => 'resources',
69 'remoteExtPath' => 'ReplaceText/resources',
70];
71
72// Global variables
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
wfLoadExtension( $ext, $path=null)
Load an extension.
$wgReplaceTextUser
$wgGroupPermissions['sysop']['replacetext']
$wgAutoloadClasses['ReplaceTextHooks']
$wgSpecialPages['ReplaceText']
$wgJobClasses['replaceText']
$wgExtensionMessagesFiles['ReplaceTextAlias']
$wgMessagesDirs['ReplaceText']
$wgAvailableRights[]
$wgHooks['AdminLinks'][]
$wgResourceModules['ext.ReplaceText']
$wgExtensionCredits['specialpage'][]
const REPLACE_TEXT_VERSION(!defined( 'MEDIAWIKI'))
Replace Text - a MediaWiki extension that provides a special page to allow administrators to do a glo...