Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-admin/js
File: editor-expand.js
} else {
[500] Fix | Delete
$top = $textTop;
[501] Fix | Delete
$editor = $textEditor;
[502] Fix | Delete
topHeight = heights.textTopHeight;
[503] Fix | Delete
}
[504] Fix | Delete
[505] Fix | Delete
// Return if TinyMCE is still initializing.
[506] Fix | Delete
if ( ! visual && ! $top.length ) {
[507] Fix | Delete
return;
[508] Fix | Delete
}
[509] Fix | Delete
[510] Fix | Delete
topPos = $top.parent().offset().top;
[511] Fix | Delete
editorPos = $editor.offset().top;
[512] Fix | Delete
editorHeight = $editor.outerHeight();
[513] Fix | Delete
[514] Fix | Delete
/*
[515] Fix | Delete
* If in visual mode, checks if the editorHeight is greater than the autoresizeMinHeight + topHeight.
[516] Fix | Delete
* If not in visual mode, checks if the editorHeight is greater than the autoresizeMinHeight + 20.
[517] Fix | Delete
*/
[518] Fix | Delete
canPin = visual ? autoresizeMinHeight + topHeight : autoresizeMinHeight + 20; // 20px from textarea padding.
[519] Fix | Delete
canPin = editorHeight > ( canPin + 5 );
[520] Fix | Delete
[521] Fix | Delete
if ( ! canPin ) {
[522] Fix | Delete
if ( resize ) {
[523] Fix | Delete
$tools.css( {
[524] Fix | Delete
position: 'absolute',
[525] Fix | Delete
top: 0,
[526] Fix | Delete
width: contentWrapWidth
[527] Fix | Delete
} );
[528] Fix | Delete
[529] Fix | Delete
if ( visual && $menuBar.length ) {
[530] Fix | Delete
$menuBar.css( {
[531] Fix | Delete
position: 'absolute',
[532] Fix | Delete
top: 0,
[533] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 )
[534] Fix | Delete
} );
[535] Fix | Delete
}
[536] Fix | Delete
[537] Fix | Delete
$top.css( {
[538] Fix | Delete
position: 'absolute',
[539] Fix | Delete
top: heights.menuBarHeight,
[540] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
[541] Fix | Delete
} );
[542] Fix | Delete
[543] Fix | Delete
$statusBar.attr( 'style', advanced ? '' : 'visibility: hidden;' );
[544] Fix | Delete
$bottom.attr( 'style', '' );
[545] Fix | Delete
}
[546] Fix | Delete
} else {
[547] Fix | Delete
// Check if the top is not already in a fixed position.
[548] Fix | Delete
if ( ( ! fixedTop || resize ) &&
[549] Fix | Delete
( windowPos >= ( topPos - heights.toolsHeight - heights.adminBarHeight ) &&
[550] Fix | Delete
windowPos <= ( topPos - heights.toolsHeight - heights.adminBarHeight + editorHeight - buffer ) ) ) {
[551] Fix | Delete
fixedTop = true;
[552] Fix | Delete
[553] Fix | Delete
$tools.css( {
[554] Fix | Delete
position: 'fixed',
[555] Fix | Delete
top: heights.adminBarHeight,
[556] Fix | Delete
width: contentWrapWidth
[557] Fix | Delete
} );
[558] Fix | Delete
[559] Fix | Delete
if ( visual && $menuBar.length ) {
[560] Fix | Delete
$menuBar.css( {
[561] Fix | Delete
position: 'fixed',
[562] Fix | Delete
top: heights.adminBarHeight + heights.toolsHeight,
[563] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
[564] Fix | Delete
} );
[565] Fix | Delete
}
[566] Fix | Delete
[567] Fix | Delete
$top.css( {
[568] Fix | Delete
position: 'fixed',
[569] Fix | Delete
top: heights.adminBarHeight + heights.toolsHeight + heights.menuBarHeight,
[570] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
[571] Fix | Delete
} );
[572] Fix | Delete
// Check if the top is already in a fixed position.
[573] Fix | Delete
} else if ( fixedTop || resize ) {
[574] Fix | Delete
if ( windowPos <= ( topPos - heights.toolsHeight - heights.adminBarHeight ) ) {
[575] Fix | Delete
fixedTop = false;
[576] Fix | Delete
[577] Fix | Delete
$tools.css( {
[578] Fix | Delete
position: 'absolute',
[579] Fix | Delete
top: 0,
[580] Fix | Delete
width: contentWrapWidth
[581] Fix | Delete
} );
[582] Fix | Delete
[583] Fix | Delete
if ( visual && $menuBar.length ) {
[584] Fix | Delete
$menuBar.css( {
[585] Fix | Delete
position: 'absolute',
[586] Fix | Delete
top: 0,
[587] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 )
[588] Fix | Delete
} );
[589] Fix | Delete
}
[590] Fix | Delete
[591] Fix | Delete
$top.css( {
[592] Fix | Delete
position: 'absolute',
[593] Fix | Delete
top: heights.menuBarHeight,
[594] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
[595] Fix | Delete
} );
[596] Fix | Delete
} else if ( windowPos >= ( topPos - heights.toolsHeight - heights.adminBarHeight + editorHeight - buffer ) ) {
[597] Fix | Delete
fixedTop = false;
[598] Fix | Delete
[599] Fix | Delete
$tools.css( {
[600] Fix | Delete
position: 'absolute',
[601] Fix | Delete
top: editorHeight - buffer,
[602] Fix | Delete
width: contentWrapWidth
[603] Fix | Delete
} );
[604] Fix | Delete
[605] Fix | Delete
if ( visual && $menuBar.length ) {
[606] Fix | Delete
$menuBar.css( {
[607] Fix | Delete
position: 'absolute',
[608] Fix | Delete
top: editorHeight - buffer,
[609] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 )
[610] Fix | Delete
} );
[611] Fix | Delete
}
[612] Fix | Delete
[613] Fix | Delete
$top.css( {
[614] Fix | Delete
position: 'absolute',
[615] Fix | Delete
top: editorHeight - buffer + heights.menuBarHeight,
[616] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 ) - ( visual ? 0 : ( $top.outerWidth() - $top.width() ) )
[617] Fix | Delete
} );
[618] Fix | Delete
}
[619] Fix | Delete
}
[620] Fix | Delete
[621] Fix | Delete
// Check if the bottom is not already in a fixed position.
[622] Fix | Delete
if ( ( ! fixedBottom || ( resize && advanced ) ) &&
[623] Fix | Delete
// Add borderWidth for the border around the .wp-editor-container.
[624] Fix | Delete
( windowPos + heights.windowHeight ) <= ( editorPos + editorHeight + heights.bottomHeight + heights.statusBarHeight + borderWidth ) ) {
[625] Fix | Delete
[626] Fix | Delete
if ( event && event.deltaHeight > 0 && event.deltaHeight < 100 ) {
[627] Fix | Delete
window.scrollBy( 0, event.deltaHeight );
[628] Fix | Delete
} else if ( visual && advanced ) {
[629] Fix | Delete
fixedBottom = true;
[630] Fix | Delete
[631] Fix | Delete
$statusBar.css( {
[632] Fix | Delete
position: 'fixed',
[633] Fix | Delete
bottom: heights.bottomHeight,
[634] Fix | Delete
visibility: '',
[635] Fix | Delete
width: contentWrapWidth - ( borderWidth * 2 )
[636] Fix | Delete
} );
[637] Fix | Delete
[638] Fix | Delete
$bottom.css( {
[639] Fix | Delete
position: 'fixed',
[640] Fix | Delete
bottom: 0,
[641] Fix | Delete
width: contentWrapWidth
[642] Fix | Delete
} );
[643] Fix | Delete
}
[644] Fix | Delete
} else if ( ( ! advanced && fixedBottom ) ||
[645] Fix | Delete
( ( fixedBottom || resize ) &&
[646] Fix | Delete
( windowPos + heights.windowHeight ) > ( editorPos + editorHeight + heights.bottomHeight + heights.statusBarHeight - borderWidth ) ) ) {
[647] Fix | Delete
fixedBottom = false;
[648] Fix | Delete
[649] Fix | Delete
$statusBar.attr( 'style', advanced ? '' : 'visibility: hidden;' );
[650] Fix | Delete
$bottom.attr( 'style', '' );
[651] Fix | Delete
}
[652] Fix | Delete
}
[653] Fix | Delete
[654] Fix | Delete
// The postbox container is positioned with @media from CSS. Ensure it is pinned on the side.
[655] Fix | Delete
if ( $postboxContainer.width() < 300 && heights.windowWidth > 600 &&
[656] Fix | Delete
[657] Fix | Delete
// Check if the sidebar is not taller than the document height.
[658] Fix | Delete
$document.height() > ( $sideSortables.height() + postBodyTop + 120 ) &&
[659] Fix | Delete
[660] Fix | Delete
// Check if the editor is taller than the viewport.
[661] Fix | Delete
heights.windowHeight < editorHeight ) {
[662] Fix | Delete
[663] Fix | Delete
if ( ( heights.sideSortablesHeight + pinnedToolsTop + sidebarBottom ) > heights.windowHeight || fixedSideTop || fixedSideBottom ) {
[664] Fix | Delete
[665] Fix | Delete
// Reset the sideSortables style when scrolling to the top.
[666] Fix | Delete
if ( windowPos + pinnedToolsTop <= postBodyTop ) {
[667] Fix | Delete
$sideSortables.attr( 'style', '' );
[668] Fix | Delete
fixedSideTop = fixedSideBottom = false;
[669] Fix | Delete
} else {
[670] Fix | Delete
[671] Fix | Delete
// When scrolling down.
[672] Fix | Delete
if ( windowPos > lastScrollPosition ) {
[673] Fix | Delete
if ( fixedSideTop ) {
[674] Fix | Delete
[675] Fix | Delete
// Let it scroll.
[676] Fix | Delete
fixedSideTop = false;
[677] Fix | Delete
sidebarTop = $sideSortables.offset().top - heights.adminBarHeight;
[678] Fix | Delete
footerTop = $footer.offset().top;
[679] Fix | Delete
[680] Fix | Delete
// Don't get over the footer.
[681] Fix | Delete
if ( footerTop < sidebarTop + heights.sideSortablesHeight + sidebarBottom ) {
[682] Fix | Delete
sidebarTop = footerTop - heights.sideSortablesHeight - 12;
[683] Fix | Delete
}
[684] Fix | Delete
[685] Fix | Delete
$sideSortables.css({
[686] Fix | Delete
position: 'absolute',
[687] Fix | Delete
top: sidebarTop,
[688] Fix | Delete
bottom: ''
[689] Fix | Delete
});
[690] Fix | Delete
} else if ( ! fixedSideBottom && heights.sideSortablesHeight + $sideSortables.offset().top + sidebarBottom < windowPos + heights.windowHeight ) {
[691] Fix | Delete
// Pin the bottom.
[692] Fix | Delete
fixedSideBottom = true;
[693] Fix | Delete
[694] Fix | Delete
$sideSortables.css({
[695] Fix | Delete
position: 'fixed',
[696] Fix | Delete
top: 'auto',
[697] Fix | Delete
bottom: sidebarBottom
[698] Fix | Delete
});
[699] Fix | Delete
}
[700] Fix | Delete
[701] Fix | Delete
// When scrolling up.
[702] Fix | Delete
} else if ( windowPos < lastScrollPosition ) {
[703] Fix | Delete
if ( fixedSideBottom ) {
[704] Fix | Delete
// Let it scroll.
[705] Fix | Delete
fixedSideBottom = false;
[706] Fix | Delete
sidebarTop = $sideSortables.offset().top - sidebarBottom;
[707] Fix | Delete
footerTop = $footer.offset().top;
[708] Fix | Delete
[709] Fix | Delete
// Don't get over the footer.
[710] Fix | Delete
if ( footerTop < sidebarTop + heights.sideSortablesHeight + sidebarBottom ) {
[711] Fix | Delete
sidebarTop = footerTop - heights.sideSortablesHeight - 12;
[712] Fix | Delete
}
[713] Fix | Delete
[714] Fix | Delete
$sideSortables.css({
[715] Fix | Delete
position: 'absolute',
[716] Fix | Delete
top: sidebarTop,
[717] Fix | Delete
bottom: ''
[718] Fix | Delete
});
[719] Fix | Delete
} else if ( ! fixedSideTop && $sideSortables.offset().top >= windowPos + pinnedToolsTop ) {
[720] Fix | Delete
// Pin the top.
[721] Fix | Delete
fixedSideTop = true;
[722] Fix | Delete
[723] Fix | Delete
$sideSortables.css({
[724] Fix | Delete
position: 'fixed',
[725] Fix | Delete
top: pinnedToolsTop,
[726] Fix | Delete
bottom: ''
[727] Fix | Delete
});
[728] Fix | Delete
}
[729] Fix | Delete
}
[730] Fix | Delete
}
[731] Fix | Delete
} else {
[732] Fix | Delete
// If the sidebar container is smaller than the viewport, then pin/unpin the top when scrolling.
[733] Fix | Delete
if ( windowPos >= ( postBodyTop - pinnedToolsTop ) ) {
[734] Fix | Delete
[735] Fix | Delete
$sideSortables.css( {
[736] Fix | Delete
position: 'fixed',
[737] Fix | Delete
top: pinnedToolsTop
[738] Fix | Delete
} );
[739] Fix | Delete
} else {
[740] Fix | Delete
$sideSortables.attr( 'style', '' );
[741] Fix | Delete
}
[742] Fix | Delete
[743] Fix | Delete
fixedSideTop = fixedSideBottom = false;
[744] Fix | Delete
}
[745] Fix | Delete
[746] Fix | Delete
lastScrollPosition = windowPos;
[747] Fix | Delete
} else {
[748] Fix | Delete
$sideSortables.attr( 'style', '' );
[749] Fix | Delete
fixedSideTop = fixedSideBottom = false;
[750] Fix | Delete
}
[751] Fix | Delete
[752] Fix | Delete
if ( resize ) {
[753] Fix | Delete
$contentWrap.css( {
[754] Fix | Delete
paddingTop: heights.toolsHeight
[755] Fix | Delete
} );
[756] Fix | Delete
[757] Fix | Delete
if ( visual ) {
[758] Fix | Delete
$visualEditor.css( {
[759] Fix | Delete
paddingTop: heights.visualTopHeight + heights.menuBarHeight
[760] Fix | Delete
} );
[761] Fix | Delete
} else {
[762] Fix | Delete
$textEditor.css( {
[763] Fix | Delete
marginTop: heights.textTopHeight
[764] Fix | Delete
} );
[765] Fix | Delete
}
[766] Fix | Delete
}
[767] Fix | Delete
}
[768] Fix | Delete
[769] Fix | Delete
/**
[770] Fix | Delete
* Resizes the editor and adjusts the toolbars.
[771] Fix | Delete
*
[772] Fix | Delete
* @since 4.0.0
[773] Fix | Delete
*
[774] Fix | Delete
* @return {void}
[775] Fix | Delete
*/
[776] Fix | Delete
function fullscreenHide() {
[777] Fix | Delete
textEditorResize();
[778] Fix | Delete
adjust();
[779] Fix | Delete
}
[780] Fix | Delete
[781] Fix | Delete
/**
[782] Fix | Delete
* Runs the passed function with 500ms intervals.
[783] Fix | Delete
*
[784] Fix | Delete
* @since 4.0.0
[785] Fix | Delete
*
[786] Fix | Delete
* @param {function} callback The function to run in the timeout.
[787] Fix | Delete
*
[788] Fix | Delete
* @return {void}
[789] Fix | Delete
*/
[790] Fix | Delete
function initialResize( callback ) {
[791] Fix | Delete
for ( var i = 1; i < 6; i++ ) {
[792] Fix | Delete
setTimeout( callback, 500 * i );
[793] Fix | Delete
}
[794] Fix | Delete
}
[795] Fix | Delete
[796] Fix | Delete
/**
[797] Fix | Delete
* Runs adjust after 100ms.
[798] Fix | Delete
*
[799] Fix | Delete
* @since 4.0.0
[800] Fix | Delete
*
[801] Fix | Delete
* @return {void}
[802] Fix | Delete
*/
[803] Fix | Delete
function afterScroll() {
[804] Fix | Delete
clearTimeout( scrollTimer );
[805] Fix | Delete
scrollTimer = setTimeout( adjust, 100 );
[806] Fix | Delete
}
[807] Fix | Delete
[808] Fix | Delete
/**
[809] Fix | Delete
* Binds editor expand events on elements.
[810] Fix | Delete
*
[811] Fix | Delete
* @since 4.0.0
[812] Fix | Delete
*
[813] Fix | Delete
* @return {void}
[814] Fix | Delete
*/
[815] Fix | Delete
function on() {
[816] Fix | Delete
/*
[817] Fix | Delete
* Scroll to the top when triggering this from JS.
[818] Fix | Delete
* Ensure the toolbars are pinned properly.
[819] Fix | Delete
*/
[820] Fix | Delete
if ( window.pageYOffset && window.pageYOffset > pageYOffsetAtTop ) {
[821] Fix | Delete
window.scrollTo( window.pageXOffset, 0 );
[822] Fix | Delete
}
[823] Fix | Delete
[824] Fix | Delete
$wrap.addClass( 'wp-editor-expand' );
[825] Fix | Delete
[826] Fix | Delete
// Adjust when the window is scrolled or resized.
[827] Fix | Delete
$window.on( 'scroll.editor-expand resize.editor-expand', function( event ) {
[828] Fix | Delete
adjust( event.type );
[829] Fix | Delete
afterScroll();
[830] Fix | Delete
} );
[831] Fix | Delete
[832] Fix | Delete
/*
[833] Fix | Delete
* Adjust when collapsing the menu, changing the columns
[834] Fix | Delete
* or changing the body class.
[835] Fix | Delete
*/
[836] Fix | Delete
$document.on( 'wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand', adjust )
[837] Fix | Delete
.on( 'postbox-toggled.editor-expand postbox-moved.editor-expand', function() {
[838] Fix | Delete
if ( ! fixedSideTop && ! fixedSideBottom && window.pageYOffset > pinnedToolsTop ) {
[839] Fix | Delete
fixedSideBottom = true;
[840] Fix | Delete
window.scrollBy( 0, -1 );
[841] Fix | Delete
adjust();
[842] Fix | Delete
window.scrollBy( 0, 1 );
[843] Fix | Delete
}
[844] Fix | Delete
[845] Fix | Delete
adjust();
[846] Fix | Delete
}).on( 'wp-window-resized.editor-expand', function() {
[847] Fix | Delete
if ( mceEditor && ! mceEditor.isHidden() ) {
[848] Fix | Delete
mceEditor.execCommand( 'wpAutoResize' );
[849] Fix | Delete
} else {
[850] Fix | Delete
textEditorResize();
[851] Fix | Delete
}
[852] Fix | Delete
});
[853] Fix | Delete
[854] Fix | Delete
$textEditor.on( 'focus.editor-expand input.editor-expand propertychange.editor-expand', textEditorResize );
[855] Fix | Delete
mceBind();
[856] Fix | Delete
[857] Fix | Delete
// Adjust when entering or exiting fullscreen mode.
[858] Fix | Delete
fullscreen && fullscreen.pubsub.subscribe( 'hidden', fullscreenHide );
[859] Fix | Delete
[860] Fix | Delete
if ( mceEditor ) {
[861] Fix | Delete
mceEditor.settings.wp_autoresize_on = true;
[862] Fix | Delete
mceEditor.execCommand( 'wpAutoResizeOn' );
[863] Fix | Delete
[864] Fix | Delete
if ( ! mceEditor.isHidden() ) {
[865] Fix | Delete
mceEditor.execCommand( 'wpAutoResize' );
[866] Fix | Delete
}
[867] Fix | Delete
}
[868] Fix | Delete
[869] Fix | Delete
if ( ! mceEditor || mceEditor.isHidden() ) {
[870] Fix | Delete
textEditorResize();
[871] Fix | Delete
}
[872] Fix | Delete
[873] Fix | Delete
adjust();
[874] Fix | Delete
[875] Fix | Delete
$document.trigger( 'editor-expand-on' );
[876] Fix | Delete
}
[877] Fix | Delete
[878] Fix | Delete
/**
[879] Fix | Delete
* Unbinds editor expand events.
[880] Fix | Delete
*
[881] Fix | Delete
* @since 4.0.0
[882] Fix | Delete
*
[883] Fix | Delete
* @return {void}
[884] Fix | Delete
*/
[885] Fix | Delete
function off() {
[886] Fix | Delete
var height = parseInt( window.getUserSetting( 'ed_size', 300 ), 10 );
[887] Fix | Delete
[888] Fix | Delete
if ( height < 50 ) {
[889] Fix | Delete
height = 50;
[890] Fix | Delete
} else if ( height > 5000 ) {
[891] Fix | Delete
height = 5000;
[892] Fix | Delete
}
[893] Fix | Delete
[894] Fix | Delete
/*
[895] Fix | Delete
* Scroll to the top when triggering this from JS.
[896] Fix | Delete
* Ensure the toolbars are reset properly.
[897] Fix | Delete
*/
[898] Fix | Delete
if ( window.pageYOffset && window.pageYOffset > pageYOffsetAtTop ) {
[899] Fix | Delete
window.scrollTo( window.pageXOffset, 0 );
[900] Fix | Delete
}
[901] Fix | Delete
[902] Fix | Delete
$wrap.removeClass( 'wp-editor-expand' );
[903] Fix | Delete
[904] Fix | Delete
$window.off( '.editor-expand' );
[905] Fix | Delete
$document.off( '.editor-expand' );
[906] Fix | Delete
$textEditor.off( '.editor-expand' );
[907] Fix | Delete
mceUnbind();
[908] Fix | Delete
[909] Fix | Delete
// Adjust when entering or exiting fullscreen mode.
[910] Fix | Delete
fullscreen && fullscreen.pubsub.unsubscribe( 'hidden', fullscreenHide );
[911] Fix | Delete
[912] Fix | Delete
// Reset all CSS.
[913] Fix | Delete
$.each( [ $visualTop, $textTop, $tools, $menuBar, $bottom, $statusBar, $contentWrap, $visualEditor, $textEditor, $sideSortables ], function( i, element ) {
[914] Fix | Delete
element && element.attr( 'style', '' );
[915] Fix | Delete
});
[916] Fix | Delete
[917] Fix | Delete
fixedTop = fixedBottom = fixedSideTop = fixedSideBottom = false;
[918] Fix | Delete
[919] Fix | Delete
if ( mceEditor ) {
[920] Fix | Delete
mceEditor.settings.wp_autoresize_on = false;
[921] Fix | Delete
mceEditor.execCommand( 'wpAutoResizeOff' );
[922] Fix | Delete
[923] Fix | Delete
if ( ! mceEditor.isHidden() ) {
[924] Fix | Delete
$textEditor.hide();
[925] Fix | Delete
[926] Fix | Delete
if ( height ) {
[927] Fix | Delete
mceEditor.theme.resizeTo( null, height );
[928] Fix | Delete
}
[929] Fix | Delete
}
[930] Fix | Delete
}
[931] Fix | Delete
[932] Fix | Delete
// If there is a height found in the user setting.
[933] Fix | Delete
if ( height ) {
[934] Fix | Delete
$textEditor.height( height );
[935] Fix | Delete
}
[936] Fix | Delete
[937] Fix | Delete
$document.trigger( 'editor-expand-off' );
[938] Fix | Delete
}
[939] Fix | Delete
[940] Fix | Delete
// Start on load.
[941] Fix | Delete
if ( $wrap.hasClass( 'wp-editor-expand' ) ) {
[942] Fix | Delete
on();
[943] Fix | Delete
[944] Fix | Delete
// Resize just after CSS has fully loaded and QuickTags is ready.
[945] Fix | Delete
if ( $contentWrap.hasClass( 'html-active' ) ) {
[946] Fix | Delete
initialResize( function() {
[947] Fix | Delete
adjust();
[948] Fix | Delete
textEditorResize();
[949] Fix | Delete
} );
[950] Fix | Delete
}
[951] Fix | Delete
}
[952] Fix | Delete
[953] Fix | Delete
// Show the on/off checkbox.
[954] Fix | Delete
$( '#adv-settings .editor-expand' ).show();
[955] Fix | Delete
$( '#editor-expand-toggle' ).on( 'change.editor-expand', function() {
[956] Fix | Delete
if ( $(this).prop( 'checked' ) ) {
[957] Fix | Delete
on();
[958] Fix | Delete
window.setUserSetting( 'editor_expand', 'on' );
[959] Fix | Delete
} else {
[960] Fix | Delete
off();
[961] Fix | Delete
window.setUserSetting( 'editor_expand', 'off' );
[962] Fix | Delete
}
[963] Fix | Delete
});
[964] Fix | Delete
[965] Fix | Delete
// Expose on() and off().
[966] Fix | Delete
window.editorExpand = {
[967] Fix | Delete
on: on,
[968] Fix | Delete
off: off
[969] Fix | Delete
};
[970] Fix | Delete
} );
[971] Fix | Delete
[972] Fix | Delete
/**
[973] Fix | Delete
* Handles the distraction free writing of TinyMCE.
[974] Fix | Delete
*
[975] Fix | Delete
* @since 4.1.0
[976] Fix | Delete
*
[977] Fix | Delete
* @return {void}
[978] Fix | Delete
*/
[979] Fix | Delete
$( function() {
[980] Fix | Delete
var $body = $( document.body ),
[981] Fix | Delete
$wrap = $( '#wpcontent' ),
[982] Fix | Delete
$editor = $( '#post-body-content' ),
[983] Fix | Delete
$title = $( '#title' ),
[984] Fix | Delete
$content = $( '#content' ),
[985] Fix | Delete
$overlay = $( document.createElement( 'DIV' ) ),
[986] Fix | Delete
$slug = $( '#edit-slug-box' ),
[987] Fix | Delete
$slugFocusEl = $slug.find( 'a' )
[988] Fix | Delete
.add( $slug.find( 'button' ) )
[989] Fix | Delete
.add( $slug.find( 'input' ) ),
[990] Fix | Delete
$menuWrap = $( '#adminmenuwrap' ),
[991] Fix | Delete
$editorWindow = $(),
[992] Fix | Delete
$editorIframe = $(),
[993] Fix | Delete
_isActive = window.getUserSetting( 'editor_expand', 'on' ) === 'on',
[994] Fix | Delete
_isOn = _isActive ? window.getUserSetting( 'post_dfw' ) === 'on' : false,
[995] Fix | Delete
traveledX = 0,
[996] Fix | Delete
traveledY = 0,
[997] Fix | Delete
buffer = 20,
[998] Fix | Delete
faded, fadedAdminBar, fadedSlug,
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function