PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
jetpack / jetpack_vendor / automattic / jetpack-masterbar / src / nudges / additional-css / class-css-nudge-customize-control.php

class-css-nudge-customize-control.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3-beta, at jetpack_vendor/automattic/jetpack-masterbar/src/nudges/additional-css/class-css-nudge-customize-control.php

59 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * CSS_Nudge_Customize_Control file.
4 * CSS Nudge implementation for Atomic and WPCOM.
5 *
6 * @package automattic/jetpack-masterbar
7 */
8
9 namespace Automattic\Jetpack\Masterbar;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 0 );
13 }
14
15 /**
16 * Class CSS_Nudge_Customize_Control
17 */
18 class CSS_Nudge_Customize_Control extends \WP_Customize_Control {
19
20 /**
21 * The type of the nudge.
22 *
23 * @var string
24 */
25 public $type = 'cssNudge';
26
27 /**
28 * The Call to Action URL.
29 *
30 * @var string
31 */
32 public $cta_url;
33
34 /**
35 * The nudge text displayed.
36 *
37 * @var string
38 */
39 public $nudge_copy;
40
41 /**
42 * Render the nudge on the page.
43 */
44 public function render_content() {
45 $cta_url = $this->cta_url;
46 $nudge_copy = $this->nudge_copy;
47 $nudge_button_copy = __( 'Upgrade now', 'jetpack-masterbar' );
48
49 echo '<div class="nudge-container">
50 <p>
51 ' . wp_kses( $nudge_copy, array( 'br' => array() ) ) . '
52 </p>
53 <div class="button-container">
54 <button type="button" class="button-primary navigate-to" data-navigate-to-page="' . esc_url( $cta_url ) . '">' . esc_html( $nudge_button_copy ) . '</button>
55 </div>
56 </div>';
57 }
58 }
59