@@ 693-700 (lines=8) @@ | ||
690 | 'default' => array(), |
|
691 | 'sanitize_callback' => 'wp_parse_id_list', |
|
692 | ); |
|
693 | if ( ! $taxonomy->hierarchical ) { |
|
694 | $params['offset'] = array( |
|
695 | 'description' => __( 'Offset the result set by a specific number of items.', 'woocommerce' ), |
|
696 | 'type' => 'integer', |
|
697 | 'sanitize_callback' => 'absint', |
|
698 | 'validate_callback' => 'rest_validate_request_arg', |
|
699 | ); |
|
700 | } |
|
701 | $params['order'] = array( |
|
702 | 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), |
|
703 | 'type' => 'string', |
|
@@ 734-741 (lines=8) @@ | ||
731 | 'default' => false, |
|
732 | 'validate_callback' => 'rest_validate_request_arg', |
|
733 | ); |
|
734 | if ( $taxonomy->hierarchical ) { |
|
735 | $params['parent'] = array( |
|
736 | 'description' => __( 'Limit result set to resources assigned to a specific parent.', 'woocommerce' ), |
|
737 | 'type' => 'integer', |
|
738 | 'sanitize_callback' => 'absint', |
|
739 | 'validate_callback' => 'rest_validate_request_arg', |
|
740 | ); |
|
741 | } |
|
742 | $params['product'] = array( |
|
743 | 'description' => __( 'Limit result set to resources assigned to a specific product.', 'woocommerce' ), |
|
744 | 'type' => 'integer', |