| Server IP : 43.141.50.122 / Your IP : 113.219.202.44 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/www.ucppt.com/wp-content/plugins/wpcom-vip-redeem/ |
Upload File : |
<?php
/**
* Plugin Name: WPCOM VIP 兑换码
* Description: 为 WPCOM 用户中心高级版添加兑换码功能,支持批量生成、管理和前端兑换开通会员。
* Version: 1.0.0
* Author: 觅站WordPress开发
* Author URI: https://wordpress-code.com
* Plugin URI: https://wordpress-code.com
* Requires PHP: 7.4
* Requires at least: 6.2
* Text Domain: wpcom-vip-redeem
*/
defined( 'ABSPATH' ) || exit;
define( 'WVRD_VERSION', '1.0.0' );
define( 'WVRD_PATH', plugin_dir_path( __FILE__ ) );
define( 'WVRD_URL', plugin_dir_url( __FILE__ ) );
define( 'WVRD_TABLE', 'vip_redeem_codes' );
require_once WVRD_PATH . 'includes/class-install.php';
require_once WVRD_PATH . 'includes/class-redeem.php';
require_once WVRD_PATH . 'includes/class-admin.php';
require_once WVRD_PATH . 'includes/class-ajax.php';
require_once WVRD_PATH . 'includes/class-frontend.php';
require_once WVRD_PATH . 'includes/class-shortcode.php';
register_activation_hook( __FILE__, array( 'WVRD_Install', 'activate' ) );
function wvrd_init() {
new WVRD_Admin();
new WVRD_Ajax();
new WVRD_Frontend();
new WVRD_Shortcode();
}
function wvrd_check_dependency() {
if ( ! class_exists( 'WPCOM\Member\VIP' ) ) {
add_action( 'admin_notices', function () {
echo '<div class="notice notice-error"><p>WPCOM VIP 兑换码插件需要 <strong>WPCOM 用户中心高级版</strong> 插件支持。</p></div>';
});
return;
}
wvrd_init();
}
add_action( 'after_setup_theme', 'wvrd_check_dependency', 20 );