index.php
2 years ago
interface-ad-type.php
1 year ago
interface-ad.php
1 year ago
interface-entity.php
4 months ago
interface-group-type.php
1 year ago
interface-group.php
1 year ago
interface-importer.php
1 year ago
interface-module.php
1 year ago
interface-placement-type.php
1 year ago
interface-placement.php
1 year ago
interface-ad-type.php
75 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This interface defines a contract for implementing different ad types within plugin. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.48.0 |
| 8 | */ |
| 9 | |
| 10 | namespace AdvancedAds\Interfaces; |
| 11 | |
| 12 | defined( 'ABSPATH' ) || exit; |
| 13 | |
| 14 | /** |
| 15 | * Interface for Ad Type. |
| 16 | */ |
| 17 | interface Ad_Type { |
| 18 | |
| 19 | /** |
| 20 | * Get the unique identifier (ID) of the ad type. |
| 21 | * |
| 22 | * @return string The unique ID of the ad type. |
| 23 | */ |
| 24 | public function get_id(): string; |
| 25 | |
| 26 | /** |
| 27 | * Get the class name of the object as a string. |
| 28 | * |
| 29 | * @return string |
| 30 | */ |
| 31 | public function get_classname(): string; |
| 32 | |
| 33 | /** |
| 34 | * Get the title or name of the ad type. |
| 35 | * |
| 36 | * @return string The title of the ad type. |
| 37 | */ |
| 38 | public function get_title(): string; |
| 39 | |
| 40 | /** |
| 41 | * Get a description of the ad type. |
| 42 | * |
| 43 | * @return string The description of the ad type. |
| 44 | */ |
| 45 | public function get_description(): string; |
| 46 | |
| 47 | /** |
| 48 | * Check if this ad type requires premium. |
| 49 | * |
| 50 | * @return bool True if premium is required; otherwise, false. |
| 51 | */ |
| 52 | public function is_premium(): bool; |
| 53 | |
| 54 | /** |
| 55 | * Get the URL for upgrading to this ad type. |
| 56 | * |
| 57 | * @return string The upgrade URL for the ad type. |
| 58 | */ |
| 59 | public function get_upgrade_url(): string; |
| 60 | |
| 61 | /** |
| 62 | * Get the URL for upgrading to this ad type. |
| 63 | * |
| 64 | * @return string The upgrade URL for the ad type. |
| 65 | */ |
| 66 | public function get_image(): string; |
| 67 | |
| 68 | /** |
| 69 | * Check if this ad type has size parameters. |
| 70 | * |
| 71 | * @return bool True if has size parameters; otherwise, false. |
| 72 | */ |
| 73 | public function has_size(): bool; |
| 74 | } |
| 75 |