File tree 1 file changed +6
-4
lines changed 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,7 @@ public function export_pod( $pod_name ) {
88
88
}
89
89
}
90
90
91
- $ output .= sprintf ( "\t\$group = %s; \n\n" , $ this ->var_export_format ( $ group , 1 ) );
92
- $ output .= "\tpods_register_group( \$group, \$pod['name'] ); \n\n" ;
91
+ $ group_fields_to_export = [];
93
92
94
93
// Output a pods_register_field() call for each field
95
94
foreach ( $ group_fields as $ group_field ) {
@@ -105,9 +104,12 @@ public function export_pod( $pod_name ) {
105
104
}
106
105
}
107
106
108
- $ output .= sprintf ( "\t\$group_field = %s; \n\n" , $ this ->var_export_format ( $ group_field , 1 ) );
109
- $ output .= "\tpods_register_group_field( \$group_field, \$group['name'], \$pod['name'] ); \n\n" ;
107
+ $ group_fields_to_export [ $ group_field ['name ' ] ] = $ group_field ;
110
108
}
109
+
110
+ $ output .= sprintf ( "\t\$group = %s; \n\n" , $ this ->var_export_format ( $ group , 1 ) );
111
+ $ output .= sprintf ( "\t\$group_fields = %s; \n\n" , $ this ->var_export_format ( $ group_fields_to_export , 1 ) );
112
+ $ output .= "\tpods_register_group( \$group, \$pod['name'], \$group_fields ); \n\n" ;
111
113
}
112
114
113
115
return $ output ;
You can’t perform that action at this time.
0 commit comments