PluginProbe
Advanced Ads – Ad Manager & AdSense / 2.0.22
Advanced Ads – Ad Manager & AdSense v2.0.22
2.0.26 2.0.25 2.0.24 2.0.23 2.0.22 2.0.21 1.38.0 1.39.0 1.39.1 1.39.2 1.39.3 1.39.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.40.0 1.40.1 1.40.2 All 348 releases
advanced-ads / includes / admin / class-compatibility.php
class-compatibility.php
45 lines 1019 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin Compatibility.
4 *
5 * @package AdvancedAds
6 * @author Advanced Ads <info@wpadvancedads.com>
7 * @since 1.48.2
8 */
9
10 namespace AdvancedAds\Admin;
11
12 use AdvancedAds\Framework\Interfaces\Integration_Interface;
13
14 defined( 'ABSPATH' ) || exit;
15
16 /**
17 * Admin Compatibility.
18 */
19 class Compatibility implements Integration_Interface {
20
21 /**
22 * Hook into WordPress.
23 *
24 * @return void
25 */
26 public function hooks(): void {
27 add_action( 'quads_meta_box_post_types', [ $this, 'fix_wpquadspro_issue' ], 11 );
28 }
29
30 /**
31 * Fixes a WP QUADS PRO compatibility issue
32 * they inject their ad optimization meta box into our ad page, even though it is not a public post type
33 * using they filter, we remove AA from the list of post types they inject this box into
34 *
35 * @param array $allowed_post_types Array of allowed post types.
36 *
37 * @return array
38 */
39 public function fix_wpquadspro_issue( $allowed_post_types ): array {
40 unset( $allowed_post_types['advanced_ads'] );
41
42 return $allowed_post_types;
43 }
44 }
45