PluginProbe ʕ •ᴥ•ʔ
Starter Templates – AI-Powered Templates for Elementor & Gutenberg / 4.4.8
Starter Templates – AI-Powered Templates for Elementor & Gutenberg v4.4.8
4.6.3 4.6.2 4.6.1 4.6.0 4.5.4 4.5.3 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.5.0 2.5.1 2.6.0 2.6.1 2.6.10 2.6.11 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.18 2.6.19 2.6.2 2.6.20 2.6.21 2.6.22 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.24 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.21 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.4.10 4.4.11 4.4.12 4.4.13 4.4.14 4.4.16 4.4.17 4.4.18 4.4.19 4.4.2 4.4.20 4.4.21 4.4.22 4.4.23 4.4.24 trunk 4.4.25 0.4.4.0 4.4.26 0.4.4.15 4.4.27 1.0.0 4.4.28 1.0.1 4.4.29 1.0.10 4.4.3 1.0.11 4.4.30 1.0.12 4.4.31 1.0.13 4.4.32 1.0.14 4.4.33 1.0.2 4.4.34 1.0.3 4.4.35 1.0.4 4.4.36 1.0.5 4.4.37 1.0.6 4.4.38 1.0.7 4.4.39 1.0.8 4.4.4 1.0.9 4.4.40 1.1.0 4.4.41 1.1.1 4.4.42 1.1.2 4.4.43 1.1.3 4.4.44 1.1.4 4.4.45 1.1.5 4.4.46 1.1.6 4.4.47 1.1.7 4.4.48 1.1.8 4.4.49 1.1.9 4.4.5 1.2.0 4.4.50 1.2.1 4.4.51 1.2.10 4.4.52 1.2.11 4.4.6 1.2.12 4.4.7 1.2.13 4.4.8 1.2.14 4.4.9 1.2.15 4.5.0 1.2.2 4.5.1 1.2.3 4.5.2 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.11 1.3.13 1.3.14 1.3.15 1.3.16 1.3.17 1.3.18 1.3.19 1.3.2 1.3.20 1.3.21 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 2.0.0 2.0.1 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5
astra-sites / inc / classes / class-astra-sites-nps-notice.php
astra-sites / inc / classes Last commit date
compatibility 1 year ago class-astra-sites-elementor-images.php 6 years ago class-astra-sites-elementor-pages.php 2 years ago class-astra-sites-error-handler.php 2 years ago class-astra-sites-file-system.php 2 years ago class-astra-sites-importer-log.php 2 years ago class-astra-sites-importer.php 1 year ago class-astra-sites-nps-notice.php 1 year ago class-astra-sites-page.php 1 year ago class-astra-sites-update.php 1 year ago class-astra-sites-utils.php 2 years ago class-astra-sites-white-label.php 2 years ago class-astra-sites-wp-cli.php 2 years ago class-astra-sites.php 1 year ago functions.php 2 years ago
class-astra-sites-nps-notice.php
101 lines
1 <?php
2 /**
3 * Init
4 *
5 * @since 1.0.0
6 * @package NPS Survey
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 if ( ! class_exists( 'Astra_Sites_Nps_Notice' ) ) :
14
15 /**
16 * Admin
17 */
18 class Astra_Sites_Nps_Notice {
19 /**
20 * Instance
21 *
22 * @since 1.0.0
23 * @var (Object) Astra_Sites_Nps_Notice
24 */
25 private static $instance = null;
26
27 /**
28 * Get Instance
29 *
30 * @since 1.0.0
31 *
32 * @return object Class object.
33 */
34 public static function get_instance() {
35 if ( ! isset( self::$instance ) ) {
36 self::$instance = new self();
37 }
38
39 return self::$instance;
40 }
41
42 /**
43 * Constructor.
44 *
45 * @since 1.0.0
46 */
47 private function __construct() {
48 add_action( 'admin_footer', array( $this, 'render_nps_survey' ), 999 );
49 }
50
51 /**
52 * Render NPS Survey
53 *
54 * @return void
55 */
56 public function render_nps_survey() {
57
58 if ( ! class_exists( 'Nps_Survey' ) ) {
59 return;
60 }
61
62 if ( class_exists( 'Astra_Sites_White_Label' ) && is_callable( 'Astra_Sites_White_Label::get_instance' ) && Astra_Sites_White_Label::get_instance()->is_white_labeled() ) {
63 return;
64 }
65
66 Nps_Survey::show_nps_notice(
67 'nps-survey-astra-sites',
68 array(
69 'show_if' => get_option( 'astra_sites_import_complete', false ),
70 'dismiss_timespan' => 2 * WEEK_IN_SECONDS,
71 'display_after' => 0,
72 'plugin_slug' => 'astra-sites',
73 'message' => array(
74
75 // Step 1 i.e rating input.
76 'logo' => esc_url( INTELLIGENT_TEMPLATES_URI . 'assets/images/logo.svg' ),
77 'plugin_name' => __( 'Starter Templates', 'astra-sites' ),
78 'nps_rating_message' => __( 'How likely are you to recommend #pluginname to your friends or colleagues?', 'astra-sites' ),
79
80 // Step 2A i.e. positive.
81 'feedback_title' => __( 'Thanks a lot for your feedback! 😍', 'astra-sites' ),
82 'feedback_content' => __( 'Could you please do us a favor and give us a 5-star rating on WordPress? It would help others choose Starter Templates with confidence. Thank you!', 'astra-sites' ),
83 'plugin_rating_link' => esc_url( 'https://wordpress.org/support/plugin/astra-sites/reviews/#new-post' ),
84
85 // Step 2B i.e. negative.
86 'plugin_rating_title' => __( 'Thank you for your feedback', 'astra-sites' ),
87 'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'astra-sites' ),
88 ),
89 )
90 );
91 }
92
93 }
94
95 /**
96 * Kicking this off by calling 'get_instance()' method
97 */
98 Astra_Sites_Nps_Notice::get_instance();
99
100 endif;
101