PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 12.0.3
Jetpack – WP Security, Backup, Speed, & Growth v12.0.3
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 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
jetpack / modules / masterbar / nudges / additional-css / class-css-nudge-customize-control.php
class-css-nudge-customize-control.php
57 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 Jetpack
7 */
8
9 namespace Automattic\Jetpack\Dashboard_Customizations;
10
11 /**
12 * Class CSS_Nudge_Customize_Control
13 *
14 * @package Automattic\Jetpack\Dashboard_Customizations
15 */
16 class CSS_Nudge_Customize_Control extends \WP_Customize_Control {
17
18 /**
19 * The type of the nudge.
20 *
21 * @var string
22 */
23 public $type = 'cssNudge';
24
25 /**
26 * The Call to Action URL.
27 *
28 * @var string
29 */
30 public $cta_url;
31
32 /**
33 * The nudge text displayed.
34 *
35 * @var string
36 */
37 public $nudge_copy;
38
39 /**
40 * Render the nudge on the page.
41 */
42 public function render_content() {
43 $cta_url = $this->cta_url;
44 $nudge_copy = $this->nudge_copy;
45 $nudge_button_copy = __( 'Upgrade Now', 'jetpack' );
46
47 echo '<div class="nudge-container">
48 <p>
49 ' . wp_kses( $nudge_copy, array( 'br' => array() ) ) . '
50 </p>
51 <div class="button-container">
52 <button type="button" class="button-primary navigate-to" data-navigate-to-page="' . esc_url( $cta_url ) . '">' . esc_html( $nudge_button_copy ) . '</button>
53 </div>
54 </div>';
55 }
56 }
57