Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.php |
— | — | @@ -22,6 +22,19 @@ |
23 | 23 | // Set this to true to simply override the stock toolbar for everyone |
24 | 24 | $wgUsabilityInitiativeCoesxistWithMvEmbed = false; |
25 | 25 | |
| 26 | +// Configures which modules should be enabled |
| 27 | +if ( |
| 28 | + !isset( $wgUsabilityInitiativeModules ) || |
| 29 | + !is_array( $wgUsabilityInitiativeModules ) |
| 30 | +) { |
| 31 | + $wgUsabilityInitiativeModules = array( |
| 32 | + 'EditToolbar', |
| 33 | + 'EditWarning', |
| 34 | + 'PrefStats', |
| 35 | + 'OptIn' |
| 36 | + ); |
| 37 | +} |
| 38 | + |
26 | 39 | /* Setup */ |
27 | 40 | |
28 | 41 | // Sets Credits |
— | — | @@ -42,11 +55,10 @@ |
43 | 56 | $wgExtensionMessagesFiles['UsabilityInitiative'] = |
44 | 57 | dirname( __FILE__ ) . "/UsabilityInitiative.i18n.php"; |
45 | 58 | |
46 | | -// Includes sub-extensions |
47 | | -require_once( dirname( __FILE__ ) . "/EditToolbar/EditToolbar.php" ); |
48 | | -require_once( dirname( __FILE__ ) . "/EditWarning/EditWarning.php" ); |
49 | | -require_once( dirname( __FILE__ ) . "/PrefStats/PrefStats.php" ); |
50 | | -require_once( dirname( __FILE__ ) . "/OptIn/OptIn.php" ); |
| 59 | +// Includes modules |
| 60 | +foreach ( $wgUsabilityInitiativeModules as $module ) { |
| 61 | + require_once( dirname( __FILE__ ) . "/{$module}/{$module}.php" ); |
| 62 | +} |
51 | 63 | |
52 | 64 | // Registers Hooks |
53 | 65 | $wgHooks['AjaxAddScript'][] = 'UsabilityInitiativeHooks::addJs'; |