gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 172.19.0.3  /  Your IP : 216.73.216.178
Web Server : Apache/2.4
System : Linux 880f91b28fd7 5.15.0-117-generic #127~20.04.1-Ubuntu SMP Thu Jul 11 15:36:12 UTC 2024 x86_64
User : tomlinde ( 155017)
PHP Version : 5.6.40
Disable Function : dl, syslog, opcache_get_status
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/webpages/lima-city/tomlinde/html/biblog/wp-admin/js/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/webpages/lima-city/tomlinde/html/biblog/wp-admin/js/updates.js
window.wp = window.wp || {};

(function( $, wp ) {

	wp.updates = {};

	/**
	 * Decrement update counts throughout the various menus
	 *
	 * @param {string} updateType
	 */
	wp.updates.decrementCount = function( upgradeType ) {
		var count, pluginCount, $elem;

		$elem = $( '#wp-admin-bar-updates .ab-label' );
		count = $elem.text();
		count = parseInt( count, 10 ) - 1;
		if ( count < 0 ) {
			return;
		}
		$( '#wp-admin-bar-updates .ab-item' ).removeAttr( 'title' );
		$elem.text( count );

		$elem = $( 'a[href="update-core.php"] .update-plugins' );
		$elem.each( function( index, elem ) {
			elem.className = elem.className.replace( /count-\d+/, 'count-' + count );
		} );
		$elem.removeAttr( 'title' );
		$elem.find( '.update-count' ).text( count );

		if ( 'plugin' === upgradeType ) {
			$elem = $( '#menu-plugins' );
			pluginCount = $elem.find( '.plugin-count' ).eq(0).text();
			pluginCount = parseInt( pluginCount, 10 ) - 1;
			if ( pluginCount < 0 ) {
				return;
			}
			$elem.find( '.plugin-count' ).text( pluginCount );
			$elem.find( '.update-plugins' ).each( function( index, elem ) {
				elem.className = elem.className.replace( /count-\d+/, 'count-' + pluginCount );
			} );
		}
	};

	$( window ).on( 'message', function( e ) {
		var event = e.originalEvent,
			message,
			loc = document.location,
			expectedOrigin = loc.protocol + '//' + loc.hostname;

		if ( event.origin !== expectedOrigin ) {
			return;
		}

		message = $.parseJSON( event.data );

		if ( typeof message.action === 'undefined' || message.action !== 'decrementUpdateCount' ) {
			return;
		}

		wp.updates.decrementCount( message.upgradeType );

	} );

})( jQuery, window.wp );

NineSec Team - 2022