From 8e5f52872d31513855a1ee067f37c62b4ad4eb4f Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Tue, 18 Sep 2018 09:39:58 -0300 Subject: [PATCH] term user is not required --- src/classes/repositories/class-tainacan-terms.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/classes/repositories/class-tainacan-terms.php b/src/classes/repositories/class-tainacan-terms.php index c32f8137c..56ef2c672 100644 --- a/src/classes/repositories/class-tainacan-terms.php +++ b/src/classes/repositories/class-tainacan-terms.php @@ -77,7 +77,7 @@ class Terms extends Repository { 'description' => __( 'The term creator', 'tainacan' ), 'on_error' => __( 'The user is empty or invalid', 'tainacan' ), 'default' => get_current_user_id(), - 'validation' => v::numeric(), + //'validation' => v::numeric(), ], 'header_image_id' => [ 'map' => 'termmeta', @@ -222,7 +222,6 @@ class Terms extends Repository { foreach ( $terms as $term ) { $tainacan_term = new Entities\Term( $term ); - $tainacan_term->set_user( get_term_meta( $tainacan_term->get_id(), 'user', true ) ); $return[] = $tainacan_term; } @@ -230,8 +229,6 @@ class Terms extends Repository { } elseif ( is_numeric( $args ) && ! empty( $cpt ) && ! is_array( $cpt ) ) { // if an id is passed taxonomy cannot be an array $wp_term = get_term_by( 'id', $args, $cpt ); $tainacan_term = new Entities\Term( $wp_term ); - $tainacan_term->set_user( get_term_meta( $tainacan_term->get_id(), 'user', true ) ); - return $tainacan_term; } else { return [];