MediaWiki REL1_33
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
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
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...