From 59b563ab1a1fdf25d365cc9a1839711b29bf3f31 Mon Sep 17 00:00:00 2001 From: Nasif Date: Thu, 9 Mar 2023 12:03:55 -0500 Subject: [PATCH] Predefined complex groups with names Added comments to the "Adding predefined complex groups" section, showing how to set predefined values in Complex Fields that make use of group names. --- src/learn/fields/complex.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/learn/fields/complex.md b/src/learn/fields/complex.md index 01f4370..f865ca2 100644 --- a/src/learn/fields/complex.md +++ b/src/learn/fields/complex.md @@ -181,9 +181,11 @@ Container::make( 'theme_options', __( 'Theme Options' ) ) ) ) ->set_default_value( array( array( + //'_type' => 'your_group_name_here', // optional: use only if you've specified group names on field definition 'my_text_field' => 'Hello', ), array( + //'_type' => 'your_group_name_here', 'my_text_field' => 'World!', ), ) ),