Submit
Path:
~
/
home
/
b
/
f
/
x
/
bfxleof
/
www
/
wp-content
/
plugins
/
duplicator
/
ctrls
/
File Content:
ctrl.ui-20260622095049.php
<?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; // Exit if accessed directly if (! defined('DUPLICATOR_VERSION')) exit; require_once(DUPLICATOR_PLUGIN_PATH . '/ctrls/ctrl.base.php'); require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.viewstate.php'); /** * Controller for Tools * @package Duplicator\ctrls */ class DUP_CTRL_UI extends DUP_CTRL_Base { function __construct() { add_action('wp_ajax_DUP_CTRL_UI_SaveViewState', array($this, 'SaveViewState')); } /** * Calls the SaveViewState and returns a JSON result * * @param string $_POST['key'] A unique key that identifies the state of the UI element * @param bool $_POST['value'] The value to store for the state of the UI element * * @notes: Testing: See Testing Interface * URL = /wp-admin/admin-ajax.php?action=DUP_CTRL_UI_SaveViewState * * <code> * //JavaScript Ajax Request * Duplicator.UI.SaveViewState('dup-pack-archive-panel', 1); * * //Call PHP Code * $view_state = DUP_UI_ViewState::getValue('dup-pack-archive-panel'); * $ui_css_archive = ($view_state == 1) ? 'display:block' : 'display:none'; * </code> */ public function SaveViewState() { DUP_Handler::init_error_handler(); check_ajax_referer('DUP_CTRL_UI_SaveViewState', 'nonce'); DUP_Util::hasCapability('export'); $payload = array( 'success' => false, 'message' => '', 'key' => '', 'value' => '' ); $isValid = true; $inputData = filter_input_array(INPUT_POST, array( 'states' => array( 'filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FORCE_ARRAY, 'options' => array( 'default' => array() ) ), 'key' => array( 'filter' => FILTER_SANITIZE_STRING, 'options' => array( 'default' => false ) ), 'value' => array( 'filter' => FILTER_SANITIZE_STRING, 'options' => array( 'default' => false ) ) )); if (is_array($inputData) && is_array($inputData['states'])) { foreach ($inputData['states'] as $index => $state) { $filteredState = filter_var_array($state, array( 'key' => array( 'filter' => FILTER_SANITIZE_STRING, 'options' => array( 'default' => false ) ), 'value' => array( 'filter' => FILTER_SANITIZE_STRING, 'options' => array( 'default' => false ) ) )); if ($filteredState['key'] === false && $filteredState['value']) { $isValid = false; break; } $inputData['states'][$index] = $filteredState; } } if ($inputData['key'] === false || $inputData['value'] === false) { $isValid = false; } $result = new DUP_CTRL_Result($this); try { if (!$isValid) { throw new Exception(__('Invalid Request.', 'duplicator')); } if (!empty($inputData['states'])) { $view_state = DUP_UI_ViewState::getArray(); $last_key = ''; foreach ($inputData['states'] as $state) { $view_state[$state['key']] = $state['value']; $last_key = $state['key']; } $payload['success'] = DUP_UI_ViewState::setArray($view_state); $payload['key'] = esc_html($last_key); $payload['value'] = esc_html($view_state[$last_key]); } else { $payload['success'] = DUP_UI_ViewState::save($inputData['key'], $inputData['value']); $payload['key'] = esc_html($inputData['key']); $payload['value'] = esc_html($inputData['value']); } //RETURN RESULT $test = ($payload['success']) ? DUP_CTRL_Status::SUCCESS : DUP_CTRL_Status::FAILED; return $result->process($payload, $test); } catch (Exception $exc) { $result->processError($exc); } } /** * Returns a JSON list of all saved view state items * * * <code> * See SaveViewState() * </code> */ public function GetViewStateList() { $result = new DUP_CTRL_Result($this); try { //CONTROLLER LOGIC $payload = DUP_UI_ViewState::getArray(); //RETURN RESULT $test = (is_array($payload) && count($payload)) ? DUP_CTRL_Status::SUCCESS : DUP_CTRL_Status::FAILED; return $result->process($payload, $test); } catch (Exception $exc) { $result->processError($exc); } } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
.DS_Store
10234 bytes
0644
20200616130143_ReplacePermalinkHashIndex.php
2293 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream-20260707162816.php
4209 bytes
0644
LimitStream.php
4209 bytes
0644
README.md
2555 bytes
0644
Revisions.php
6508 bytes
0644
class-admin-utils-20260623161956.php
2147 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-collector-20260707073754.php
984 bytes
0644
class-collector.php
984 bytes
0644
class-helpscout.php
6972 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-option-tabs-formatter-20260704171040.php
2321 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-premium-upsell-admin-block.php
3631 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-tracking-server-data-20260706064343-20260707003656.php
1989 bytes
0644
class-tracking-server-data-20260706064343.php
1989 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-notification-center.php
23601 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.archive.config.php
1364 bytes
0644
class.pack.database-20260705133709.php
30838 bytes
0644
class.pack.database.php
30838 bytes
0644
class.password.php
6377 bytes
0644
class.snaplib.u.net.php
1831 bytes
0644
class.u.shell.php
1322 bytes
0644
class.web.services-20260622005117-20260622034908.php
7748 bytes
0644
class.web.services-20260622005117.php
7748 bytes
0644
class.web.services.php
7748 bytes
0644
controller.php
2441 bytes
0644
ctrl.base-20260622091235.php
3869 bytes
0644
ctrl.package-20260622170118.php
17073 bytes
0644
ctrl.package.php
17073 bytes
0644
ctrl.tools-20260622110042.php
4388 bytes
0644
ctrl.ui-20260622095049.php
5346 bytes
0644
dashboard-1650-rtl.css
1634 bytes
0644
deactivation.php
21118 bytes
0644
define.php
4567 bytes
0644
duplicator-20260622023227-20260703062123.php
1781 bytes
0644
duplicator-20260622023227.php
1781 bytes
0644
duplicator-20260622115142.php
1781 bytes
0644
duplicator-main-20260623075307.php
26907 bytes
0644
duplicator-main.php
26907 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderSession.php
8764 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260705194237.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260706065050.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
helper.php
6192 bytes
0644
image-helper-20260704124927.php
10231 bytes
0644
image-helper.php
10231 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
157663 bytes
0644
javascript.php
11782 bytes
0644
loco-20260622141322.php
5626 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager-20260705035639.php
14659 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module-20260705180729-20260707003540.php
1297 bytes
0644
module-20260705180729.php
1297 bytes
0644
module.php
1297 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
recovery.php
1146 bytes
0644
root.php
1951 bytes
0644
setup.php
2699 bytes
0644
social.php
725 bytes
0644
uninstall-20260622162039.php
4401 bytes
0644
uninstall.php
4401 bytes
0644
wordpress-seo-es_ES-20260708002629.json
25583 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_ES.json
20568 bytes
0644
wordpress-seojs-fi.json
19387 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
N4ST4R_ID | Naxtarrr