Ad_Repository.php
1 year ago
Group_Repository.php
1 year ago
ad-ajax.php
1 year ago
ad-debug.php
1 year ago
ad-expiration.php
1 year ago
ad-model.php
1 week ago
ad-select.php
1 year ago
ad.php
1 year ago
ad_group.php
1 year ago
ad_placements.php
1 year ago
ad_type_abstract.php
1 year ago
ad_type_content.php
1 year ago
ad_type_dummy.php
1 year ago
ad_type_group.php
1 year ago
ad_type_image.php
1 year ago
ad_type_plain.php
1 year ago
class-admin.php
1 year ago
class-advanced-ads-plugin.php
1 year ago
gadsense-dummy.php
1 year ago
in-content-injector.php
2 months ago
placements-ad-label-position.php
1 year ago
in-content-injector.php
54 lines
| 1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
| 2 | /** |
| 3 | * Backward compatibility shim for content injection. |
| 4 | * |
| 5 | * @deprecated 2.0.20 Use {@see \AdvancedAds\Content_Injector} instead. |
| 6 | * @package AdvancedAds |
| 7 | */ |
| 8 | |
| 9 | use AdvancedAds\Content_Injector; |
| 10 | |
| 11 | /** |
| 12 | * Injects ads in the content based on an XPath expression. |
| 13 | * |
| 14 | * @deprecated 2.0.20 Use {@see Content_Injector}. |
| 15 | */ |
| 16 | class Advanced_Ads_In_Content_Injector { |
| 17 | |
| 18 | /** |
| 19 | * Inject ads directly into the content. |
| 20 | * |
| 21 | * @deprecated 2.0.20 Use {@see Content_Injector::inject_in_content()}. |
| 22 | * |
| 23 | * @param string $placement_id Id of the placement. |
| 24 | * @param array $placement_opts Placement options. |
| 25 | * @param string $content Content to inject placement into. |
| 26 | * @param array $options Injection options. |
| 27 | * @return string |
| 28 | */ |
| 29 | public static function &inject_in_content( $placement_id, $placement_opts, &$content, $options = [] ) { |
| 30 | return Content_Injector::inject_in_content( $placement_id, $placement_opts, $content, $options ); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Callback function for usort() to sort ads for placeholders. |
| 35 | * |
| 36 | * @param array $first The first array to compare. |
| 37 | * @param array $second The second array to compare. |
| 38 | * @return int |
| 39 | */ |
| 40 | public static function sort_ads_for_placehoders( $first, $second ) { |
| 41 | return Content_Injector::sort_ads_for_placehoders( $first, $second ); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Add a warning to 'Ad health'. |
| 46 | * |
| 47 | * @param array $nodes Nodes. |
| 48 | * @return array |
| 49 | */ |
| 50 | public static function add_ad_health_node( $nodes ) { |
| 51 | return Content_Injector::add_ad_health_node( $nodes ); |
| 52 | } |
| 53 | } |
| 54 |