$64 GRAYBYTE WORDPRESS FILE MANAGER $19

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.fpt.auto/wp-content/plugins/elementor-pro/modules/posts/data/

HOME
Current File : /home/bqrcodec/contact.fpt.auto/wp-content/plugins/elementor-pro/modules/posts/data//controller.php
<?php
namespace ElementorPro\Modules\Posts\Data;

use Elementor\Utils;
use ElementorPro\Data\Base\Controller as Controller_Base;
use ElementorPro\Plugin;

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

class Controller extends Controller_Base {

	public function get_name() {
		return 'posts-widget';
	}

	public function register_endpoints() {
		// There is only get items end point
	}

	public function get_items( $request ) {
		$document = Plugin::elementor()->documents->get( $request->get_param( 'post_id' ) );

		if ( ! $document ) {
			return new \WP_Error(
				'document_not_exist',
				__( 'Document doesn\'t exist', 'elementor-pro' ),
				[ 'status' => 404 ]
			);
		}

		$element_data = $document->get_elements_data();
		$posts_widget = Utils::find_element_recursive( $element_data, $request->get_param( 'element_id' ) );

		if ( empty( $posts_widget ) ) {
			return new \WP_Error(
				'Element_not_exist',
				__( 'Posts widget doesn\'t exist', 'elementor-pro' ),
				[ 'status' => 404 ]
			);
		}

		set_query_var( 'paged', $request->get_param( 'page' ) );

		/** @var \ElementorPro\Modules\Posts\Widgets\Posts $element_instance */
		$element_instance = Plugin::elementor()->elements_manager->create_element_instance( $posts_widget );

		ob_start();
		$element_instance->render_content();
		$html = ob_get_clean();

		return [
			'content' => $html,
		];
	}

	public function get_permission_callback( $request ) {
		return true;
	}
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
30 Jan 2024 5.36 PM
bqrcodec / bqrcodec
0755
controller.php
1.438 KB
30 Jan 2024 5.36 PM
bqrcodec / bqrcodec
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF