Version User Scope of changes
May 21 2008, 5:19 PM EDT DevinCanterberry 4 words added, 2 words deleted
May 8 2008, 12:46 PM EDT ryan_wetpaint

Changes

Key:  Additions   Deletions

boolean WPCAPI.onpagerestore()
This method is overloadable and should not be called directly.

This event is fired whenever a user attempts to restore a deleted page, but before the page is allowed to be restored. By default, this method simply allows the restoration to occur.

Parameters
StringcellIDThe identifier for the cell being restored.Required
StringmessageThe edit note entered by the user.Defaults to ""
Returns true if the restoration is allowed, false otherwise.

Usage:

Asynchronous
if( window.WPCAPI ) {
WPCAPI.onpagerestore = function( cellID, message ) {

var params ="cellID="
+ encodeURIComponent(cellID)
+ "&message=" + encodeURIComponent(message);

var request = new XMLHttpRequest();
request.open( "/path/to/restorePage""POST", "POST""
/path/to/restorePage" );
request.onreadystatechange = function() {

if( request.readyState == 4 )
WPCAPI.onpagerestore_Callback( request.status == 200 );
};
request.send(params);

return null;

};
}