class-conditional.php
2 years ago
class-data.php
2 years ago
class-groups.php
2 years ago
class-str.php
2 years ago
class-wordpress.php
2 years ago
index.php
2 years ago
class-groups.php
37 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Groups utility functions. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.47.0 |
| 8 | */ |
| 9 | |
| 10 | namespace AdvancedAds\Utilities; |
| 11 | |
| 12 | use Advanced_Ads_Group; |
| 13 | |
| 14 | defined( 'ABSPATH' ) || exit; |
| 15 | |
| 16 | /** |
| 17 | * Groups. |
| 18 | */ |
| 19 | class Groups { |
| 20 | |
| 21 | /** |
| 22 | * Build html for group hints. |
| 23 | * |
| 24 | * @param Advanced_Ads_Group $group Group instance. |
| 25 | * |
| 26 | * @return string |
| 27 | */ |
| 28 | public static function build_hints_html( $group ): string { |
| 29 | $hints_html = ''; |
| 30 | foreach ( Advanced_Ads_Group::get_hints( $group ) as $hint ) { |
| 31 | $hints_html .= '<p class="advads-notice-inline advads-error">' . $hint . '</p>'; |
| 32 | } |
| 33 | |
| 34 | return $hints_html; |
| 35 | } |
| 36 | } |
| 37 |