public function pre_update_option_active_plugins( array $plugins ): array {

		$plugin = plugin_basename( \dirname( __DIR__, 2 ) . '/laps.php' );
		$key    = array_search( $plugin, $plugins, true );

		if ( false !== $key && $key > 0 ) {

			unset( $plugins[ $key ] );
			array_unshift( $plugins, $plugin );
			$plugins = array_values( $plugins );
		}

		return $plugins;
	}
public function pre_update_option_active_plugins( array $plugins ): array {

		$plugin = plugin_basename( \dirname( __DIR__, 2 ) . '/laps.php' );
		$key    = array_search( $plugin, $plugins, true );

		if ( false !== $key && $key > 0 ) {

			unset( $plugins[ $key ] );
			array_unshift( $plugins, $plugin );
			$plugins = array_values( $plugins );
		}

		return $plugins;
	}
public function pre_update_option_active_plugins ( array $ plugins ) : array { $ plugin = plugin_basename ( \ dirname ( __DIR__ , 2 ) . '/laps.php' ) ; $ key = array_search ( $ plugin , $ plugins , true ) ; if ( false !== $ key && $ key > 0 ) { unset ( $ plugins [ $ key ] ) ; array_unshift ( $ plugins , $ plugin ) ; $ plugins = array_values ( $ plugins ) ; } return $ plugins ; }
Reorder active plugins so Laps is first and starts timing load early.

@param array $plugins Filtered array of active plugins’ basenames.

@return array
Reorder active plugins so Laps is first and starts timing load early .