Follow-up r88740: forgot to commit this guy
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 24 May 2011 19:52:27 +0000 (19:52 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 24 May 2011 19:52:27 +0000 (19:52 +0000)
includes/parser/Parser.php

index b0f8235..47151ab 100644 (file)
@@ -4529,6 +4529,22 @@ class Parser {
                $this->mStripList = $this->mDefaultStripList;
        }
 
+       /**
+        * Remove a specific tag hook. Should not be called on $wgParser.
+        *
+        * @param string $tag
+        * @return void
+        */
+       function clearTagHook( $tag ) {
+               if ( isset( $this->mTagHooks[$tag] ) ) {
+                       unset( $this->mTagHooks[$tag] );
+                       $key = array_search( $tag, $this->mStripList );
+                       if ( $key !== false ) {
+                               unset( $this->mStripList[$key] );
+                       }
+               }
+       }
+
        /**
         * Create a function, e.g. {{sum:1|2|3}}
         * The callback function should have the form: