<?php  
/*
Plugin Name: advert广告
Description: 对联广告, 开屏广告, banner广告, 侧边广告, 手机广告
Version: 0.0.4
Author: 沃之涛科技
Author URI: https://www.seoceo.cn
Tested up to: 6.9
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/

if(!defined('ABSPATH'))exit;
// 声明全局变量
global $wpdb,$advert_log;
$advert_log = get_option('advert_log');
define('ADVERT_FILE',__FILE__);
define('ADVERT_VERSION','0.0.4');
define('ADVERT_NAME',plugin_basename(__FILE__));

require plugin_dir_path( ADVERT_FILE ) . 'inc/index.php';
require plugin_dir_path( ADVERT_FILE ) . 'inc/post.php';
require plugin_dir_path( ADVERT_FILE ) . 'inc/header.php';

add_action('plugins_loaded', 'advert_init');
function advert_init(){
    new advert_ad();
    if (is_admin()) {
        new advert_post();
    }else{
        new advert_head();
    }
}








