403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
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,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.3/wp-content/plugins/wpforms-lite/src/Admin/Education/Pointers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.3/wp-content/plugins/wpforms-lite/src/Admin/Education/Pointers/Payment.php
<?php

namespace WPForms\Admin\Education\Pointers;

use WPForms\Integrations\Stripe;
use WPForms\Admin\Payments\Views\Overview\Page as PaymentsPage;
use WPForms\Migrations\Base as MigrationsBase;

/**
 * Education class for handling Payments education pointer functionality.
 *
 * This class extends the abstract Pointers class and provides functionality
 * specific to the Payments feature in WPForms.
 *
 * @since 1.8.8
 */
class Payment extends Pointer {

	/**
	 * Unique ID for the pointer.
	 *
	 * @since 1.8.8
	 *
	 * @var string
	 */
	protected $pointer_id = 'admin_menu_payments';

	/**
	 * Selector for the pointer.
	 *
	 * @since 1.8.8
	 *
	 * @var string
	 */
	protected $selector = '[href$="-payments"]';

	/**
	 * Make sure that the pointer is visible across other dashboard pages.
	 *
	 * @since 1.8.8
	 *
	 * @var bool
	 */
	protected $top_level_visible = true;

	/**
	 * Determine if the Payments feature pointer is allowed to load.
	 *
	 * Checks various conditions to determine if the Payments feature pointer
	 * should be allowed to load for the current user.
	 *
	 * @since 1.8.8
	 *
	 * @return bool
	 */
	protected function allow_load(): bool {

		// Bail early if the user doesn't have a Lite, Basic, or Plus license.
		if ( ! in_array( $this->get_license_type(), [ 'lite', 'basic', 'plus' ], true ) ) {
			return false;
		}

		// Bail early if it has been less than 90 days since activation or the installation wasn't upgraded.
		if (
			! get_option( MigrationsBase::PREVIOUS_CORE_VERSION_OPTION_NAME ) ||
			wpforms_get_activated_timestamp() > ( time() - 90 * DAY_IN_SECONDS )
		) {
			return false;
		}

		// Bail early if a Stripe account is connected.
		if ( Stripe\Helpers::has_stripe_keys() ) {
			return false;
		}

		// Bail early if the user doesn't have the capability to manage options.
		if ( ! wpforms_current_user_can() ) {
			return false;
		}

		// Bail early if there are no published forms.
		$forms_obj = wpforms()->obj( 'form' );

		return $forms_obj && $forms_obj->forms_exist();
	}

	/**
	 * Enqueue assets for the pointer.
	 *
	 * @since 1.8.8
	 */
	public function enqueue_assets() {

		// Enqueue the pointer static assets.
		parent::enqueue_assets();

		$min = wpforms_get_min_suffix();

		wp_enqueue_script(
			'wpforms-education-pointers-payment',
			WPFORMS_PLUGIN_URL . "assets/js/admin/education/pointers/payment{$min}.js",
			[ 'wp-pointer' ],
			WPFORMS_VERSION,
			true
		);

		$admin_l10n = [
			'pointer' => sanitize_key( $this->pointer_id ),
			'nonce'   => sanitize_text_field( $this->get_nonce_token() ),
		];

		wp_localize_script(
			'wpforms-education-pointers-payment',
			'wpforms_education_pointers_payment',
			$admin_l10n
		);
	}

	/**
	 * Set arguments for the Payments feature pointer.
	 *
	 * @since 1.8.8
	 *
	 * @noinspection HtmlUnknownTarget
	 */
	protected function set_args() {

		$this->args['title']   = __( 'Payment and Donation Forms are here!', 'wpforms-lite' );
		$this->args['message'] = sprintf( /* translators: %1$s - Payments page URL. */
			__(
				'Now available for you: create forms that accept credit cards, Apple Pay, and Google Pay payments. Visit our new <a href="%1$s" id="wpforms-education-pointers-payments">Payments area</a> to get started.',
				'wpforms-lite'
			),
			esc_url( PaymentsPage::get_url() )
		);
	}

	/**
	 * Retrieve the current installation license type in the lowercase.
	 * If no license type is found, defaults to 'lite'.
	 *
	 * @since 1.8.8
	 *
	 * @return string
	 */
	private function get_license_type(): string {

		$type = wpforms_get_license_type();

		// Set the default to 'lite' if no license type is detected.
		if ( empty( $type ) ) {
			$type = 'lite';
		}

		return $type;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit