| 1 |
<?php |
| 2 |
/** |
| 3 |
* Malware scan upsell. |
| 4 |
* |
| 5 |
* @package WP_Defender\Traits |
| 6 |
* @since 4.7.2 |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace WP_Defender\Traits; |
| 10 |
|
| 11 |
trait Scan_Upsell { |
| 12 |
/** |
| 13 |
* Get scan upsell details. |
| 14 |
* |
| 15 |
* @param string $location The location of the upsell. |
| 16 |
* |
| 17 |
* @return array |
| 18 |
*/ |
| 19 |
public function get_scan_upsell( string $location ): array { |
| 20 |
/* translators: 1: Opening anchor tag, 2: Closing anchor tag */ |
| 21 |
$anc_link = __( 'Let our experts meticulously clean your sites, remove malware and set up optimal security configurations for ongoing protection. %1$sGet expert services%2$s.', 'defender-security' ); |
| 22 |
|
| 23 |
switch ( $location ) { |
| 24 |
case 'dashboard': |
| 25 |
return array( |
| 26 |
'url' => 'https://wpmudev.com/hub2/expert-services/?utm_source=defender-pro&utm_medium=plugin&utm_campaign=defender_services_dash_upsell', |
| 27 |
'description' => $anc_link, |
| 28 |
); |
| 29 |
case 'scan': |
| 30 |
return array( |
| 31 |
'url' => 'https://wpmudev.com/hub2/expert-services/?utm_source=defender-pro&utm_medium=plugin&utm_campaign=defender_services_mwscanning_upsell', |
| 32 |
'description' => $anc_link, |
| 33 |
); |
| 34 |
case 'email': |
| 35 |
return array( |
| 36 |
'url' => 'https://wpmudev.com/hub2/expert-services/?utm_source=defender-pro&utm_medium=email&utm_campaign=defender_services_email_upsell', |
| 37 |
'description' => $anc_link, |
| 38 |
); |
| 39 |
default: |
| 40 |
return array( |
| 41 |
'url' => '', |
| 42 |
'description' => '', |
| 43 |
); |
| 44 |
} |
| 45 |
} |
| 46 |
} |
| 47 |
|