src/class-upgrader.php
protected function prepare_ignored_plugins( array $plugins ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		$valid_slugs = array_map( function( $file ) {
			if ( false === strpos( $file, '/' ) ) {
				$slug = basename( $file, '.php' );
			} else {
				$slug = dirname( $file );
			}

			return $slug;
		}, array_keys( get_plugins() ) );

		return array_values( array_intersect( $valid_slugs, $plugins ) );
	}
protected function prepare_ignored_plugins( array $plugins ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		$valid_slugs = array_map( function( $file ) {
			if ( false === strpos( $file, '/' ) ) {
				$slug = basename( $file, '.php' );
			} else {
				$slug = dirname( $file );
			}

			return $slug;
		}, array_keys( get_plugins() ) );

		return array_values( array_intersect( $valid_slugs, $plugins ) );
	}
protected function prepare_ignored_plugins ( array $ plugins ) { if ( ! function_exists ( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php' ; } $ valid_slugs = array_map ( function ( $ file ) { if ( false === strpos ( $ file , '/' ) ) { $ slug = basename ( $ file , '.php' ) ; } else { $ slug = dirname ( $ file ) ; } return $ slug ; } , array_keys ( get_plugins ( ) ) ) ; return array_values ( array_intersect ( $ valid_slugs , $ plugins ) ) ; }
Ensure ignored plugins setting only contains currently installed plugins.

@param  array $plugins List of ignored plugins.

@return array
Ensure ignored plugins setting only contains currently installed plugins .