Code Duplication    Length = 9-9 lines in 3 locations

core/db_models/EEM_Term.model.php 1 location

@@ 208-216 (lines=9) @@
205
     * @param EEM_Base $model
206
     * @return array
207
     */
208
    public static function rest_api_query_params($model_query_params, $querystring_query_params, $model)
209
    {
210
        if ($model === EEM_Term::instance()) {
211
            $taxonomies = get_taxonomies(array('show_in_rest' => true));
212
            if (! empty($taxonomies)) {
213
                $model_query_params[0]['Term_Taxonomy.taxonomy'] = array('IN', $taxonomies);
214
            }
215
        }
216
        return $model_query_params;
217
    }
218
219

core/db_models/EEM_Term_Relationship.model.php 1 location

@@ 231-239 (lines=9) @@
228
     * @param EEM_Base $model
229
     * @return array
230
     */
231
    public static function rest_api_query_params($model_query_params, $querystring_query_params, $model)
232
    {
233
        if ($model === EEM_Term_Relationship::instance()) {
234
            $taxonomies = get_taxonomies(array('show_in_rest' => true));
235
            if (! empty($taxonomies)) {
236
                $model_query_params[0]['Term_Taxonomy.taxonomy'] = array('IN', $taxonomies);
237
            }
238
        }
239
        return $model_query_params;
240
    }
241
242

core/db_models/EEM_Term_Taxonomy.model.php 1 location

@@ 139-147 (lines=9) @@
136
     * @param EEM_Base $model
137
     * @return array
138
     */
139
    public static function rest_api_query_params($model_query_params, $querystring_query_params, $model)
140
    {
141
        if ($model === EEM_Term_Taxonomy::instance()) {
142
            $taxonomies = get_taxonomies(array('show_in_rest' => true));
143
            if (! empty($taxonomies)) {
144
                $model_query_params[0]['taxonomy'] = array('IN', $taxonomies);
145
            }
146
        }
147
        return $model_query_params;
148
    }
149
}
150
// End of file EEM_Term_Taxonomy.model.php