| 1 |
<?php |
| 2 |
|
| 3 |
namespace Code_Snippets\Integration\Promotions\Notices; |
| 4 |
|
| 5 |
/** |
| 6 |
* Promotion class for Header & Footer Code plugin. |
| 7 |
* |
| 8 |
* @link http://wordpress.org/plugins/head-footer-code |
| 9 |
*/ |
| 10 |
class Header_Footer_Code extends Promotion_Base { |
| 11 |
|
| 12 |
/** |
| 13 |
* Get the name of the plugin being promoted. |
| 14 |
* |
| 15 |
* @return string The plugin name. |
| 16 |
*/ |
| 17 |
public function get_plugin_name(): string { |
| 18 |
return __( 'Head & Footer Code', 'code-snippets' ); |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Get the slug of the plugin being promoted. |
| 23 |
* |
| 24 |
* @return string The plugin slug. |
| 25 |
*/ |
| 26 |
public function get_plugin_slug(): string { |
| 27 |
return 'head-footer-code'; |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* Get the admin screens where the promotion should be displayed. |
| 32 |
* |
| 33 |
* @return array An array of admin screen IDs. |
| 34 |
*/ |
| 35 |
public function get_plugin_admin_screens(): array { |
| 36 |
return [ |
| 37 |
'tools_page_head-footer-code', |
| 38 |
]; |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* Get the heading text for the promotion notice. |
| 43 |
* |
| 44 |
* @return string The promotion heading. |
| 45 |
*/ |
| 46 |
public function get_promotion_heading(): string { |
| 47 |
return __( 'Stop worrying about breaking your site', 'code-snippets' ); |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* Get the message text for the promotion notice. |
| 52 |
* |
| 53 |
* @return string The promotion message. |
| 54 |
*/ |
| 55 |
public function get_promotion_message(): string { |
| 56 |
return __( 'Why risk manual edits? Migrate to Code Snippets Pro to get enterprise-grade Safe Mode that automatically catches errors before they go live.', 'code-snippets' ); |
| 57 |
} |
| 58 |
} |
| 59 |
|