GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/parhudrw/roflma.it/wp-content/plugins/lesya-plugin/admin/dashboard-theme-helper.php
<?php

/* Theme Info Class */
if ( ! function_exists( 'lesya_theme_info' ) ) {
  function lesya_theme_info() {
    $data = array();

    $theme = wp_get_theme();
    $theme_parent = $theme->parent();
    if ( !empty( $theme_parent ) ) {
      $theme = $theme_parent;
    }
    $data['slug'] = $theme->get_stylesheet();
    $data['name'] = $theme[ 'Name' ];
    $data['version'] = $theme[ 'Version' ];
    $data['author'] = $theme[ 'Author' ];
    $data['is_child'] = ! empty( $theme_parent );

    return $data;
  }
}
if ( ! class_exists( 'LesyaThemeInfo' ) ) {
  class LesyaThemeInfo {

    private static $_instance = null;

    public $slug;

    public $name;

    public $version;

    public $author;

    public $is_child;

    public static function instance() {
			if ( is_null( self::$_instance ) ) {
				self::$_instance = new self();
				self::$_instance->init();
			}
			return self::$_instance;
		}

    public function __construct() {

		}

    public function init() {
      $theme = wp_get_theme();
      $theme_parent = $theme->parent();
      if ( !empty( $theme_parent ) ) {
        $theme = $theme_parent;
      }

      $this->slug = $theme->get_stylesheet();
      $this->name = $theme[ 'Name' ];
      $this->version = $theme[ 'Version' ];
      $this->author = $theme[ 'Author' ];
      $this->is_child = ! empty( $theme_parent );
    }
  }
}

function lesya_theme_info() {
  return LesyaThemeInfo::instance();
}
add_action( 'init', 'lesya_theme_info' );

/* Plugin Info Class */
if ( ! class_exists( 'LesyaPluginInfo' ) ) {
  class LesyaPluginInfo {

    private static $_instance = null;

    public $name;

    public $version;

    public $author;

    public $slug;

    public $capability;

    public $dashboard_uri;

    public static function instance() {
			if ( is_null( self::$_instance ) ) {
				self::$_instance = new self();
				self::$_instance->init();
			}
			return self::$_instance;
		}

    public function __construct() {

		}

    public function init() {
      $plugin = LesyaPlugin::get_plugin_info();
      $status = get_option( 'Lesya_lic_Status' );

      $this->name = $plugin['Name'];
      $this->version = $plugin['Version'];
      $this->author = $plugin[ 'Author' ];
      $this->slug = 'lesya-plugin';
      $this->capability = ( $status == 'active' ) ? 'extended' : 'normal';
      $this->dashboard_uri = plugin_dir_url( __FILE__ );
    }
  }
}

function lesya_plugin_info() {
  return LesyaPluginInfo::instance();
}
add_action( 'plugins_loaded', 'lesya_plugin_info' );

/* Activation Notice */
if ( ! function_exists( 'lesya_theme_activation_notice' ) ) {
	function lesya_theme_activation_notice() {
    // Return early if the nag message has been dismissed or user < author.
    if ( get_user_meta( get_current_user_id(), 'lesya_dismissed_notice', true ) || ! current_user_can( apply_filters( 'lesya_show_admin_notice_capability', 'publish_posts' ) ) ) {
      return;
    }
	?>
		<div class="notice notice-warning is-dismissible">
			<p><?php echo wp_kses_post( 'Please activate Lesya theme to unlock all features: premium support and receive all future theme updates automatically!', 'lesya-plugin' ); ?></p>
      <p>
        <a href="<?php echo admin_url( 'admin.php?page=lesya-theme-activation' ); ?>" class="button button-primary"><?php echo esc_html__( 'Activate Now', 'lesya-plugin' ); ?></a>
        <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'lesya-dismiss', 'dismiss_admin_notices' ), 'lesya-dismiss-' . get_current_user_id() ) ); ?>" class="dismiss-notice" target="_parent"><?php echo esc_html__( 'Dismiss this notice', 'lesya-plugin' ); ?></a>
      </p>
		</div>
	<?php
	}
}

/* Activation Filter */
if ( ! function_exists( 'lesya_is_theme_activated' ) ) {
	function lesya_is_theme_activated() {
		return apply_filters( 'lesya/is_theme_activated', false );
	}
}