[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-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
/
modules
/
wp-rest
/
classes
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 elementor-post-meta.php
4,037 B
SET
[ EDIT ]
|
[ DEL ]
📄 elementor-settings.php
2,592 B
SET
[ EDIT ]
|
[ DEL ]
📄 elementor-user-meta.php
1,241 B
SET
[ EDIT ]
|
[ DEL ]
📄 post-query.php
7,067 B
SET
[ EDIT ]
|
[ DEL ]
📄 term-query.php
6,291 B
SET
[ EDIT ]
|
[ DEL ]
📄 user-query.php
3,811 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: elementor-user-meta.php
<?php namespace Elementor\Modules\WpRest\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Elementor_User_Meta { private function get_meta_config(): array { return [ 'elementor_introduction' => [ 'schema' => [ 'description' => 'Elementor user meta data', 'type' => 'object', 'properties' => [ 'ai_get_started' => [ 'type' => 'boolean', ], ], 'additionalProperties' => true, 'context' => [ 'view', 'edit' ], ], ], ]; } public function register(): void { foreach ( $this->get_meta_config() as $key => $config ) { $config['get_callback'] = function( $user, $field_name, $request ) { return get_user_meta( $user['id'], $field_name, true ); }; $config['update_callback'] = function( $meta_value, \WP_User $user, $field_name, $request ) { if ( 'PATCH' === $request->get_method() ) { $existing = get_user_meta( $user->ID, $field_name, true ); if ( is_array( $existing ) && is_array( $meta_value ) ) { $meta_value = array_merge( $existing, $meta_value ); } } return update_user_meta( $user->ID, $field_name, $meta_value ); }; register_rest_field( 'user', $key, $config ); } } }