advanced-ads
Last commit date
admin
7 months ago
assets
6 months ago
classes
10 months ago
deprecated
1 year ago
includes
6 months ago
languages
6 months ago
modules
1 year ago
packages
6 months ago
public
1 year ago
upgrades
1 year ago
views
7 months ago
LICENSE.txt
12 years ago
advanced-ads.php
6 months ago
codeception.yml
1 year ago
dev.config.example.json
6 months ago
index.php
2 years ago
playwright.config.js
6 months ago
postcss.config.js
8 months ago
readme.txt
6 months ago
webpack.config.js
8 months ago
wp.advads
6 months ago
wpml-config.xml
7 years ago
advanced-ads.php
73 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Advanced Ads. |
| 4 | * |
| 5 | * @package Advanced_Ads |
| 6 | * @author Advanced Ads <support@wpadvancedads.com> |
| 7 | * @license GPL-2.0+ |
| 8 | * @link https://wpadvancedads.com |
| 9 | * @copyright since 2013 Advanced Ads GmbH |
| 10 | * |
| 11 | * @wordpress-plugin |
| 12 | * Plugin Name: Advanced Ads |
| 13 | * Version: 2.0.15 |
| 14 | * Description: Manage and optimize your ads in WordPress |
| 15 | * Plugin URI: https://wpadvancedads.com |
| 16 | * Author: Advanced Ads |
| 17 | * Author URI: https://wpadvancedads.com |
| 18 | * Text Domain: advanced-ads |
| 19 | * Domain Path: /languages |
| 20 | * License: GPL-2.0+ |
| 21 | * License URI: https://www.gnu.org/licenses/gpl-2.0.txt |
| 22 | * |
| 23 | * @requires |
| 24 | * Requires at least: 5.7 |
| 25 | * Requires PHP: 7.4 |
| 26 | */ |
| 27 | |
| 28 | // Early bail!! |
| 29 | if ( ! function_exists( 'add_filter' ) ) { |
| 30 | header( 'Status: 403 Forbidden' ); |
| 31 | header( 'HTTP/1.1 403 Forbidden' ); |
| 32 | exit(); |
| 33 | } |
| 34 | |
| 35 | if ( defined( 'ADVADS_FILE' ) ) { |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | define( 'ADVADS_FILE', __FILE__ ); |
| 40 | define( 'ADVADS_VERSION', '2.0.15' ); |
| 41 | |
| 42 | // Load the autoloader. |
| 43 | require_once __DIR__ . '/includes/class-autoloader.php'; |
| 44 | \AdvancedAds\Autoloader::get()->initialize(); |
| 45 | |
| 46 | // Load Action Scheduler if not already loaded. |
| 47 | $action_scheduler = __DIR__ . '/packages/woocommerce/action-scheduler/action-scheduler.php'; |
| 48 | if ( ! class_exists( 'ActionScheduler' ) && file_exists( $action_scheduler ) ) { |
| 49 | require_once $action_scheduler; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Compatibility check for addons for 2.0.0 release. |
| 54 | */ |
| 55 | if ( version_compare( ADVADS_VERSION, '2.0.0', '>=' ) ) { |
| 56 | ( new \AdvancedAds\Installation\Compatibility() )->hooks(); |
| 57 | } |
| 58 | |
| 59 | if ( ! function_exists( 'wp_advads' ) ) { |
| 60 | /** |
| 61 | * Returns the main instance of Advanced Ads. |
| 62 | * |
| 63 | * @since 1.46.0 |
| 64 | * @return \AdvancedAds\Plugin |
| 65 | */ |
| 66 | function wp_advads() { |
| 67 | return \AdvancedAds\Plugin::get(); |
| 68 | } |
| 69 | |
| 70 | // Start it. |
| 71 | wp_advads(); |
| 72 | } |
| 73 |