Skip to content

Commit bdb5137

Browse files
committed
Convert leading double spaces to tabs
1 parent 8b693fa commit bdb5137

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

admin/class-pods-export-code.php

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,29 @@ public function display_plugin_admin_page () {
160160
}
161161

162162
/**
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
164184
*/
165-
public function exportable_pods() {
185+
public function exportable_pods () {
166186
return $this->exportable_pods;
167187
}
168188

@@ -182,30 +202,11 @@ public function pods_export_code () {
182202

183203
$export_to_code = new Pods_Export_Code_API();
184204
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 );
186207
}
187208

188209
die();
189210
}
190211

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

Comments
 (0)