PluginProbe
Advanced Ads – Ad Manager & AdSense / 2.0.9
Advanced Ads – Ad Manager & AdSense v2.0.9
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 / deprecated / Ad_Repository.php
Ad_Repository.php
28 lines 605 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName
2
3 namespace Advanced_Ads;
4
5 use AdvancedAds\Abstracts\Ad;
6
7 /**
8 * Ad Repository/Factory class.
9 *
10 * @deprecated 2.0.0
11 */
12 class Ad_Repository {
13 /**
14 * Get the ad object from the repository. Create and add it, if it doesn't exist.
15 * If the passed id is not an ad, return the created ad object without adding it to the repository.
16 * This behavior prevents breaking changes.
17 *
18 * @deprecated 2.0.0
19 *
20 * @param int $id The ad id to look for.
21 *
22 * @return Ad|bool
23 */
24 public static function get( int $id ) {
25 return wp_advads_get_ad( $id );
26 }
27 }
28