Changes fields and filters order types

This commit is contained in:
weryques 2018-04-04 09:52:31 -03:00
parent 90e83399a1
commit 110066a85a
2 changed files with 5 additions and 2 deletions

View File

@ -244,6 +244,7 @@ class TAINACAN_REST_Controller extends WP_REST_Controller {
* @param $args * @param $args
* *
* @return mixed * @return mixed
* @throws Exception
*/ */
private function prepare_meta($mapped, $request, $query, $mapped_v, $args){ private function prepare_meta($mapped, $request, $query, $mapped_v, $args){
$request_meta_query = $request[$mapped]; $request_meta_query = $request[$mapped];

View File

@ -138,14 +138,16 @@ class Collections extends Repository {
'fields_order' => [ 'fields_order' => [
'map' => 'meta', 'map' => 'meta',
'title' => __( 'Ordination fields', 'tainacan' ), 'title' => __( 'Ordination fields', 'tainacan' ),
'type' => 'array', 'type' => 'array/object/string',
'items' => ['type' => 'array/string/integer/object'],
'description' => __( 'Collection fields ordination', 'tainacan' ), 'description' => __( 'Collection fields ordination', 'tainacan' ),
//'validation' => v::stringType(), //'validation' => v::stringType(),
], ],
'filters_order' => [ 'filters_order' => [
'map' => 'meta', 'map' => 'meta',
'title' => __( 'Ordination filters', 'tainacan' ), 'title' => __( 'Ordination filters', 'tainacan' ),
'type' => 'array', 'type' => 'array/object/string',
'items' => ['type' => 'array/string/integer/object'],
'description' => __( 'Collection filters ordination', 'tainacan' ), 'description' => __( 'Collection filters ordination', 'tainacan' ),
//'validation' => v::stringType(), //'validation' => v::stringType(),
], ],