| Server IP : 45.152.65.97 / Your IP : 216.73.216.238 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1p mod_fcgid/2.3.9a System : Windows NT C20260123164925 10.0 build 20348 (Windows Server 2016) AMD64 User : SYSTEM ( 0) PHP Version : 7.4.33 Disable Function : passthru,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,putenv,exec MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/wwwroot/shujupai.cn/wp-content/plugins/jingcaizuqiu/ |
Upload File : |
<?php
/*
Plugin Name: 竞彩足球预测器
Plugin URI: https://example.com/
Description: 自动预测竞彩足球胜平负结果并自动发布文章
Version: 1.0.0
Author: 竞彩专家
Author URI: https://example.com/
License: GPL2
*/
if (!defined('ABSPATH')) {
exit;
}
define('JCZP_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('JCZP_PLUGIN_URL', plugin_dir_url(__FILE__));
define('JCZP_VERSION', '1.0.0');
require_once JCZP_PLUGIN_DIR . 'includes/admin.php';
require_once JCZP_PLUGIN_DIR . 'includes/predictor.php';
require_once JCZP_PLUGIN_DIR . 'includes/scheduler.php';
require_once JCZP_PLUGIN_DIR . 'includes/post-creator.php';
function jczp_activate() {
if (!wp_next_scheduled('jczp_daily_predict')) {
wp_schedule_event(time(), 'daily', 'jczp_daily_predict');
}
if (!wp_next_scheduled('jczp_check_results')) {
wp_schedule_event(time(), 'jczp_twice_daily', 'jczp_check_results');
}
}
register_activation_hook(__FILE__, 'jczp_activate');
function jczp_deactivate() {
wp_clear_scheduled_hook('jczp_daily_predict');
wp_clear_scheduled_hook('jczp_check_results');
}
register_deactivation_hook(__FILE__, 'jczp_deactivate');
function jczp_enqueue_admin_assets($hook) {
if ($hook !== 'toplevel_page_jingcaizuqiu-predictor') {
return;
}
wp_enqueue_style('jczp-admin-css', JCZP_PLUGIN_URL . 'assets/css/admin.css', array(), JCZP_VERSION);
wp_enqueue_script('jczp-admin-js', JCZP_PLUGIN_URL . 'assets/js/admin.js', array('jquery'), JCZP_VERSION, true);
}
add_action('admin_enqueue_scripts', 'jczp_enqueue_admin_assets');
function jczp_init() {
new JCZP_Admin();
new JCZP_Scheduler();
}
add_action('plugins_loaded', 'jczp_init');