advanced-ads
Last commit date
admin
4 years ago
classes
4 years ago
includes
5 years ago
languages
4 years ago
lib
4 years ago
modules
4 years ago
public
4 years ago
.phpcs.xml
4 years ago
LICENSE.txt
12 years ago
advanced-ads.php
4 years ago
changelog.txt
4 years ago
index.php
12 years ago
readme.txt
4 years ago
wpml-config.xml
7 years ago
advanced-ads.php
63 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Advanced Ads. |
| 4 | * |
| 5 | * @package Advanced_Ads |
| 6 | * @author Thomas Maier <support@wpadvancedads.com> |
| 7 | * @license GPL-2.0+ |
| 8 | * @link https://wpadvancedads.com |
| 9 | * @copyright 2013-2020 Thomas Maier, Advanced Ads GmbH |
| 10 | * |
| 11 | * @wordpress-plugin |
| 12 | * Plugin Name: Advanced Ads |
| 13 | * Plugin URI: https://wpadvancedads.com |
| 14 | * Description: Manage and optimize your ads in WordPress |
| 15 | * Version: 1.30.1 |
| 16 | * Author: Thomas Maier, Advanced Ads GmbH |
| 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 | |
| 24 | // If this file is called directly, abort. |
| 25 | if ( ! defined( 'WPINC' ) ) { |
| 26 | die; |
| 27 | } |
| 28 | |
| 29 | // only load if not already existing (maybe included from another plugin). |
| 30 | if ( defined( 'ADVADS_BASE_PATH' ) ) { |
| 31 | return; |
| 32 | } |
| 33 | |
| 34 | // load basic path to the plugin. |
| 35 | define( 'ADVADS_BASE', plugin_basename( __FILE__ ) ); // plugin base as used by WordPress to identify it. |
| 36 | define( 'ADVADS_BASE_PATH', plugin_dir_path( __FILE__ ) ); |
| 37 | define( 'ADVADS_BASE_URL', plugin_dir_url( __FILE__ ) ); |
| 38 | define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin without any paths. |
| 39 | // general and global slug, e.g. to store options in WP. |
| 40 | define( 'ADVADS_SLUG', 'advanced-ads' ); |
| 41 | define( 'ADVADS_URL', 'https://wpadvancedads.com/' ); |
| 42 | define( 'ADVADS_VERSION', '1.30.1' ); |
| 43 | |
| 44 | // Autoloading, modules and functions. |
| 45 | |
| 46 | // load public functions (might be used by modules, other plugins or theme). |
| 47 | require_once ADVADS_BASE_PATH . 'includes/functions.php'; |
| 48 | require_once ADVADS_BASE_PATH . 'includes/load_modules.php'; |
| 49 | require_once ADVADS_BASE_PATH . 'includes/cap_map.php'; |
| 50 | |
| 51 | Advanced_Ads_ModuleLoader::getLoader(); // enable autoloading. |
| 52 | |
| 53 | // Public-Facing and Core Functionality. |
| 54 | |
| 55 | Advanced_Ads::get_instance(); |
| 56 | Advanced_Ads_ModuleLoader::loadModules( ADVADS_BASE_PATH . 'modules/' ); // enable modules, requires base class. |
| 57 | |
| 58 | // Dashboard and Administrative Functionality. |
| 59 | |
| 60 | if ( is_admin() ) { |
| 61 | Advanced_Ads_Admin::get_instance(); |
| 62 | } |
| 63 |