Edit File by line
/home/barbar84/www/wp-admin/js
File: common.js
});
[2000] Fix | Delete
[2001] Fix | Delete
/**
[2002] Fix | Delete
* Hides the update button for expired plugin or theme uploads.
[2003] Fix | Delete
*
[2004] Fix | Delete
* On the "Update plugin/theme from uploaded zip" screen, once the upload has expired,
[2005] Fix | Delete
* hides the "Replace current with uploaded" button and displays a warning.
[2006] Fix | Delete
*
[2007] Fix | Delete
* @since 5.5.0
[2008] Fix | Delete
*/
[2009] Fix | Delete
$document.ready( function( $ ) {
[2010] Fix | Delete
var $overwrite, $warning;
[2011] Fix | Delete
[2012] Fix | Delete
if ( ! $body.hasClass( 'update-php' ) ) {
[2013] Fix | Delete
return;
[2014] Fix | Delete
}
[2015] Fix | Delete
[2016] Fix | Delete
$overwrite = $( 'a.update-from-upload-overwrite' );
[2017] Fix | Delete
$warning = $( '.update-from-upload-expired' );
[2018] Fix | Delete
[2019] Fix | Delete
if ( ! $overwrite.length || ! $warning.length ) {
[2020] Fix | Delete
return;
[2021] Fix | Delete
}
[2022] Fix | Delete
[2023] Fix | Delete
window.setTimeout(
[2024] Fix | Delete
function() {
[2025] Fix | Delete
$overwrite.hide();
[2026] Fix | Delete
$warning.removeClass( 'hidden' );
[2027] Fix | Delete
[2028] Fix | Delete
if ( window.wp && window.wp.a11y ) {
[2029] Fix | Delete
window.wp.a11y.speak( $warning.text() );
[2030] Fix | Delete
}
[2031] Fix | Delete
},
[2032] Fix | Delete
7140000 // 119 minutes. The uploaded file is deleted after 2 hours.
[2033] Fix | Delete
);
[2034] Fix | Delete
} );
[2035] Fix | Delete
[2036] Fix | Delete
// Fire a custom jQuery event at the end of window resize.
[2037] Fix | Delete
( function() {
[2038] Fix | Delete
var timeout;
[2039] Fix | Delete
[2040] Fix | Delete
/**
[2041] Fix | Delete
* Triggers the WP window-resize event.
[2042] Fix | Delete
*
[2043] Fix | Delete
* @since 3.8.0
[2044] Fix | Delete
*
[2045] Fix | Delete
* @return {void}
[2046] Fix | Delete
*/
[2047] Fix | Delete
function triggerEvent() {
[2048] Fix | Delete
$document.trigger( 'wp-window-resized' );
[2049] Fix | Delete
}
[2050] Fix | Delete
[2051] Fix | Delete
/**
[2052] Fix | Delete
* Fires the trigger event again after 200 ms.
[2053] Fix | Delete
*
[2054] Fix | Delete
* @since 3.8.0
[2055] Fix | Delete
*
[2056] Fix | Delete
* @return {void}
[2057] Fix | Delete
*/
[2058] Fix | Delete
function fireOnce() {
[2059] Fix | Delete
window.clearTimeout( timeout );
[2060] Fix | Delete
timeout = window.setTimeout( triggerEvent, 200 );
[2061] Fix | Delete
}
[2062] Fix | Delete
[2063] Fix | Delete
$window.on( 'resize.wp-fire-once', fireOnce );
[2064] Fix | Delete
}());
[2065] Fix | Delete
[2066] Fix | Delete
// Make Windows 8 devices play along nicely.
[2067] Fix | Delete
(function(){
[2068] Fix | Delete
if ( '-ms-user-select' in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/) ) {
[2069] Fix | Delete
var msViewportStyle = document.createElement( 'style' );
[2070] Fix | Delete
msViewportStyle.appendChild(
[2071] Fix | Delete
document.createTextNode( '@-ms-viewport{width:auto!important}' )
[2072] Fix | Delete
);
[2073] Fix | Delete
document.getElementsByTagName( 'head' )[0].appendChild( msViewportStyle );
[2074] Fix | Delete
}
[2075] Fix | Delete
})();
[2076] Fix | Delete
[2077] Fix | Delete
}( jQuery, window ));
[2078] Fix | Delete
[2079] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function