✏️ 正在编辑: class-avada-remote-installer.php
路径:
/home/lssfapb/www/wp-content/themes/Avada/includes/class-avada-remote-installer.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * Handles remotely installing premium plugins. * * @author ThemeFusion * @copyright (c) Copyright by ThemeFusion * @link https://theme-fusion.com * @package Avada * @subpackage Core * @since 5.0.0 */ // Do not allow directly accessing this file. if ( ! defined( 'ABSPATH' ) ) { exit( 'Direct script access denied.' ); } /** * Remote installer for premium plugins. * This only works with our custom server plugin. * * @since 5.0.0 */ class Avada_Remote_Installer { /** * The remote API URL. * * @access private * @var string */ private $api_url; /** * The constructor. * * @access public */ public function __construct() { $this->api_url = trailingslashit( FUSION_UPDATES_URL ); } /** * Gets the download URL for a plugin. * * @access public * @since 5.0.0 * @param string $download The plugin to download. * @param string|false $token Force-use a token, or use default if false. * @return string|false */ public function get_package( $download, $token = false ) { $api_args = [ 'avada_action' => 'get_download', 'item_name' => rawurlencode( $download ), 'ver' => Avada::get_theme_version(), ]; if ( Avada()->registration->is_registered() ) { $api_args['code'] = Avada()->registration->get_purchase_code(); } elseif ( Avada()->registration->legacy_support() ) { $api_args['token'] = Avada()->registration->get_token(); } elseif ( ! Avada()->registration->bypass_active() ) { return false; } return add_query_arg( $api_args, $this->api_url ); } /** * Gets the download URL for a plugin. * * @since 5.3 * @access public * @return bool True if subscription code is valid, false otherwise. */ public function validate_envato_hosted_subscription_code() { return true; } }
💾 保存文件
← 返回文件管理器