Code Duplication    Length = 14-15 lines in 2 locations

form.php 2 locations

@@ 130-143 (lines=14) @@
127
     * @param array $columns
128
     * @return array
129
     */
130
    function modify_table_columns( $columns )
131
    {   
132
        foreach( $this->fields as $fields )
133
        {
134
            foreach( $fields as $name => $props )
135
            {
136
                if( $props['table']['show'] )
137
                {
138
                    $columns[$name] = $props['label'];
139
                }
140
            }
141
        }
142
        return $columns;
143
    }
144
    
145
    /**
146
     * Retrieve the data for a given column in the term table.
@@ 179-193 (lines=15) @@
176
     * @param array $columns
177
     * @return string
178
     */
179
    function modify_table_sortable_columns( $columns )
180
    {
181
        foreach( $this->fields as $taxonomy => $fields )
182
        {
183
            foreach( $fields as $name => $props )
184
            {
185
                if( $props['table']['show'] && 
186
                    $props['table']['sortable']
187
                ) {
188
                    $columns[$name] = $name;
189
                }
190
            }
191
        }
192
        return $columns;
193
    }
194
    
195
    /**
196
     * Modify terms_clauses to allow sorting custom WordPress Admin Table Columns by a custom Taxonomy Term meta