type-grid.php
3 months ago
type-ordered.php
3 months ago
type-slider.php
3 months ago
type-standard.php
3 months ago
type-unknown.php
3 months ago
type-grid.php
76 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This class represents the "Grid" group type. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.47.0 |
| 8 | */ |
| 9 | |
| 10 | namespace AdvancedAds\Groups\Types; |
| 11 | |
| 12 | use AdvancedAds\Groups\Group_Standard; |
| 13 | use AdvancedAds\Interfaces\Group_Type; |
| 14 | |
| 15 | defined( 'ABSPATH' ) || exit; |
| 16 | |
| 17 | /** |
| 18 | * Type Grid. |
| 19 | */ |
| 20 | class Grid implements Group_Type { |
| 21 | |
| 22 | /** |
| 23 | * Get the unique identifier (ID) of the group type. |
| 24 | * |
| 25 | * @return string The unique ID of the group type. |
| 26 | */ |
| 27 | public function get_id(): string { |
| 28 | return 'grid'; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Get the class name of the object as a string. |
| 33 | * |
| 34 | * @return string |
| 35 | */ |
| 36 | public function get_classname(): string { |
| 37 | return Group_Standard::class; |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Get the title or name of the group type. |
| 42 | * |
| 43 | * @return string The title of the group type. |
| 44 | */ |
| 45 | public function get_title(): string { |
| 46 | return __( 'Grid', 'advanced-ads' ); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Get a description of the group type. |
| 51 | * |
| 52 | * @return string The description of the group type. |
| 53 | */ |
| 54 | public function get_description(): string { |
| 55 | return ''; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Check if this group type requires premium. |
| 60 | * |
| 61 | * @return bool True if premium is required; otherwise, false. |
| 62 | */ |
| 63 | public function is_premium(): bool { |
| 64 | return true; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Get the URL for upgrading to this group type. |
| 69 | * |
| 70 | * @return string The upgrade URL for the group type. |
| 71 | */ |
| 72 | public function get_image(): string { |
| 73 | return ADVADS_BASE_URL . 'assets/img/group-types/grid.svg'; |
| 74 | } |
| 75 | } |
| 76 |