main.php
| 1 | <?php |
| 2 | if ( class_exists( 'Advanced_Ads', false ) ) { |
| 3 | |
| 4 | // only load if not already existing (maybe included from another plugin) |
| 5 | if ( defined( 'ADVADS_AB_BASE_PATH' ) ) { |
| 6 | return ; |
| 7 | } |
| 8 | |
| 9 | // load basic path to the plugin |
| 10 | define( 'ADVADS_AB_BASE_PATH', plugin_dir_path( __FILE__ ) ); |
| 11 | // general and global slug, e.g. to store options in WP, textdomain |
| 12 | define( 'ADVADS_AB_SLUG', 'advanced-ads-ab-module' ); |
| 13 | |
| 14 | Advanced_Ads_Ad_Blocker::get_instance(); |
| 15 | |
| 16 | $is_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX; |
| 17 | |
| 18 | if ( is_admin() && ! $is_ajax ) { |
| 19 | Advanced_Ads_Ad_Blocker_Admin::get_instance(); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | |
| 24 | |
| 25 |