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/www/wp-content/plugins/around-elementor/around-elementor.php
<?php
/**
 * Plugin Name: Around Elementor
 * Description: Elementor Extensions built for Around Multipurpose Business WordPress Theme
 * Plugin URI:  https://themeforest.net/user/madrasthemes/portfolio
 * Version:     1.0.9
 * Author:      MadrasThemes
 * Elementor tested up to: 3.6.0
 * Author URI:  https://madrasthemes.com/
 * Text Domain: around-elementor
 */

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

define( 'AROUND_ELEMENTOR_VERSION', '0.0.293' );
define( 'AROUND_ELEMENTOR_PREVIOUS_STABLE_VERSION', '0.0.293' );

define( 'AROUND_ELEMENTOR__FILE__', __FILE__ );
define( 'AROUND_ELEMENTOR_PLUGIN_BASE', plugin_basename( AROUND_ELEMENTOR__FILE__ ) );
define( 'AROUND_ELEMENTOR_PATH', plugin_dir_path( AROUND_ELEMENTOR__FILE__ ) );
define( 'AROUND_ELEMENTOR_ASSETS_PATH', AROUND_ELEMENTOR_PATH . 'assets/' );
define( 'AROUND_ELEMENTOR_MODULES_PATH', AROUND_ELEMENTOR_PATH . 'modules/' );
define( 'AROUND_ELEMENTOR_INCLUDES_PATH', AROUND_ELEMENTOR_PATH . 'includes/' );
define( 'AROUND_ELEMENTOR_TEMPLATES_PATH', AROUND_ELEMENTOR_PATH . 'templates/' );
define( 'AROUND_ELEMENTOR_URL', plugins_url( '/', AROUND_ELEMENTOR__FILE__ ) );
define( 'AROUND_ELEMENTOR_ASSETS_URL', AROUND_ELEMENTOR_URL . 'assets/' );
define( 'AROUND_ELEMENTOR_MODULES_URL', AROUND_ELEMENTOR_URL . 'modules/' );
define( 'AROUND_ELEMENTOR_INCLUDES_URL', AROUND_ELEMENTOR_URL . 'includes/' );

/**
 * Load gettext translate for our text domain.
 *
 * @since 1.0.0
 *
 * @return void
 */
function around_elementor_load_plugin() {
	load_plugin_textdomain( 'around-elementor' );

	if ( ! did_action( 'elementor/loaded' ) ) {
		add_action( 'admin_notices', 'around_elementor_fail_load' );

		return;
	}

	$elementor_version_required = '3.0.0';
	if ( ! version_compare( ELEMENTOR_VERSION, $elementor_version_required, '>=' ) ) {
		add_action( 'admin_notices', 'around_elementor_fail_load_out_of_date' );

		return;
	}

	$elementor_version_recommendation = '3.0.0';
	if ( ! version_compare( ELEMENTOR_VERSION, $elementor_version_recommendation, '>=' ) ) {
		add_action( 'admin_notices', 'around_elementor_admin_notice_upgrade_recommendation' );
	}

	require AROUND_ELEMENTOR_PATH . 'plugin.php';
}

add_action( 'plugins_loaded', 'around_elementor_load_plugin' );

/**
 * Show in WP Dashboard notice about the plugin is not activated.
 *
 * @since 1.0.0
 *
 * @return void
 */
function around_elementor_fail_load() {
	$screen = get_current_screen();
	if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
		return;
	}

	$plugin = 'elementor/elementor.php';

	if ( _is_elementor_installed() ) {
		if ( ! current_user_can( 'activate_plugins' ) ) {
			return;
		}

		$activation_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );

		$message  = '<p>' . esc_html__( 'Around Elementor is not working because you need to activate the Elementor plugin.', 'around-elementor' ) . '</p>';
		$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, esc_html__( 'Activate Elementor Now', 'around-elementor' ) ) . '</p>';
	} else {
		if ( ! current_user_can( 'install_plugins' ) ) {
			return;
		}

		$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );

		$message  = '<p>' . esc_html__( 'Around Elementor is not working because you need to install the Elementor plugin.', 'around-elementor' ) . '</p>';
		$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, esc_html__( 'Install Elementor Now', 'around-elementor' ) ) . '</p>';
	}

	echo '<div class="error"><p>' . wp_kses_post( $message ) . '</p></div>';
}

/**
 * Display error message if using out of date Elementor.
 */
function around_elementor_fail_load_out_of_date() {
	if ( ! current_user_can( 'update_plugins' ) ) {
		return;
	}

	$file_path = 'elementor/elementor.php';

	$upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path );
	$message      = '<p>' . esc_html__( 'Around Elementor is not working because you are using an old version of Elementor.', 'around-elementor' ) . '</p>';
	$message     .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $upgrade_link, esc_html__( 'Update Elementor Now', 'around-elementor' ) ) . '</p>';

	echo '<div class="error">' . wp_kses_post( $message ) . '</div>';
}

/**
 * Display error message to update Elementor.
 */
function around_elementor_admin_notice_upgrade_recommendation() {
	if ( ! current_user_can( 'update_plugins' ) ) {
		return;
	}

	$file_path = 'elementor/elementor.php';

	$upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path );
	$message      = '<p>' . esc_html__( 'A new version of Elementor is available. For better performance and compatibility of Around Elementor, we recommend updating to the latest version.', 'around-elementor' ) . '</p>';
	$message     .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $upgrade_link, esc_html__( 'Update Elementor Now', 'around-elementor' ) ) . '</p>';

	echo '<div class="error">' . wp_kses_post( $message ) . '</div>';
}

if ( ! function_exists( '_is_elementor_installed' ) ) {
	/**
	 * Check if Elementor is installed.
	 *
	 * @return bool
	 */
	function _is_elementor_installed() {
		$file_path         = 'elementor/elementor.php';
		$installed_plugins = get_plugins();

		return isset( $installed_plugins[ $file_path ] );
	}
}