Code Duplication    Length = 6-8 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 1265-1272 (lines=8) @@
1262
                }
1263
            }
1264
1265
            if ( false !== $this->searchable ) {
1266
                if ( 'search' != $which && isset( $this->fields[ 'search' ] ) &&!empty( $this->fields[ 'search' ] ) )
1267
                    $this->fields[ 'search' ] = $this->setup_fields( $this->fields[ 'search' ], 'search' );
1268
                else
1269
                    $this->fields[ 'search' ] = $fields;
1270
            }
1271
            else
1272
                $this->fields[ 'search' ] = false;
1273
1274
            if ( !in_array( 'export', $this->actions_disabled ) ) {
1275
                if ( 'export' != $which && isset( $this->fields[ 'export' ] ) &&!empty( $this->fields[ 'export' ] ) )
@@ 1279-1284 (lines=6) @@
1276
                    $this->fields[ 'export' ] = $this->setup_fields( $this->fields[ 'export' ], 'export' );
1277
            }
1278
1279
            if ( !in_array( 'reorder', $this->actions_disabled ) && false !== $this->reorder[ 'on' ] ) {
1280
                if ( 'reorder' != $which && isset( $this->fields[ 'reorder' ] ) &&!empty( $this->fields[ 'reorder' ] ) )
1281
                    $this->fields[ 'reorder' ] = $this->setup_fields( $this->fields[ 'reorder' ], 'reorder' );
1282
                else
1283
                    $this->fields[ 'reorder' ] = $fields;
1284
            }
1285
        }
1286
        return $this->do_hook( 'setup_fields', $fields, $which, $init );
1287
    }