Version User Scope of changes
Oct 29 2008, 2:06 PM EDT (current) superwomyn 1 word added, 1 word deleted
Jun 2 2008, 7:34 PM EDT DevinCanterberry 2 words added

Changes

Key:  Additions   Deletions

boolean WPCAPI.onpagerename()
This method is overloadableoverridable and should not be called directly.

This event is fired whenever a user attempts to rename a page, but before the page is allowed to be renamed. By default, this method simply allows the renaming to occur.

Parameters
StringcellIDThe identifier for the cell being renamed.Required
StringtitleThe new title of the cell.Required
StringmessageThe edit note entered by the user.Defaults to ""
Returns true if the renaming is allowed, false otherwise.

Usage:

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

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

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

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

return null;

};
}