HEX
Server: Apache
System: Linux hn220.greenhost.nl 6.12.58 #3 SMP Wed Nov 19 09:04:59 UTC 2025 x86_64
User: webmaster (87278)
PHP: 8.4.5
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /domains/pleunperspective.com/DEFAULT/wp-content/plugins/elementor/modules/feedback/module.php
<?php

namespace Elementor\Modules\Feedback;

use Elementor\Core\Base\Module as Module_Base;
use Elementor\Modules\Feedback\Data\Controller;
use Elementor\Plugin;
use Elementor\Api;
use Elementor\Core\Common\Modules\Connect\Rest\Rest_Api;
use Elementor\Utils;
use http\Cookie as HttpCookie;
use WP_Http_Cookie;
use WpOrg\Requests\Cookie;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Module extends Module_Base {

	public function __construct() {
		add_action( 'rest_api_init', fn() => self::register_routes() );
	}

	protected function register_routes() {
		register_rest_route( 'elementor/v1/feedback', '/submit', [
			'methods' => 'POST',
			'callback' => fn( $request ) => $this->handle_submit( $request ),
			'permission_callback' => '__return_true',
		] );
	}

	protected function handle_submit( $request, $additional_cookies = [] ) {
		$user_meta = get_user_meta( get_current_user_id(), 'wp_elementor_connect_common_data' );
		$app = Plugin::$instance->common->get_component( 'connect' )->get_app( 'feedback' );
		$body = [
			'title' => 'Editor Feedback',
			'description' => $request->get_param( 'description' ),
			'product' => 'EDITOR',
			'subject' => 'Editor Feedback',
		];

		$response = $app->submit( $body );
		$response_code = $response['response']['code'];
		if ( 'OK' === $response['response']['message'] ) {
			return [
				'success' => true,
				'code' => $response_code,
				'message' => esc_html__( 'Feedback submitted successfully.', 'elementor' ),
			];
		} else {
			$message = $response['data']['message'] ?? esc_html__( 'Failed to submit feedback.', 'elementor' );
			return [
				'success' => false,
				'code' => $response_code,
				'message' => $message,
			];
		}
	}
	/**
	 * Retrieve the module name.
	 *
	 * @return string
	 */
	public function get_name() {
		return 'feedback';
	}
}