REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.12 KB
Close
/home/nshryvcy/blissfulnepal.com/wp-content/plugins/tlp-team/app/Controllers/Admin/Ajax/Settings.php
Text
Base64
<?php /** * Settings Ajax Class. * * @package RT_Team */ namespace RT\Team\Controllers\Admin\Ajax; use RT\Team\Helpers\Fns; use RT\Team\Helpers\Options; // Do not allow directly accessing this file. if ( ! defined( 'ABSPATH' ) ) { exit( 'This script cannot be accessed directly.' ); } /** * Settings Ajax Class. */ class Settings { use \RT\Team\Traits\SingletonTrait; /** * Class Init. * * @return void */ protected function init() { add_action( 'wp_ajax_tlpTeamSettings', [ $this, 'response' ] ); } /** * Ajax Response. * * @return void */ public function response() { $error = true; $settings = []; if ( ! ( current_user_can( 'manage_options' ) || current_user_can( 'edit_pages' ) ) ) { wp_send_json( [ 'error' => $error, 'msg' => esc_html__( 'Permission denied', 'tlp-team' ), ] ); } if ( wp_verify_nonce( Fns::getNonce(), Fns::nonceText()) ) { $_REQUEST['team-slug'] = isset( $_REQUEST['team-slug'] ) ? sanitize_title_with_dashes( wp_unslash( $_REQUEST['team-slug'] ) ) : 'team'; $options = Options::getAllSettingOptions(); if ( ! empty( $options ) ) { foreach ( $options as $optionId => $option ) { if ( isset( $_REQUEST[ $optionId ] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $settings[ $optionId ] = Fns::sanitize( $option, $_REQUEST[ $optionId ] ); } } } $existing = get_option( rttlp_team()->options['settings'] ); if ( is_array( $existing ) && ! empty( $existing['license_status'] ) ) { $settings['license_status'] = $existing['license_status']; } update_option( rttlp_team()->options['settings'], $settings ); flush_rewrite_rules(); $error = false; $msg = esc_html__( 'Settings successfully updated', 'tlp-team' ); } else { $msg = esc_html__( 'Security Error !!', 'tlp-team' ); } wp_send_json( [ 'error' => $error, 'msg' => $msg, ] ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
DefaultFilter.php
1.70 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Preview.php
39.22 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProfileImage.php
1.41 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Settings.php
2.12 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Shortcode.php
2.53 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Skill.php
2.18 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Social.php
1.87 KB
lrw-r--r--
2026-06-03 14:57:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).