403Webshell
Server IP : 43.130.17.34  /  Your IP : 216.73.217.6
Web Server : nginx/1.28.0
System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64
User : www ( 1000)
PHP Version : 8.0.26
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/yespkg.com/wp-content/plugins/wpforms/src/Pro/Admin/Builder/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/yespkg.com/wp-content/plugins/wpforms/src/Pro/Admin/Builder/LicenseAlert.php
<?php

namespace WPForms\Pro\Admin\Builder;

/**
 * Form Builder License alert/overlay.
 *
 * @since 1.5.7
 */
class LicenseAlert {

	/**
	 * License type slug.
	 *
	 * @since 1.5.7
	 *
	 * @var string
	 */
	public $license_type;

	/**
	 * License is expired.
	 *
	 * @since 1.5.7
	 *
	 * @var bool
	 */
	public $license_is_expired;

	/**
	 * Constructor.
	 *
	 * @since 1.5.7
	 */
	public function __construct() {

		$this->hooks();
	}

	/**
	 * Hooks.
	 *
	 * @since 1.5.7
	 */
	public function hooks() {

		// Only proceed for the form builder.
		if ( ! wpforms_is_admin_page( 'builder' ) ) {
			return;
		}

		// Load license information.
		$this->license_type       = wpforms_get_license_type();
		$this->license_is_expired = (bool) wpforms_setting( 'is_expired', false, 'wpforms_license' );

		add_action( 'wpforms_admin_page', [ $this, 'output' ], 1 );
	}

	/**
	 * Output license alert overlay.
	 *
	 * @since 1.5.7
	 */
	public function output() {

		$data = $this->get_alert_data();

		if ( empty( $data ) || isset( $_COOKIE['wpforms-builder-license-alert'] ) ) {
			return;
		}

		printf(
			'<div id="wpforms-builder-license-alert" class="wpforms-fullscreen-notice">
				<img src="%1$s" class="sullie-icon" alt="WPForms Logo" />
				<h3>%2$s</h3>
				<p>%3$s</p>
				<div class="wpforms-fullscreen-notice-buttons">
					<a href="%4$s" class="wpforms-fullscreen-notice-button wpforms-fullscreen-notice-button-primary">%5$s</a>
					<a href="%6$s" class="wpforms-fullscreen-notice-button wpforms-fullscreen-notice-button-secondary">%7$s</a>
					<button type="button" class="%8$s"><span class="screen-reader-text">%9$s</span></button>
				</div>
			</div>',
			esc_url( WPFORMS_PLUGIN_URL . 'assets/images/sullie-builder-mobile.png' ),
			esc_html( $data['heading'] ),
			esc_html( $data['description'] ),
			esc_url( $data['button-primary-url'] ),
			esc_html( $data['button-primary'] ),
			esc_url( $data['button-secondary-url'] ),
			esc_html( $data['button-secondary'] ),
			sanitize_html_class( $data['button-x-class'] ),
			esc_html( $data['button-x'] )
		);
	}

	/**
	 * Prepare alert data.
	 *
	 * @since 1.5.7
	 *
	 * @return array Data for output in the alert overlay.
	 */
	public function get_alert_data() {

		$data = [];

		if ( ! empty( $this->license_type ) && empty( $this->license_is_expired ) ) {
			return $data;
		}

		// License is expired.
		if ( $this->license_is_expired && ! empty( $this->license_type ) ) {

			$data['button-primary-url']   = add_query_arg(
				[
					'utm_source'   => 'WordPress',
					'utm_medium'   => 'Form Builder Overlay',
					'utm_campaign' => 'plugin',
					'utm_content'  => 'Renew Now',
				],
				'https://wpforms.com/account/licenses/'
			);
			$data['button-secondary-url'] = add_query_arg(
				[
					'utm_source'   => 'WordPress',
					'utm_medium'   => 'Form Builder Overlay',
					'utm_campaign' => 'plugin',
					'utm_content'  => 'Learn More',
				],
				'https://wpforms.com/docs/how-to-renew-your-wpforms-license/'
			);
			$data['heading']              = __( 'Heads up! Your WPForms license has expired.', 'wpforms' );
			$data['description']          = __( 'An active license is needed to access new features & addons, plugin updates (including security improvements), and our world class support!', 'wpforms' );
			$data['button-primary']       = __( 'Renew Now', 'wpforms' );
			$data['button-secondary']     = __( 'Learn More', 'wpforms' );
			$data['button-x']             = __( 'Dismiss', 'wpforms' );
			$data['button-x-class']       = 'dismiss';

			return $data;
		}

		// No license.
		if (
			empty( $this->license_type ) &&
			wp_count_posts( 'wpforms' )->publish >= 1 &&
			// phpcs:ignore WordPress.Security.NonceVerification.Recommended
			( ! isset( $_GET['view'] ) || $_GET['view'] === 'setup' )
		) {

			$query_vars['utm_content'] = 'Get WPForms Pro';

			$data['button-primary-url']   = admin_url( 'admin.php?page=wpforms-settings' );
			$data['button-secondary-url'] = add_query_arg(
				[
					'utm_source'   => 'WordPress',
					'utm_medium'   => 'Form Builder Overlay',
					'utm_campaign' => 'plugin',
					'utm_content'  => 'Learn More',
				],
				'https://wpforms.com/pricing/'
			);
			$data['heading']              = __( 'Heads up! A WPForms license key is required.', 'wpforms' );
			$data['description']          = __( 'To create more forms, please verify your WPForms license.', 'wpforms' );
			$data['button-primary']       = __( 'Enter License Key', 'wpforms' );
			$data['button-secondary']     = __( 'Get WPForms Pro', 'wpforms' );
			$data['button-x']             = __( 'Close', 'wpforms' );
			$data['button-x-class']       = 'close';
		}

		return $data;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit