Custom Fields
Re-Envisioned
Support MB Revision Groups revisions don't work Reply To: Groups revisions don't work

#9811

Cereal Concept
Participant

Hi !
Thanks for your replies !
Sorry for the delay I missed the notification

Here is the code used to register the meta box with revision enabled :

$meta_boxes[] = array(
  'revision' => true,
  'id'         => 'noussuite-blocs',
  'title'      => __( 'Les différents blocs', 'purple' ),
  'post_types' => array( 'page' ),
  'autosave'   => true,
  'fields'     => array(

    // Blocs
    array(
      'name'  => esc_html__( 'Blocs', 'langdomain' ),
      'id'    => "{$prefix}group-blocs",
      'type'  => 'group',
      'add_button' => 'Ajouter un bloc',
      'collapsible' => true,
      'group_title' => array( 'field' => 'cc_text-titre' ),
      'clone' => true,
      'sort_clone' => true,
      'fields'   => array(
        // Titre
        array(
          'name'  => esc_html__( 'Titre', 'langdomain' ),
          'id'    => "{$prefix}text-titre",
          'desc'  => esc_html__( 'Le titre du bloc', 'langdomain' ),
          'type'  => 'text',
        ),