| 1 |
<?php |
| 2 |
/** |
| 3 |
* Inline upgrade note for a Pro-gated setting. |
| 4 |
* |
| 5 |
* A disabled control on its own says nothing about how to get it, so every |
| 6 |
* gated settings box closes with this note: a short line on the left, an |
| 7 |
* upgrade link on the right. |
| 8 |
* |
| 9 |
* Callers set $pro_note_text (the line) and $pro_note_utm (a slug naming the |
| 10 |
* spot the click came from) before requiring this file. The slug drives the |
| 11 |
* campaign parameters so each note is attributable on its own. |
| 12 |
* |
| 13 |
* @package |
| 14 |
*/ |
| 15 |
|
| 16 |
if ( empty( $pro_note_text ) ) { |
| 17 |
return; |
| 18 |
} |
| 19 |
|
| 20 |
$pro_note_area = 'wpfnl-plugin-' . ( empty( $pro_note_utm ) ? 'settings' : $pro_note_utm ); |
| 21 |
$pro_note_url = GETWPFUNNEL_PRICING_URL . '?' . http_build_query( |
| 22 |
array( |
| 23 |
'utm_source' => $pro_note_area . '-pro-button', |
| 24 |
'utm_medium' => $pro_note_area, |
| 25 |
'utm_campaign' => $pro_note_area . '-pro-CTA', |
| 26 |
'utm_id' => $pro_note_area . '-pro-CTA', |
| 27 |
) |
| 28 |
) . '#price'; |
| 29 |
?> |
| 30 |
<p class="wpfnl-pro-note"> |
| 31 |
<span class="wpfnl-pro-note__text"><?php echo esc_html( $pro_note_text ); ?></span> |
| 32 |
<a |
| 33 |
class="wpfnl-pro-note__link" |
| 34 |
href="<?php echo esc_url( $pro_note_url ); ?>" |
| 35 |
target="_blank" |
| 36 |
rel="noopener noreferrer" |
| 37 |
title="<?php esc_attr_e( 'Click to Upgrade Pro', 'wpfnl' ); ?>" |
| 38 |
> |
| 39 |
<?php esc_html_e( 'Go Pro', 'wpfnl' ); ?> |
| 40 |
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="9" viewBox="0 0 12 12" fill="none"><path d="M11 1L1 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M11 11V1H1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg> |
| 41 |
</a> |
| 42 |
</p> |
| 43 |
|