| 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-member-pro/admin/ |
Upload File : |
<?php defined( 'ABSPATH' ) || exit;
add_filter('wpcom_plugin_themer_version', function($version){
$current = [
'ver' => '3.1.0',
'path' => plugin_dir_path( __FILE__ ),
'uri' => plugins_url( '/', __FILE__ )
];
if(empty($version) || !isset($version['ver'])) return $current;
return version_compare($version['ver'], $current['ver'], '<') ? $current : $version;
});
add_action('wpcom_setup_plugin_themer', function(){
$version = apply_filters('wpcom_plugin_themer_version', []);
if($version && isset($version['ver']) && !defined('WPCOM_ADMIN_VERSION') ) {
define( 'WPCOM_ADMIN_VERSION', $version['ver'] );
if( !defined('WPCOM_ADMIN_PATH') ) {
define( 'WPCOM_ADMIN_PATH', $version['path'] );
define( 'WPCOM_ADMIN_URI', $version['uri'] );
}
require_once WPCOM_ADMIN_PATH . 'includes/class-plugin-panel.php';
}else if(!defined('WPCOM_ADMIN_VERSION')){
define( 'WPCOM_ADMIN_VERSION', '3.1.0' );
if( !defined('WPCOM_ADMIN_PATH') ) {
define( 'WPCOM_ADMIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'WPCOM_ADMIN_URI', plugins_url( '/', __FILE__ ) );
}
require_once WPCOM_ADMIN_PATH . 'includes/class-plugin-panel.php';
}
});
/**
* 插件激活时触发版本更新检查
* activated_plugin 仅在激活的时候触发,不会完整执行后续插件加载,所以通过计划任务延迟执行
*/
add_action('activated_plugin', function(){
wp_schedule_single_event(time() + 3, 'wpcom_themer_updated_check');
});