Code Duplication    Length = 6-8 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 1251-1258 (lines=8) @@
1248
                }
1249
            }
1250
1251
            if ( false !== $this->searchable ) {
1252
                if ( 'search' != $which && isset( $this->fields[ 'search' ] ) &&!empty( $this->fields[ 'search' ] ) )
1253
                    $this->fields[ 'search' ] = $this->setup_fields( $this->fields[ 'search' ], 'search' );
1254
                else
1255
                    $this->fields[ 'search' ] = $fields;
1256
            }
1257
            else
1258
                $this->fields[ 'search' ] = false;
1259
1260
            if ( !in_array( 'export', $this->actions_disabled ) ) {
1261
                if ( 'export' != $which && isset( $this->fields[ 'export' ] ) &&!empty( $this->fields[ 'export' ] ) )
@@ 1265-1270 (lines=6) @@
1262
                    $this->fields[ 'export' ] = $this->setup_fields( $this->fields[ 'export' ], 'export' );
1263
            }
1264
1265
            if ( !in_array( 'reorder', $this->actions_disabled ) && false !== $this->reorder[ 'on' ] ) {
1266
                if ( 'reorder' != $which && isset( $this->fields[ 'reorder' ] ) &&!empty( $this->fields[ 'reorder' ] ) )
1267
                    $this->fields[ 'reorder' ] = $this->setup_fields( $this->fields[ 'reorder' ], 'reorder' );
1268
                else
1269
                    $this->fields[ 'reorder' ] = $fields;
1270
            }
1271
        }
1272
        return $this->do_hook( 'setup_fields', $fields, $which, $init );
1273
    }