HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/zenoxpressjobs.com/jobs.html/wp-content/plugins/shopengine/core/settings/action.php
<?php

namespace ShopEngine\Core\Settings;

defined('ABSPATH') || exit;

use ShopEngine\Core\Onboard\Onboard;
use ShopEngine\Core\Register\Module_List;
use ShopEngine\Core\Register\Widget_List;
use ShopEngine\Traits\Singleton;

/**
 * Action Class.
 * for post insert, update and get data.
 *
 * @since 1.0.0
 */
class Action
{
	use Singleton;
	private $response = [];
	/**
	 * Public function __construct.
	 * call function for all
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
		$this->response = [
			'saved'  => false,
			'status' => esc_html__("Something went wrong.", 'shopengine'),
			'data'   => [],
		];
	}

	/**
	 * Public function store.
	 * store data for post
	 *
	 * @since 1.0.0
	 */
	public function get_fields() {

		$data = [
			'widgets'         => [],
			'modules'         => [],
			'userdata'        => [],
			'on_board'        => [
				'status'	=> get_option(Onboard::STATUS),
				'old_user'  => get_option('shopengine_db_settings') ? true : false,
			],
			'languages'       => apply_filters('shopengine_multi_language', ['status' => false, 'lang_items' => []]),
			'dataSetting'	  => "Basic"
		];

		$data['widgets'] = Widget_List::instance()->get_list(true, 'unfiltered');
		$data['modules'] = Module_List::instance()->get_list(true, 'unfiltered');

		return $data;
	}

	/**
	 * Public function store.
	 * store data for post
	 *
	 * @since 1.0.0
	 */
	public function get_data() {

		$data = [
			'widgets'  => [],
			'modules'  => [],
			'userdata' => []
		];

		$data['widgets'] = Widget_List::instance()->get_list();
		$data['modules'] = Module_List::instance()->get_list();

		return $data;
	}
}