@@ -160,9 +160,29 @@ public function display_plugin_admin_page () {
160
160
}
161
161
162
162
/**
163
- * @return array|null
163
+ *
164
+ */
165
+ private function set_exportable_pods () {
166
+
167
+ $ this ->exportable_pods = array ();
168
+
169
+ $ pods = pods_api ()->load_pods ( array ( 'fields ' => false ) );
170
+ foreach ( $ pods as $ this_pod ) {
171
+
172
+ // We do no support table-based Pods
173
+ if ( 'table ' == $ this_pod [ 'storage ' ] ) {
174
+ continue ;
175
+ }
176
+
177
+ $ this ->exportable_pods [ ] = $ this_pod ;
178
+ }
179
+
180
+ }
181
+
182
+ /**
183
+ * @return array
164
184
*/
165
- public function exportable_pods () {
185
+ public function exportable_pods () {
166
186
return $ this ->exportable_pods ;
167
187
}
168
188
@@ -182,30 +202,11 @@ public function pods_export_code () {
182
202
183
203
$ export_to_code = new Pods_Export_Code_API ();
184
204
foreach ( $ pod_names as $ this_pod ) {
185
- echo $ export_to_code ->export_pod ( $ this_pod );
205
+ $ code_output = $ export_to_code ->export_pod ( $ this_pod );
206
+ echo preg_replace ( "/ {2}/ " , "\t" , $ code_output );
186
207
}
187
208
188
209
die ();
189
210
}
190
211
191
- /**
192
- *
193
- */
194
- private function set_exportable_pods () {
195
-
196
- $ this ->exportable_pods = array ();
197
-
198
- $ pods = pods_api ()->load_pods ( array ( 'fields ' => false ) );
199
- foreach ( $ pods as $ this_pod ) {
200
-
201
- // We only support meta-based Pods
202
- if ( 'table ' == $ this_pod [ 'storage ' ] ) {
203
- continue ;
204
- }
205
-
206
- $ this ->exportable_pods [] = $ this_pod ;
207
- }
208
-
209
- }
210
-
211
- }
212
+ }
0 commit comments