| 1 |
<?php |
| 2 |
/** |
| 3 |
* This trait provide legacy classes for campaign. |
| 4 |
*/ |
| 5 |
|
| 6 |
namespace Hurrytimer; |
| 7 |
|
| 8 |
trait CampaignBuilderLegacy |
| 9 |
{ |
| 10 |
private function legacyLabelClass() |
| 11 |
{ |
| 12 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? 'hurrytimer-cdt__label' : ''; |
| 13 |
} |
| 14 |
|
| 15 |
private function legacyDigitClass() |
| 16 |
{ |
| 17 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? 'hurrytimer-cdt__time' : ''; |
| 18 |
|
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
private function legacyBlockClass() |
| 23 |
{ |
| 24 |
|
| 25 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? 'hurrytimer-cdt__dur' : ''; |
| 26 |
|
| 27 |
} |
| 28 |
|
| 29 |
private |
| 30 |
function legacyHeadlineClass() |
| 31 |
{ |
| 32 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? 'hurrytimer-cdt__headline' : ''; |
| 33 |
|
| 34 |
} |
| 35 |
|
| 36 |
private function legacyTimerClass() |
| 37 |
{ |
| 38 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? 'hurrytimer-cdt__inner' : ''; |
| 39 |
|
| 40 |
} |
| 41 |
|
| 42 |
|
| 43 |
private function legacySeparatorClass() |
| 44 |
{ |
| 45 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? 'hurrytimer-cdt__sep' : ''; |
| 46 |
} |
| 47 |
|
| 48 |
function legacyCampaignClass( $id ) |
| 49 |
{ |
| 50 |
return Installer::get_instance()->should_backward_compat_2_2_28_and_prior() ? "hurrytimer-cdt hurrytimer-cdt--{$id}" : ''; |
| 51 |
} |
| 52 |
} |
| 53 |
|