* Remove entries from redirect table on article deletion
* (bug 7788) Force section headers in new section links for users who have
'prompt for blank edit summaries' on.
+* (bug 7723) Add ic: parser function, with alias tc:, which capitalises the first
+ letter of each word.
== Languages updated ==
return $wgContLang->uc( $s );
}
+ static function ic( $parser, $s = '' ) {
+ /*Testing showed that ucwords does NOT convert the rest of the words to lowercase
+ * Converting it all to lowercase first fixes this. */
+ $s = strtolower($s);
+ return ucwords($s);
+ }
+
static function localurl( $parser, $s = '', $arg = null ) { return self::urlFunction( 'getLocalURL', $s, $arg ); }
static function localurle( $parser, $s = '', $arg = null ) { return self::urlFunction( 'escapeLocalURL', $s, $arg ); }
static function fullurl( $parser, $s = '', $arg = null ) { return self::urlFunction( 'getFullURL', $s, $arg ); }
$this->setFunctionHook( 'padright', array( 'CoreParserFunctions', 'padright' ), SFH_NO_HASH );
$this->setFunctionHook( 'anchorencode', array( 'CoreParserFunctions', 'anchorencode' ), SFH_NO_HASH );
$this->setFunctionHook( 'special', array( 'CoreParserFunctions', 'special' ) );
+ $this->setFunctionHook( 'ic', array( 'CoreParserFunctions', 'ic' ), SFH_NO_HASH );
if ( $wgAllowDisplayTitle ) {
$this->setFunctionHook( 'displaytitle', array( 'CoreParserFunctions', 'displaytitle' ), SFH_NO_HASH );
'newsectionlink' => array( 1, '__NEWSECTIONLINK__' ),
'currentversion' => array( 1, 'CURRENTVERSION' ),
'urlencode' => array( 0, 'URLENCODE:' ),
- 'anchorencode' => array( 0, 'ANCHORENCODE' ),
+ 'anchorencode' => array( 0, 'ANCHORENCODE' ),
'currenttimestamp' => array( 1, 'CURRENTTIMESTAMP' ),
'localtimestamp' => array( 1, 'LOCALTIMESTAMP' ),
'directionmark' => array( 1, 'DIRECTIONMARK', 'DIRMARK' ),
'padleft' => array( 0, 'PADLEFT' ),
'padright' => array( 0, 'PADRIGHT' ),
'special' => array( 0, 'special', ),
+ 'ic' => array( 0, 'ic:', 'tc:' ),
);
/**