migrations = array( new Migration_Field_Values( $logger, $layouts_settings_storage, // keep old bem_name to ensure the default template produces the same markup for existing layouts. fn ( Cpt_Settings $cpt_settings ) => $this->set_default_bem_name( $cpt_settings, 'acf-view' ) ), new Migration_Field_Values( $logger, $post_selections_settings_storage, // keep old bem_name to ensure the default template produces the same markup for existing post selections. fn ( Cpt_Settings $cpt_settings ) => $this->set_default_bem_name( $cpt_settings, 'acf-card' ) ), ); } protected function set_default_bem_name( Cpt_Settings $cpt_settings, string $to ): bool { if ( 0 === strlen( $cpt_settings->bem_name ) ) { $cpt_settings->bem_name = $to; return true; } return false; } }