| 1 |
<?php |
| 2 |
namespace Easyel\EasyElements\Extensions; |
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
|
| 5 |
class PromoHelper { |
| 6 |
|
| 7 |
/** |
| 8 |
* Return Promo HTML for Elementor |
| 9 |
* |
| 10 |
* @param string $button_url |
| 11 |
* @param string $button_text |
| 12 |
* @return string |
| 13 |
*/ |
| 14 |
public static function get_pro_promo_html( $button_url = '', $button_text = '' ) { |
| 15 |
$button_url = $button_url ? esc_url( $button_url ) : esc_url( 'https://wpeasyelements.com' ); |
| 16 |
$button_text = $button_text ? esc_html( $button_text ) : esc_html__( 'Upgrade Easy Elements', 'easy-elements' ); |
| 17 |
|
| 18 |
return sprintf( |
| 19 |
'<div class="easy-elements-pro-badge"> |
| 20 |
<div class="easy-elements-pro-icon"> |
| 21 |
<!-- SVG Lock Icon --> |
| 22 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> |
| 23 |
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect> |
| 24 |
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path> |
| 25 |
</svg> |
| 26 |
</div> |
| 27 |
<p class="easy-elements-pro-text"> |
| 28 |
Upgrade now to access every advanced feature! |
| 29 |
</p> |
| 30 |
<a href="%s" target="_blank" class="easy-elements-pro-btn">%s</a> |
| 31 |
</div>', |
| 32 |
$button_url, |
| 33 |
$button_text |
| 34 |
); |
| 35 |
} |
| 36 |
|
| 37 |
} |