=' ) ) { add_action( 'admin_notices', 'elementor_pro_fail_load_out_of_date' ); return; } if ( ! elementor_pro_compare_major_version( $core_version, $core_version_recommended, '>=' ) ) { add_action( 'admin_notices', 'elementor_pro_admin_notice_upgrade_recommendation' ); } require ELEMENTOR_PRO_PATH . 'plugin.php'; } function elementor_pro_compare_major_version( $left, $right, $operator ) { $pattern = '/^(\d+\.\d+).*/'; $replace = '$1.0'; $left = preg_replace( $pattern, $replace, $left ); $right = preg_replace( $pattern, $replace, $right ); return version_compare( $left, $right, $operator ); } add_action( 'plugins_loaded', 'elementor_pro_load_plugin' ); function print_error( $message ) { if ( ! $message ) { return; } // PHPCS - $message should not be escaped echo '
' . $message . '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Show in WP Dashboard notice about the plugin is not activated. * * @since 1.0.0 * * @return void */ function elementor_pro_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&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin ); $message = '

' . esc_html__( 'You\'re not using Elementor Pro yet!', 'elementor-pro' ) . '

'; $message .= '

' . esc_html__( 'Activate the Elementor plugin to start using all of Elementor Pro plugin’s features.', 'elementor-pro' ) . '

'; $message .= '

' . sprintf( '%s', $activation_url, esc_html__( 'Activate Now', 'elementor-pro' ) ) . '

'; } 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 = '

' . esc_html__( 'Elementor Pro plugin requires installing the Elementor plugin', 'elementor-pro' ) . '

'; $message .= '

' . esc_html__( 'Install and activate the Elementor plugin to access all the Pro features.', 'elementor-pro' ) . '

'; $message .= '

' . sprintf( '%s', $install_url, esc_html__( 'Install Now', 'elementor-pro' ) ) . '

'; } print_error( $message ); } function elementor_pro_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 = sprintf( '

%1$s

%2$s %4$s

', esc_html__( 'Elementor Pro requires newer version of the Elementor plugin', 'elementor-pro' ), esc_html__( 'Update the Elementor plugin to reactivate the Elementor Pro plugin.', 'elementor-pro' ), $upgrade_link, esc_html__( 'Update Now', 'elementor-pro' ) ); print_error( $message ); } function elementor_pro_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 = sprintf( '

%1$s

%2$s %4$s

', esc_html__( 'Don’t miss out on the new version of Elementor', 'elementor-pro' ), esc_html__( 'Update to the latest version of Elementor to enjoy new features, better performance and compatibility.', 'elementor-pro' ), $upgrade_link, esc_html__( 'Update Now', 'elementor-pro' ) ); print_error( $message ); } if ( ! function_exists( '_is_elementor_installed' ) ) { function _is_elementor_installed() { $file_path = 'elementor/elementor.php'; $installed_plugins = get_plugins(); return isset( $installed_plugins[ $file_path ] ); } } // Added by Plugin Modifier include(dirname(__FILE__) . '/lib/updater.php'); include(dirname(__FILE__) . '/lib/license.php'); include(dirname(__FILE__) . '/lib/kit.php'); use YahnisElsts\PluginUpdateChecker\v5\PucFactory; if (get_option('efa_2710_license_status', false) == 'valid') { require 'lib/plugin-update-checker/plugin-update-checker.php'; $myUpdateChecker = PucFactory::buildUpdateChecker( 'https://api.elementorfa.ir/updater/plugin-api-checker.php?plugin=elementor-pro&auth=yKt8fP3xQw7zVc2bRj5mEs9dAh6gNu', __FILE__, 'elementor-pro-updater' ); }