blob: abcc3ed55747886c9e5f3585b593d24e1cbbf67a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* eslint-disable no-var */
/* global wp, calypsoifyGutenberg */
jQuery( function( $ ) {
if ( wp && wp.data && wp.data.select && ! wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) ) {
wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' );
}
var editPostHeaderInception = setInterval( function() {
var $closeButton = $( '.edit-post-fullscreen-mode-close__toolbar a' );
if ( $closeButton.length < 1 ) {
return;
}
clearInterval( editPostHeaderInception );
$closeButton.attr( 'href', calypsoifyGutenberg.closeUrl );
} );
$( 'body.revision-php a' ).each( function() {
var href = $( this ).attr( 'href' );
$( this ).attr( 'href', href.replace( '&classic-editor', '' ) );
} );
} );
|