Jump to navigation Jump to search
This page is a translated version of the page Manual:WikitextContent.php and the translation is 25% complete.

Other languages:
English • ‎dansk • ‎español • ‎日本語

WikitextContent.php contains the Content object for wiki text pages.


This will edit a page called 'Foo' with the content 'Hello world' and summary 'Greetings' by the user 'WorldGreeter'.

$user = User::newSystemUser( 'WorldGreeter', [ 'steal' => true ] );
$page = WikiPage::factory( 'Foo' );
$content = new WikitextContent( 'Hello world' );
$success = $page->doEditContent ( $content, 'Greetings', 0, false, $user );