PluginProbe ʕ •ᴥ•ʔ
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More / 2.6.7
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More v2.6.7
2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.7 2.6.8 2.6.5 2.6.4 2.6.3 2.6.2 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1 1.1.1 1.1.2 1.2.0 2.0 2.1.0 2.1.1 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1
reviews-feed / class / Common / Tooltip_Wizard.php
reviews-feed / class / Common Last commit date
Admin 2 months ago Builder 2 months ago Customizer 2 months ago Exceptions 2 months ago Helpers 2 months ago Integrations 2 months ago Migrations 2 months ago ReviewAlerts 2 months ago Services 2 months ago Settings 2 months ago Support 2 months ago Traits 2 months ago Utils 2 months ago AuthorizationStatusCheck.php 2 months ago BusinessDataCache.php 2 months ago Clear_Cache.php 2 months ago Container.php 2 months ago DisplayElements.php 2 months ago Email_Notification.php 2 months ago Error_Reporter.php 2 months ago Feed.php 2 months ago FeedCache.php 2 months ago FeedCacheUpdater.php 2 months ago FeedDisplay.php 2 months ago Feed_Locator.php 2 months ago Parser.php 2 months ago PostAggregator.php 2 months ago RemoteRequest.php 2 months ago SBR_Education.php 2 months ago SBR_Settings.php 2 months ago ServiceContainer.php 2 months ago SinglePostCache.php 2 months ago TemplateRenderer.php 2 months ago Tooltip_Wizard.php 2 months ago Util.php 2 months ago
Tooltip_Wizard.php
148 lines
1 <?php
2
3 /**
4 * SBR Tooltip Wizard
5 *
6 * @since 1.0
7 */
8
9 namespace SmashBalloon\Reviews\Common;
10
11 if (! defined('ABSPATH')) {
12 exit;
13 }
14
15 use Smashballoon\Stubs\Services\ServiceProvider;
16
17 class Tooltip_Wizard extends ServiceProvider
18 {
19 public function register()
20 {
21 $this->init();
22 }
23
24 /**
25 * Initialize class.
26 *
27 * @since 1.0
28 */
29 public function init()
30 {
31
32 $this->hooks();
33 }
34
35 /**
36 * Register hooks.
37 *
38 * @since 1.0
39 */
40 public function hooks()
41 {
42 add_action('admin_enqueue_scripts', [$this, 'enqueues']);
43 add_action('admin_footer', [$this, 'output']);
44 }
45
46
47 /**
48 * Enqueue assets.
49 *
50 * @since 1.0
51 */
52 public function enqueues()
53 {
54
55 wp_enqueue_style(
56 'sbr-tooltipster-css',
57 SBR_PLUGIN_URL . 'assets/admin/css/tooltipster.css',
58 null,
59 SBRVER
60 );
61
62 wp_enqueue_script(
63 'sbr-tooltipster-js',
64 SBR_PLUGIN_URL . 'assets/admin/js/jquery.tooltipster.min.js',
65 ['jquery'],
66 SBRVER,
67 true
68 );
69
70 wp_enqueue_script(
71 'sbr-admin-tooltip-wizard',
72 SBR_PLUGIN_URL . 'assets/admin/js/tooltip-wizard.js',
73 ['jquery'],
74 SBRVER
75 );
76
77 $wp_localize_data = [];
78 if ($this->check_gutenberg_wizard()) {
79 $wp_localize_data['sbr_wizard_gutenberg'] = true;
80 }
81
82 wp_localize_script(
83 'sbr-admin-tooltip-wizard',
84 'sbr_admin_tooltip_wizard',
85 $wp_localize_data
86 );
87 }
88
89 /**
90 * Output HTML.
91 *
92 * @since 1.0
93 */
94 public function output()
95 {
96 if ($this->check_gutenberg_wizard()) {
97 $this->gutenberg_tooltip_output();
98 }
99 }
100
101 /**
102 * Gutenberg Tooltip Output HTML.
103 *
104 * @since 1.0
105 */
106 public function check_gutenberg_wizard()
107 {
108 global $pagenow;
109 return (($pagenow == 'post.php') || (get_post_type() == 'page'))
110 && !empty($_GET['sbr_wizard']);
111 }
112
113
114 /**
115 * Gutenberg Tooltip Output HTML.
116 *
117 * @since 1.0
118 */
119 public function gutenberg_tooltip_output()
120 {
121 ?>
122 <div id="sbr-gutenberg-tooltip-content">
123 <div class="sbr-tlp-wizard-cls sbr-tlp-wizard-close"></div>
124 <div class="sbr-tlp-wizard-content">
125 <strong class="sbr-tooltip-wizard-head">
126 <?php echo esc_html__('Add a Block', 'reviews-feed') ?>
127 </strong>
128 <p class="sbr-tooltip-wizard-txt">
129 <?php echo esc_html__('Click the plus button, search for Reviews Feed', 'reviews-feed'); ?>
130 <br />
131 <?php echo esc_html__('and click the block to embed it.', 'reviews-feed') ?> <a
132 href="https://smashballoon.com/doc/wordpress-5-block-page-editor-gutenberg/?facebook&utm_campaign=reviews-free&utm_source=settings&utm_medium=docs" rel="noopener"
133 target="_blank">
134 <?php echo esc_html__('Learn More', 'reviews-feed') ?>
135 </a>
136 </p>
137 <div class="sbr-tooltip-wizard-actions">
138 <button class="sbr-tlp-wizard-close">
139 <?php echo esc_html__('Done', 'reviews-feed') ?>
140 </button>
141 </div>
142 </div>
143 </div>
144 <?php
145 }
146
147
148 }