REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.85 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/elementskit-lite/libs/framework/classes/onboard-status.php
Text
Base64
<?php namespace ElementsKit_Lite\Libs\Framework\Classes; use ElementsKit_Lite\Traits\Singleton; defined( 'ABSPATH' ) || exit; class Onboard_Status { use Singleton; protected $optionKey = 'elements_kit_onboard_status'; protected $optionValue = 'onboarded'; public function onboard() { add_action( 'elementskit/admin/after_save', array( $this, 'ajax_action' ) ); if ( get_option( $this->optionKey ) ) { return true; } /** * We are checking if the user current page is elementskit and if the user is not completing onboarding, * We are redirecting to the onboarding page. */ // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Checking current page type. The page only can access admin. So nonce verification is not required. $param = isset( $_GET['ekit-onboard-steps'] ) ? sanitize_text_field( wp_unslash( $_GET['ekit-onboard-steps'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Checking current page post_type. The page only can access admin. So nonce verification is not required. $requestUri = ( isset( $_GET['post_type'] ) ? sanitize_text_field( wp_unslash( $_GET['post_type'] ) ) : '' ) . ( isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '' ); if ( strpos( $requestUri, 'elementskit' ) !== false && is_admin() ) { if ( $param !== 'loaded' && ! get_option( $this->optionKey ) ) { wp_safe_redirect( $this->get_onboard_url() ); exit; } } return true; } public function ajax_action() { if( empty( $_POST['nonce'] ) || !wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'ajax-nonce' ) ){ return false; } // finish on-boarding $this->finish_onboard(); if ( ! empty( $_POST['settings']['newsletter_email'] ) && is_email( $_POST['settings']['newsletter_email'] ) ) { $data = array( 'email' => sanitize_email( wp_unslash( $_POST['settings']['newsletter_email'] ) ), 'slug' => 'elementskit-lite', ); $response = Plugin_Data_Sender::instance()->sendEmailSubscribeData( 'plugin-subscribe', $data ); } } private function get_onboard_url() { return add_query_arg( array( 'page' => 'elementskit', 'ekit-onboard-steps' => 'loaded', ), admin_url( 'admin.php' ) ); } public function redirect_onboard() { if ( ! get_option( $this->optionKey ) ) { wp_safe_redirect( $this->get_onboard_url() ); exit; } } public function exit_from_onboard() { if ( get_option( $this->optionKey ) ) { wp_safe_redirect( $this->get_plugin_url() ); exit; } } private static function get_plugin_url() { return add_query_arg( array( 'page' => 'elementskit', ), admin_url( 'admin.php' ) ); } public function finish_onboard() { if ( ! get_option( $this->optionKey ) ) { add_option( $this->optionKey, $this->optionValue ); } } }
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
ajax.php
5.71 KB
lrw-r--r--
2026-04-13 13:57:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
onboard-status.php
2.85 KB
lrw-r--r--
2025-07-14 12:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-data-sender.php
634 B
lrw-r--r--
2025-07-14 12:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-installer.php
3.19 KB
lrw-r--r--
2025-06-24 13:48:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-skin.php
469 B
lrw-r--r--
2025-06-24 13:48:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-status.php
2.98 KB
lrw-r--r--
2022-05-18 20:49:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.php
2.35 KB
lrw-r--r--
2025-02-09 15:37:00
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).