Fix for posts not being indexed with Metabox + WPML and custom fields set to “Copy” instead of “translate”

<?php
// Use readonly instead of disabled to for "Copy" Metabox fields in WPML 
// See: https://facetwp.com/help-center/using-facetwp-with/meta-box/#fix-indexing-issues-when-using-meta-box-with-wpml

add_filter( 'rwmb_text_html', function( $html ) {
    return str_replace( 'disabled', 'readonly', $html );
}, 10 );