Allow revision Backbone classes to be used on pages other than `revision.php`.
Props ericlewis. Fixes #30221. git-svn-id: https://develop.svn.wordpress.org/trunk@30128 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
55613648fd
commit
c684779022
|
@ -1139,8 +1139,15 @@ window.wp = window.wp || {};
|
|||
}
|
||||
});
|
||||
|
||||
// Initialize the revisions UI.
|
||||
/**
|
||||
* Initialize the revisions UI for revision.php.
|
||||
*/
|
||||
revisions.init = function() {
|
||||
// Bail if the current page is not revision.php.
|
||||
if ( ! window.adminpage || 'revision-php' !== window.adminpage ) {
|
||||
return;
|
||||
}
|
||||
|
||||
revisions.view.frame = new revisions.view.Frame({
|
||||
model: new revisions.model.FrameState({}, {
|
||||
revisions: new revisions.model.Revisions( revisions.settings.revisionData )
|
||||
|
|
Loading…
Reference in New Issue