PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-widgets / query / term-query-builder.php

term-query-builder.php in Elementor Website Builder – more than just a page builder 4.2.0, at modules/atomic-widgets/query/term-query-builder.php

36 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\AtomicWidgets\Query;
4
5 use Elementor\Modules\WpRest\Base\Query as Query_Base;
6 use Elementor\Modules\WpRest\Classes\Term_Query;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 class Term_Query_Builder extends Query_Builder_Base {
13 public function build(): array {
14 $config = $this->config;
15
16 $params = Term_Query::build_query_params( [
17 Term_Query::KEYS_CONVERSION_MAP_KEY => $config[ Query_Base::KEYS_CONVERSION_MAP_KEY ] ?? null,
18 Term_Query::INCLUDED_TYPE_KEY => $config[ Query_Base::INCLUDED_TYPE_KEY ] ?? null,
19 Term_Query::EXCLUDED_TYPE_KEY => $config[ Query_Base::EXCLUDED_TYPE_KEY ] ?? null,
20 Term_Query::META_QUERY_KEY => $config[ Query_Base::META_QUERY_KEY ] ?? null,
21 Term_Query::IS_PUBLIC_KEY => $config[ Query_Base::IS_PUBLIC_KEY ] ?? null,
22 Term_Query::HIDE_EMPTY_KEY => $config[ Query_Base::HIDE_EMPTY_KEY ] ?? null,
23 Term_Query::ITEMS_COUNT_KEY => $config[ Query_Base::ITEMS_COUNT_KEY ] ?? null,
24 ] );
25
26 $endpoint = $config['endpoint'] ?? Term_Query::ENDPOINT;
27 $namespace = $config['namespace'] ?? Term_Query::NAMESPACE;
28 $url = $namespace . '/' . $endpoint;
29
30 return [
31 'params' => $params,
32 'url' => $url,
33 ];
34 }
35 }
36