for use with Microdata.
* The HTML5 <mark> tag has been whitelisted.
* Added ParserCloned hook for when the Parser object is cloned.
+* Added AlternateEditPreview hook to allow extensions to replace the page
+ preview from the edit page.
+* Added EditPage::showStandardInputs:options hook to allow extensions to add
+ new fields to the "editOptions" area of the edit form.
=== Bug fixes in 1.21 ===
* (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
on &action=edit.
$EditPage: the EditPage object
+'AlternateEditPreview': before generating the preview of the page when editing
+( EditPage::getPreviewText() ).
+$EditPage: the EditPage object
+&$content: the Content object for the text field from the edit page
+&$previewHTML: Text to be placed into the page for the preview
+&$parserOutput: the ParserOutput object for the preview
+return false and set $previewHTML and $parserOutput to output custom page
+preview HTML.
+
'AlternateUserMailer': Called before mail is sent so that mail could
be logged (or something else) instead of using PEAR or PHP's mail().
Return false to skip the regular method of sending mail. Return a
contents of $error to be echoed at the top of the edit form as wikitext.
Return true without altering $error to allow the edit to proceed.
+'EditPage::showStandardInputs:options': allows injection of form fields into
+the editOptions area
+$editor: EditPage instance (object)
+$out: an OutputPage instance to write to
+return value is ignored (should always be true)
+
'EditPageBeforeConflictDiff': allows modifying the EditPage object and output
when there's an edit conflict. Return false to halt normal diff output; in
this case you're responsible for computing and outputting the entire "conflict"
wfMessage( 'newwindow' )->parse();
$wgOut->addHTML( " <span class='cancelLink'>{$cancel}</span>\n" );
$wgOut->addHTML( " <span class='editHelp'>{$edithelp}</span>\n" );
- $wgOut->addHTML( "</div><!-- editButtons -->\n</div><!-- editOptions -->\n" );
+ $wgOut->addHTML( "</div><!-- editButtons -->\n" );
+ wfRunHooks( 'EditPage::showStandardInputs:options', array( $this, $wgOut, &$tabindex ) );
+ $wgOut->addHTML( "</div><!-- editOptions -->\n" );
}
/**
try {
$content = $this->toEditContent( $this->textbox1 );
+ $previewHTML = '';
+ if ( !wfRunHooks( 'AlternateEditPreview', array( $this, &$content, &$previewHTML, &$this->mParserOutput ) ) ) {
+ wfProfileOut( __METHOD__ );
+ return $previewHTML;
+ }
+
if ( $this->mTriedSave && !$this->mTokenOk ) {
if ( $this->mTokenOkExceptSuffix ) {
$note = wfMessage( 'token_suffix_mismatch' )->plain() ;