Version User Scope of changes
May 5 2008, 7:57 PM EDT DevinCanterberry 115 words added, 152 words deleted
Apr 18 2008, 8:28 PM EDT ryan_wetpaint 1 word added, 1 word deleted

Changes

Key:  Additions   Deletions
The

boolean followingWPCAPI.onpagerename()
This method is calledoverloadable whenand ashould usernot renamesbe acalled page.directly.

Method Reference public static boolean onpagerename
()
This methodevent is calledfired 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. It should be overridden if additional behavior is required in order to rename this page (e.g: rename a page

Parameters
StringcellIDThe withinidentifier anfor externalthe CMS,cell checkbeing therenamed.Required
StringtitleThe new title against a blacklist, etc). If asynchronous operationsof arethe performedcell.Required
StringmessageThe duringedit thisnote method,entered thenby returnthe nulluser.Defaults to defer""
Returns processingtrue untilif the asynchronous operationsrenaming haveis completed.allowed, Callfalse otherwise.

onpagerename_CallbackUsage: with a boolean parameter corresponding to this method's return value when processing

Asynchronous
if( shouldwindow.WPCAPI continue.) A{
WPCAPI.onpagerename second= parameterfunction( containingcellID, atitle, failure message may also be passed) if{

var denyingparams the= action. Parameters:'?'
cellID+ String"cellID=" The identifier for the cell on the page to be+ renamed.encodeURIComponent(cellID)
title+ String"&title=" The new+ titleencodeURIComponent(title)
+ for"&message=" the+ page.encodeURIComponent(message);
message String
The

var reasonrequest provided= bynew theXMLHttpRequest();
request.open( user"/path/to/renamePage", for"PUT" renaming);
request.onreadystatechange the= page.function() Returns:{

true to allowif( therequest.readyState page== rename4 action.)
false
to deny
WPCAPI.onpagerename_Callback( therequest.status page== rename200 action.);
null
to defer processing until
};
request.send(params);

onpagerename_Callbackreturn is called.null;

};
}