public function sanitize_ignored_plugins( $value ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

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

			return $slug;
		}, array_keys( get_plugins() ) );
		$invalid_slugs = array_diff( $value, $valid_slugs );

		if ( ! empty( $invalid_slugs ) ) {
			add_settings_error(
				'soter_ignored_plugins',
				'invalid_soter_ignored_plugins',
				sprintf(
					'Only currently installed plugins can be ignored. The following invalid plugin slugs were provided: %s',
					implode( ', ', array_map( 'esc_html', $invalid_slugs ) )
				)
			);

			return $this->ignored_plugins;
		}

		return $value;
	}
public function sanitize_ignored_plugins( $value ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

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

			return $slug;
		}, array_keys( get_plugins() ) );
		$invalid_slugs = array_diff( $value, $valid_slugs );

		if ( ! empty( $invalid_slugs ) ) {
			add_settings_error(
				'soter_ignored_plugins',
				'invalid_soter_ignored_plugins',
				sprintf(
					'Only currently installed plugins can be ignored. The following invalid plugin slugs were provided: %s',
					implode( ', ', array_map( 'esc_html', $invalid_slugs ) )
				)
			);

			return $this->ignored_plugins;
		}

		return $value;
	}
public function sanitize_ignored_plugins ( $ value ) { if ( ! function_exists ( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php' ; } $ value = ( array ) $ value ; $ valid_slugs = array_map ( function ( $ file ) { if ( false === strpos ( $ file , '/' ) ) { $ slug = basename ( $ file , '.php' ) ; } else { $ slug = dirname ( $ file ) ; } return $ slug ; } , array_keys ( get_plugins ( ) ) ) ; $ invalid_slugs = array_diff ( $ value , $ valid_slugs ) ; if ( ! empty ( $ invalid_slugs ) ) { add_settings_error ( 'soter_ignored_plugins' , 'invalid_soter_ignored_plugins' , sprintf ( 'Only currently installed plugins can be ignored. The following invalid plugin slugs were provided: %s' , implode ( ', ' , array_map ( 'esc_html' , $ invalid_slugs ) ) ) ) ; return $ this -> ignored_plugins ; } return $ value ; }
Sanitize the ignored plugins list.

@param  string[] $value The value provided by the user.

@return string[]
Sanitize the ignored plugins list .