WPCAPI.onpagerestoreThis is a featured page


boolean WPCAPI.onpagerestore()
This method is overridable 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( "POST", "
/path/to/restorePage" );
request.onreadystatechange = function() {

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

return null;

};
}




superwomyn
superwomyn
Latest page update: made by superwomyn , Oct 29 2008, 2:07 PM EDT (about this update About This Update superwomyn Changing overload to override. - superwomyn

1 word added
1 word deleted

view changes

- complete history)
Keyword tags: restore page undelete page
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.