Extend search in ACF fields

How can I extend WordPress search to all Advanced Custom Fields created? To make ACF data available to wp_search, add this code to your plugin: … [+]