Changes

Key:  Additions   Deletions

void WPCAPI.showAddPageDialog()
This utility method launches the Add Page dialog.

Parameters
StringparentIDThe parent cell ID for the newly created page.Required
String
DOMElement
dialogTitleThe title to use for the Add Page dialog. If the value is a DOMElement, then this method will first try to use its title attribute. If no title attribute exists, then the element's innerHTML will be used.Defaults to "Add Page"
StringparentTitleThe title of the parent cell; required if the parent cell does not yet exist, otherwise ignored.Defaults to current page title
StringparentURLThe URL of the parent cell; required if the parent cell does not yet exist, otherwise ignored.Defaults to current page URL

Usage


Minimal
if( window.WPCAPI ) WPCAPI.showAddPageDialog("Uncategorized");

Minimal (with custom title)
if( window.WPCAPI )WPCAPI.showAddPageDialog( "Uncategorized", "Contribute to " + document.title );

Strict
if( window.WPCAPI ) WPCAPI.showAddPageDialog( getCurrentPageID(), null, document.title, location.href );

Embedded HTML
<a href="#addPage" onclick="WPCAPI.showAddPageDialog( getCurrentPageID(), this, document.title, location.href ); return false;">Add a page</a>