Business Profile - Version 2.0.4

Version Description

(2020-03-27) = - Added link/the ability to click to call to phone numbers in the contact card - Added all the Organization types from the schema functionality as options in the Schema Type setting for the contact card - Added a setup walk-through that runs on initial plugin activation - Corrected some styling issues for the metaboxes on the location post type edit screen - Updated some settings descriptions - Corrected warning that sometimes came up in the Dashboard area of the admin when this and another Five Star plugin were both installed

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Business Profile
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

assets/css/admin-bpfwp-welcome-screen.css ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bpfwp-hidden {
2
+ display: none;
3
+ }
4
+ .bpfwp-welcome-clear {
5
+ clear: both;
6
+ }
7
+
8
+ .bpfwp-welcome-screen-header h1 {
9
+ padding: 48px 0 16px 0;
10
+ margin: 0;
11
+ }
12
+ .bpfwp-welcome-screen-header p {
13
+ margin-bottom: 32px;
14
+ font-size: 15px;
15
+ }
16
+ .bpfwp-welcome-screen h2 {
17
+ background: #1b335f;
18
+ color: #fff;
19
+ padding: 18px;
20
+ margin: 0;
21
+ z-index: 2;
22
+ position: relative;
23
+ float: left;
24
+ width: calc(100% - 36px);
25
+ border-top: 1px solid #42639F;
26
+ }
27
+ .bpfwp-welcome-screen h2:hover {
28
+ background: #365388;
29
+ }
30
+
31
+ .bpfwp-welcome-screen-box .bpfwp-welcome-screen-box-content {
32
+ display: none;
33
+ }
34
+
35
+ .bpfwp-welcome-screen-box.bpfwp-welcome-screen-open .bpfwp-welcome-screen-box-content {
36
+ display: block;
37
+ }
38
+
39
+ .bpfwp-welcome-screen-box {
40
+ padding: 0px;
41
+ max-width: 800px;
42
+ margin: 0 auto;
43
+ }
44
+
45
+ .bpfwp-welcome-screen-header,
46
+ .bpfwp-welcome-screen-skip-container {
47
+ max-width: 800px;
48
+ margin: 0 auto;
49
+ }
50
+
51
+ .bpfwp-welcome-screen-header {
52
+ text-align: center;
53
+ }
54
+
55
+ .bpfwp-welcome-screen-box h2 {
56
+ cursor: pointer;
57
+ }
58
+
59
+ .bpfwp-welcome-screen-box-content {
60
+ position: relative;
61
+ float: left;
62
+ background: #fff;
63
+ width: 90%;
64
+ margin: 0 auto 16px;
65
+ box-shadow: 0 1px 12px #ddd;
66
+ display: block;
67
+ padding: 18px 5%;
68
+ }
69
+
70
+ .bpfwp-welcome-screen-set-contact-information-button,
71
+ .bpfwp-welcome-screen-set-hours-button,
72
+ .bpfwp-welcome-screen-add-create_menu-button,
73
+ .bpfwp-welcome-screen-add-contact-page-button {
74
+ position: relative;
75
+ float: left;
76
+ cursor: pointer;
77
+ padding: 4px 8px;
78
+ border: 2px solid #1b335f;
79
+ color: #fff;
80
+ border-radius: 2px;
81
+ background: #1b335f;
82
+ width: auto;
83
+ text-align: center;
84
+ margin-top: 12px;
85
+ }
86
+ .bpfwp-welcome-screen-set-contact-information-button:hover,
87
+ .bpfwp-welcome-screen-set-hours-button:hover,
88
+ .bpfwp-welcome-screen-add-create_menu-button:hover,
89
+ .bpfwp-welcome-screen-add-contact-page-button:hover {
90
+ border-color: #365388;
91
+ background: #365388;
92
+ }
93
+
94
+ .bpfwp-welcome-screen-next-button,
95
+ .bpfwp-welcome-screen-previous-button,
96
+ .bpfwp-welcome-screen-finish-button a {
97
+ position: relative;
98
+ float: right;
99
+ cursor: pointer;
100
+ padding: 4px 8px;
101
+ border: 2px solid #1b335f;
102
+ color: #1b335f;
103
+ border-radius: 2px;
104
+ background: transparent;
105
+ width: auto;
106
+ text-align: center;
107
+ margin-top: 32px;
108
+ text-decoration: none;
109
+ }
110
+ .bpfwp-welcome-screen-next-button:hover,
111
+ .bpfwp-welcome-screen-previous-button:hover,
112
+ .bpfwp-welcome-screen-finish-button a:hover {
113
+ color: #fff;
114
+ background: #1b335f;
115
+ text-decoration: none;
116
+ }
117
+ .bpfwp-welcome-screen-next-button-not-top-margin {
118
+ margin-top: 12px;
119
+ }
120
+ .bpfwp-welcome-screen-previous-button {
121
+ float: left;
122
+ }
123
+
124
+ .bpfwp-welcome-screen-skip-button {
125
+ position: relative;
126
+ float: right;
127
+ cursor: pointer;
128
+ padding: 4px 8px;
129
+ border: 2px solid #ccc;
130
+ color: #999;
131
+ border-radius: 2px;
132
+ background: transparent;
133
+ width: auto;
134
+ text-align: center;
135
+ margin-top: 12px;
136
+ }
137
+ .bpfwp-welcome-screen-skip-button:hover {
138
+ border-color: #aaa;
139
+ color: #fff;
140
+ background: #aaa;
141
+ }
142
+
143
+ .bpfwp-welcome-screen-box-content label {
144
+ width: 160px;
145
+ position: relative;
146
+ float: left;
147
+ font-weight: bold;
148
+ }
149
+ .bpfwp-welcome-screen-option label {
150
+ width: auto;
151
+ float: none;
152
+ font-weight: normal;
153
+ }
154
+ .bpfwp-welcome-screen-option label.bpfwp-admin-switch {
155
+ width: 40px
156
+ }
157
+
158
+ .bpfwp-welcome-screen-box-content input {
159
+ margin: 0;
160
+ }
161
+ .bpfwp-welcome-screen-box-content-divs {
162
+ margin-bottom: 8px;
163
+ }
164
+
165
+
166
+ .bpfwp-welcome-screen-show-created-sections {
167
+ display: none;
168
+ }
169
+
170
+ .bpfwp-welcome-screen-show-created-sections-name {
171
+ position: relative;
172
+ float: left;
173
+ width: 40%;
174
+ width: calc(40% - 2px);
175
+ padding: 9px 5%;
176
+ border-left: 1px solid #ccc;
177
+ border-right: 1px solid #ccc;
178
+ font-size: 15px;
179
+ font-weight: bold;
180
+ border-top: 1px solid #ccc;
181
+ border-bottom: 1px solid #ccc;
182
+ }
183
+ .bpfwp-welcome-screen-show-created-sections-description {
184
+ position: relative;
185
+ float: right;
186
+ width: 40%;
187
+ width: calc(40% - 1px);
188
+ border-right: 1px solid #ccc;
189
+ padding: 9px 5%;
190
+ font-size: 15px;
191
+ font-weight: bold;
192
+ border-top: 1px solid #ccc;
193
+ border-bottom: 1px solid #ccc;
194
+ }
195
+ .bpfwp-welcome-screen-section-name {
196
+ position: relative;
197
+ float: left;
198
+ width: 40%;
199
+ width: calc(40% - 2px);
200
+ padding: 7px 5%;
201
+ height: 18px;
202
+ overflow: hidden;
203
+ border-left: 1px solid #ccc;
204
+ border-right: 1px solid #ccc;
205
+ border-bottom: 1px solid #ccc;
206
+ }
207
+ .bpfwp-welcome-screen-section-description {
208
+ position: relative;
209
+ float: right;
210
+ width: 40%;
211
+ width: calc(40% - 1px);
212
+ padding: 7px 5%;
213
+ height: 18px;
214
+ overflow: hidden;
215
+ border-right: 1px solid #ccc;
216
+ border-bottom: 1px solid #ccc;
217
+ }
218
+
219
+
220
+ .bpfwp-welcome-screen-show-created-menu_items {
221
+ display: none;
222
+ }
223
+
224
+ .bpfwp-welcome-screen-show-created-menu_items-image {
225
+ position: relative;
226
+ float: left;
227
+ width: 20%;
228
+ width: calc(20% - 2px);
229
+ padding: 9px 2.5%;
230
+ border-left: 1px solid #ccc;
231
+ border-right: 1px solid #ccc;
232
+ font-size: 15px;
233
+ font-weight: bold;
234
+ border-top: 1px solid #ccc;
235
+ border-bottom: 1px solid #ccc;
236
+ }
237
+ .bpfwp-welcome-screen-show-created-menu_items-name {
238
+ position: relative;
239
+ float: left;
240
+ width: 20%;
241
+ width: calc(20% - 1px);
242
+ border-right: 1px solid #ccc;
243
+ padding: 9px 2.5%;
244
+ font-size: 15px;
245
+ font-weight: bold;
246
+ border-top: 1px solid #ccc;
247
+ border-bottom: 1px solid #ccc;
248
+ }
249
+ .bpfwp-welcome-screen-show-created-menu_items-description {
250
+ position: relative;
251
+ float: left;
252
+ width: 20%;
253
+ width: calc(20% - 1px);
254
+ border-right: 1px solid #ccc;
255
+ padding: 9px 2.5%;
256
+ font-size: 15px;
257
+ font-weight: bold;
258
+ border-top: 1px solid #ccc;
259
+ border-bottom: 1px solid #ccc;
260
+ }
261
+ .bpfwp-welcome-screen-show-created-menu_items-price {
262
+ position: relative;
263
+ float: left;
264
+ width: 20%;
265
+ width: calc(20% - 1px);
266
+ border-right: 1px solid #ccc;
267
+ padding: 9px 2.5%;
268
+ font-size: 15px;
269
+ font-weight: bold;
270
+ border-top: 1px solid #ccc;
271
+ border-bottom: 1px solid #ccc;
272
+ }
273
+ .bpfwp-welcome-screen-menu_item-image {
274
+ position: relative;
275
+ float: left;
276
+ width: 20%;
277
+ width: calc(20% - 2px);
278
+ padding: 7px 2.5%;
279
+ height: 100px;
280
+ overflow: hidden;
281
+ border-left: 1px solid #ccc;
282
+ border-right: 1px solid #ccc;
283
+ border-bottom: 1px solid #ccc;
284
+ }
285
+ .bpfwp-welcome-screen-menu_item-image img {
286
+ width: auto;
287
+ height: auto;
288
+ max-width: 100%;
289
+ max-height: 100%;
290
+ }
291
+ .bpfwp-welcome-screen-menu_item-name {
292
+ position: relative;
293
+ float: left;
294
+ width: 20%;
295
+ width: calc(20% - 1px);
296
+ padding: 7px 2.5%;
297
+ height: 100px;
298
+ overflow: hidden;
299
+ border-right: 1px solid #ccc;
300
+ border-bottom: 1px solid #ccc;
301
+ }
302
+ .bpfwp-welcome-screen-menu_item-description {
303
+ position: relative;
304
+ float: left;
305
+ width: 20%;
306
+ width: calc(20% - 1px);
307
+ padding: 7px 2.5%;
308
+ height: 100px;
309
+ overflow: hidden;
310
+ border-right: 1px solid #ccc;
311
+ border-bottom: 1px solid #ccc;
312
+ }
313
+ .bpfwp-welcome-screen-menu_item-price {
314
+ position: relative;
315
+ float: left;
316
+ width: 20%;
317
+ width: calc(20% - 1px);
318
+ padding: 7px 2.5%;
319
+ height: 100px;
320
+ overflow: hidden;
321
+ border-right: 1px solid #ccc;
322
+ border-bottom: 1px solid #ccc;
323
+ }
324
+
325
+ .bpfwp-welcome-screen-add-create_menu-sections h3 {
326
+ padding-bottom: 0;
327
+ margin-bottom: 0;
328
+ }
329
+
330
+ .bpfwp-save-message {
331
+ clear: both;
332
+ position: relative;
333
+ float: left;
334
+ width: 100%;
335
+ margin: 16px 0;
336
+ }
337
+ .bpfwp-save-message-inside {
338
+ position: relative;
339
+ float: left;
340
+ padding: 8px 12px;
341
+ background: #eee;
342
+ }
343
+
344
+ .bpfwp-welcome-screen-image-preview-container {
345
+ float: left;
346
+ width: calc(100% - 160px);
347
+ margin-bottom: 10px;
348
+ }
349
+ .bpfwp-welcome-screen-image-preview img {
350
+ width: 180px;
351
+ height: auto;
352
+ }
353
+
354
+
355
+ /*scheduler*/
356
+ .bpfwp-welcome-screen-box-content .sap-scheduler label {
357
+ width: auto;
358
+ float: none;
359
+ text-align: center;
360
+ font-weight: normal;
361
+ }
362
+ .bpfwp-welcome-screen-box-content .sap-scheduler .sap-scheduler-time-input label {
363
+ text-align: left;
364
+ }
365
+ .bpfwp-welcome-screen-box-content .sap-scheduler input[type="checkbox"] {
366
+ margin: 6px 4px 7px 0;
367
+ }
assets/css/admin.css CHANGED
@@ -1837,6 +1837,13 @@ NEW STYLING FOR ADD/DELETE AREAS LIKE CUSTOM FIELDS
1837
  }
1838
 
1839
 
 
 
 
 
 
 
 
1840
 
1841
  /*********************************/
1842
  /*** TEMPORARY ***/
@@ -1844,3 +1851,6 @@ NEW STYLING FOR ADD/DELETE AREAS LIKE CUSTOM FIELDS
1844
  ul.bpfwp-dashboard-new-footer-two-menu:first-of-type {
1845
  display: none;
1846
  }
 
 
 
1837
  }
1838
 
1839
 
1840
+ /*****
1841
+ NEW
1842
+ *****/
1843
+ .edit-post-meta-boxes-area .postbox {
1844
+ overflow: scroll;
1845
+ }
1846
+
1847
 
1848
  /*********************************/
1849
  /*** TEMPORARY ***/
1851
  ul.bpfwp-dashboard-new-footer-two-menu:first-of-type {
1852
  display: none;
1853
  }
1854
+
1855
+
1856
+
assets/css/dashboard-review-ask.css ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bpfwp-hidden {
2
+ display: none;
3
+ }
4
+ .bpfwp-clear {
5
+ clear: both;
6
+ }
7
+ .bpfwp-main-dashboard-review-ask {
8
+ border-left-color: #1b335f;
9
+ }
10
+ .bpfwp-review-ask-plugin-icon {
11
+ height: 100px;
12
+ width: 100px;
13
+ float: left;
14
+ margin: 12px 24px 16px 10px;
15
+ background-image: url(../img/bpfwp-icon.png);
16
+ background-size: contain;
17
+ }
18
+ .bpfwp-review-ask-text p {
19
+ padding: 10px 20px;
20
+ font-weight: 600;
21
+ font-size: 20px;
22
+ }
23
+ .bpfwp-review-ask-action {
24
+ width: 90px;
25
+ padding: 6px;
26
+ margin-right: 18px;
27
+ text-align: center;
28
+ float: left;
29
+ border-radius: 4px;
30
+ cursor: pointer;
31
+ }
32
+ .bpfwp-review-ask-white {
33
+ color: #999999;
34
+ border: 1px solid #bbbbbb;
35
+ }
36
+ .bpfwp-review-ask-green {
37
+ color: #ffffff;
38
+ background: #7CA3BF;
39
+ border: 1px solid #7CA3BF;
40
+ font-weight: 600;
41
+ }
42
+ .bpfwp-review-ask-green a {
43
+ color: #ffffff;
44
+ text-decoration: none;
45
+ }
46
+ .bpfwp-review-ask-feedback-form {
47
+ position: relative;
48
+ float: left;
49
+ }.bpfwp-review-ask-feedback-explanation textarea {
50
+ height: 70px;
51
+ width: 480px;
52
+ }
53
+ .bpfwp-review-ask-send-feedback {
54
+ margin: 10px 0px;
55
+ }
56
+
57
+
58
+ .bpfwp-review-ask-review-text span {
59
+ font-size: .8em;
60
+ font-weight: normal;
61
+ }
assets/css/plugin-deactivation.css ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bpfwp-deactivate-survey-modal {
2
+ display: none;
3
+ table-layout: fixed;
4
+ position: fixed;
5
+ z-index: 9999;
6
+ width: 100%;
7
+ height: 100%;
8
+ text-align: center;
9
+ font-size: 14px;
10
+ top: 0;
11
+ left: 0;
12
+ background: rgba(0,0,0,0.8);
13
+ }
14
+ .bpfwp-deactivate-survey-wrap {
15
+ display: table-cell;
16
+ vertical-align: middle;
17
+ }
18
+ .bpfwp-deactivate-survey {
19
+ background-color: #fff;
20
+ max-width: 550px;
21
+ margin: 0 auto;
22
+ padding: 30px;
23
+ text-align: left;
24
+ }
25
+ .bpfwp-deactivate-survey .error {
26
+ display: block;
27
+ color: red;
28
+ margin: 0 0 10px 0;
29
+ }
30
+ .bpfwp-deactivate-survey-title {
31
+ display: block;
32
+ font-size: 18px;
33
+ font-weight: 700;
34
+ text-transform: uppercase;
35
+ border-bottom: 1px solid #ddd;
36
+ padding: 0 0 18px 0;
37
+ margin: 0 0 18px 0;
38
+ }
39
+ .bpfwp-deactivate-survey-title span {
40
+ color: #999;
41
+ margin-right: 10px;
42
+ }
43
+ .bpfwp-deactivate-survey-desc {
44
+ display: block;
45
+ font-weight: 600;
46
+ margin: 0 0 18px 0;
47
+ }
48
+ .bpfwp-deactivate-survey-option {
49
+ margin: 0 0 10px 0;
50
+ }
51
+ .bpfwp-deactivate-survey-option-input {
52
+ margin-right: 10px !important;
53
+ }
54
+ .bpfwp-deactivate-survey-option-details {
55
+ display: none;
56
+ width: 90%;
57
+ margin: 10px 0 0 30px;
58
+ }
59
+ .bpfwp-deactivate-survey-footer {
60
+ margin-top: 18px;
61
+ }
62
+ .bpfwp-deactivate-survey-deactivate {
63
+ float: right;
64
+ font-size: 13px;
65
+ color: #ccc;
66
+ text-decoration: none;
67
+ padding-top: 7px;
68
+ }
assets/js/admin-bpfwp-welcome-screen.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ jQuery('.bpfwp-welcome-screen-box h2').on('click', function() {
3
+ var section = jQuery(this).parent().data('screen');
4
+ bpfwp_toggle_section(section);
5
+ });
6
+
7
+ jQuery('.bpfwp-welcome-screen-next-button').on('click', function() {
8
+ var section = jQuery(this).data('nextaction');
9
+ bpfwp_toggle_section(section);
10
+ });
11
+
12
+ jQuery('.bpfwp-welcome-screen-previous-button').on('click', function() {
13
+ var section = jQuery(this).data('previousaction');
14
+ bpfwp_toggle_section(section);
15
+ });
16
+
17
+ jQuery('.bpfwp-welcome-screen-add-contact-page-button').on('click', function() {
18
+ var contact_page_title = jQuery('.bpfwp-welcome-screen-add-contact-page-name input').val();
19
+
20
+ var data = 'contact_page_title=' + contact_page_title + '&action=bpfwp_welcome_add_contact_page';
21
+ jQuery.post(ajaxurl, data, function(response) {});
22
+
23
+ bpfwp_toggle_section('set_contact_info');
24
+ });
25
+
26
+ jQuery('.bpfwp-welcome-screen-set-contact-information-button').on('click', function() {
27
+
28
+ jQuery('.bpfwp-welcome-screen-show-created-sections').show();
29
+
30
+ var schema_type = jQuery('select[name="bpfwp-schema-type"]').val();
31
+ var name = jQuery('input[name="bpfwp-contact-name"]').val();
32
+ var address = jQuery('textarea[name="bpfwp-contact-address"]').val();
33
+ var phone = jQuery('input[name="bpfwp-contact-phone"]').val();
34
+ var email = jQuery('input[name="bpfwp-contact-email"]').val();
35
+
36
+ jQuery('input[name="bpfwp-contact-name"]').val('');
37
+ jQuery('textarea[name="bpfwp-contact-address"]').val('');
38
+ jQuery('input[name="bpfwp-contact-phone"]').val('');
39
+ jQuery('input[name="bpfwp-contact-email"]').val('');
40
+
41
+ var data = 'schema_type=' + schema_type + '&name=' + name + '&address=' + address + '&phone=' + phone + '&email=' + email + '&action=bpfwp_welcome_set_contact_information';
42
+ jQuery.post(ajaxurl, data, function(response) {});
43
+
44
+ bpfwp_toggle_section('set_hours');
45
+ });
46
+
47
+ jQuery('.bpfwp-welcome-screen-set-hours-button').on('click', function() {
48
+
49
+ var form_data = jQuery('.bpfwp-welcome-screen-form').serialize();
50
+
51
+ var data = form_data + '&action=bpfwp_welcome_set_opening_hours';
52
+ jQuery.post(ajaxurl, data, function(response) {});
53
+
54
+ bpfwp_toggle_section('create_schema');
55
+ });
56
+
57
+ });
58
+
59
+ function bpfwp_toggle_section(page) {
60
+ jQuery('.bpfwp-welcome-screen-box').removeClass('bpfwp-welcome-screen-open');
61
+ jQuery('.bpfwp-welcome-screen-' + page).addClass('bpfwp-welcome-screen-open');
62
+ }
assets/js/dashboard-review-ask.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ jQuery('.bpfwp-main-dashboard-review-ask').css('display', 'block');
3
+
4
+ jQuery('.bpfwp-main-dashboard-review-ask').on('click', function(event) {
5
+ if (jQuery(event.srcElement).hasClass('notice-dismiss')) {
6
+ var data = 'ask_review_time=3&action=bpfwp_hide_review_ask';
7
+ jQuery.post(ajaxurl, data, function() {});
8
+ }
9
+ });
10
+
11
+ jQuery('.bpfwp-review-ask-yes').on('click', function() {
12
+ jQuery('.bpfwp-review-ask-feedback-text').removeClass('bpfwp-hidden');
13
+ jQuery('.bpfwp-review-ask-starting-text').addClass('bpfwp-hidden');
14
+
15
+ jQuery('.bpfwp-review-ask-no-thanks').removeClass('bpfwp-hidden');
16
+ jQuery('.bpfwp-review-ask-review').removeClass('bpfwp-hidden');
17
+
18
+ jQuery('.bpfwp-review-ask-not-really').addClass('bpfwp-hidden');
19
+ jQuery('.bpfwp-review-ask-yes').addClass('bpfwp-hidden');
20
+
21
+ var data = 'ask_review_time=7&action=bpfwp_hide_review_ask';
22
+ jQuery.post(ajaxurl, data, function() {});
23
+ });
24
+
25
+ jQuery('.bpfwp-review-ask-not-really').on('click', function() {
26
+ jQuery('.bpfwp-review-ask-review-text').removeClass('bpfwp-hidden');
27
+ jQuery('.bpfwp-review-ask-starting-text').addClass('bpfwp-hidden');
28
+
29
+ jQuery('.bpfwp-review-ask-feedback-form').removeClass('bpfwp-hidden');
30
+ jQuery('.bpfwp-review-ask-actions').addClass('bpfwp-hidden');
31
+
32
+ var data = 'ask_review_time=1000&action=bpfwp_hide_review_ask';
33
+ jQuery.post(ajaxurl, data, function() {});
34
+ });
35
+
36
+ jQuery('.bpfwp-review-ask-no-thanks').on('click', function() {
37
+ var data = 'ask_review_time=1000&action=bpfwp_hide_review_ask';
38
+ jQuery.post(ajaxurl, data, function() {});
39
+
40
+ jQuery('.bpfwp-main-dashboard-review-ask').css('display', 'none');
41
+ });
42
+
43
+ jQuery('.bpfwp-review-ask-review').on('click', function() {
44
+ jQuery('.bpfwp-review-ask-feedback-text').addClass('bpfwp-hidden');
45
+ jQuery('.bpfwp-review-ask-thank-you-text').removeClass('bpfwp-hidden');
46
+
47
+ var data = 'ask_review_time=1000&action=bpfwp_hide_review_ask';
48
+ jQuery.post(ajaxurl, data, function() {});
49
+ });
50
+
51
+ jQuery('.bpfwp-review-ask-send-feedback').on('click', function() {
52
+ var feedback = jQuery('.bpfwp-review-ask-feedback-explanation textarea').val();
53
+ var email_address = jQuery('.bpfwp-review-ask-feedback-explanation input[name="feedback_email_address"]').val();
54
+ var data = 'feedback=' + feedback + '&email_address=' + email_address + '&action=bpfwp_send_feedback';
55
+ jQuery.post(ajaxurl, data, function() {});
56
+
57
+ var data = 'ask_review_time=1000&action=bpfwp_hide_review_ask';
58
+ jQuery.post(ajaxurl, data, function() {});
59
+
60
+ jQuery('.bpfwp-review-ask-feedback-form').addClass('bpfwp-hidden');
61
+ jQuery('.bpfwp-review-ask-review-text').addClass('bpfwp-hidden');
62
+ jQuery('.bpfwp-review-ask-thank-you-text').removeClass('bpfwp-hidden');
63
+ });
64
+ });
assets/js/plugin-deactivation.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($){
2
+ var $deactivateLink = $('#the-list').find('[data-slug="business-profile"] span.deactivate a'),
3
+ $overlay = $('#bpfwp-deactivate-survey-business-profile'),
4
+ $form = $overlay.find('form'),
5
+ formOpen = false;
6
+ // Plugin listing table deactivate link.
7
+ $deactivateLink.on('click', function(event) {
8
+ event.preventDefault();
9
+ $overlay.css('display', 'table');
10
+ formOpen = true;
11
+ $form.find('.bpfwp-deactivate-survey-option:first-of-type input[type=radio]').focus();
12
+ });
13
+ // Survey radio option selected.
14
+ $form.on('change', 'input[type=radio]', function(event) {
15
+ event.preventDefault();
16
+ $form.find('input[type=text], .error').hide();
17
+ $form.find('.bpfwp-deactivate-survey-option').removeClass('selected');
18
+ $(this).closest('.bpfwp-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
19
+ });
20
+ // Survey Skip & Deactivate.
21
+ $form.on('click', '.bpfwp-deactivate-survey-deactivate', function(event) {
22
+ event.preventDefault();
23
+ location.href = $deactivateLink.attr('href');
24
+ });
25
+ // Survey submit.
26
+ $form.submit(function(event) {
27
+ event.preventDefault();
28
+ if (! $form.find('input[type=radio]:checked').val()) {
29
+ $form.find('.bpfwp-deactivate-survey-footer').prepend('<span class="error">Please select an option below</span>');
30
+ return;
31
+ }
32
+ var data = {
33
+ code: $form.find('.selected input[type=radio]').val(),
34
+ install_time: $form.data('installtime'),
35
+ reason: $form.find('.selected .bpfwp-deactivate-survey-option-reason').text(),
36
+ details: $form.find('.selected input[type=text]').val(),
37
+ site: bpfwp_deactivation_data.site_url,
38
+ plugin: 'Five-Star Business Profile'
39
+ }
40
+ var submitSurvey = $.post('https://www.fivestarplugins.com/key-check/Deactivation_Surveys.php', data);
41
+ submitSurvey.always(function() {
42
+ location.href = $deactivateLink.attr('href');
43
+ });
44
+ });
45
+ // Exit key closes survey when open.
46
+ $(document).keyup(function(event) {
47
+ if (27 === event.keyCode && formOpen) {
48
+ $overlay.hide();
49
+ formOpen = false;
50
+ $deactivateLink.focus();
51
+ }
52
+ });
53
+ });
business-profile.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Five Star Business Profile and Schema
4
  * Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
5
  * Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
6
- * Version: 2.0.3
7
  * Author: Five Star Plugins
8
  * Author URI: https://www.fivestarplugins.com
9
  * License: GPLv3
@@ -97,7 +97,7 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
97
  define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
98
  define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
99
  define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
100
- define( 'BPFWP_VERSION', '1.2.7' );
101
  }
102
 
103
  /**
@@ -111,8 +111,11 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
111
  require_once BPFWP_PLUGIN_DIR . '/includes/class-blocks.php';
112
  require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
113
  require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
 
 
114
  require_once BPFWP_PLUGIN_DIR . '/includes/class-integrations.php';
115
  //require_once BPFWP_PLUGIN_DIR . '/includes/class-permissions.php';
 
116
  require_once BPFWP_PLUGIN_DIR . '/includes/class-schemas-manager.php';
117
  require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema.php';
118
  require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
@@ -131,6 +134,9 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
131
  protected function instantiate() {
132
  new bpfwpCompatibility();
133
  new bpfwpIntegrations(); // Deprecated in v1.1.
 
 
 
134
  //$this->permissions = new bpfwpPermissions();
135
  $this->schemas = new bpfwpSchemasManager();
136
  $this->settings = new bpfwpSettings();
@@ -207,6 +213,7 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
207
  register_widget( 'bpfwpContactCardWidget' );
208
  }
209
 
 
210
  public function display_header_area() {
211
  global $bpfwp_controller, $post;
212
 
3
  * Plugin Name: Five Star Business Profile and Schema
4
  * Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
5
  * Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
6
+ * Version: 2.0.4
7
  * Author: Five Star Plugins
8
  * Author URI: https://www.fivestarplugins.com
9
  * License: GPLv3
97
  define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
98
  define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
99
  define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
100
+ define( 'BPFWP_VERSION', '2.0.4' );
101
  }
102
 
103
  /**
111
  require_once BPFWP_PLUGIN_DIR . '/includes/class-blocks.php';
112
  require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
113
  require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
114
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-deactivation-survey.php';
115
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-installation-walkthrough.php';
116
  require_once BPFWP_PLUGIN_DIR . '/includes/class-integrations.php';
117
  //require_once BPFWP_PLUGIN_DIR . '/includes/class-permissions.php';
118
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-review-ask.php';
119
  require_once BPFWP_PLUGIN_DIR . '/includes/class-schemas-manager.php';
120
  require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema.php';
121
  require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
134
  protected function instantiate() {
135
  new bpfwpCompatibility();
136
  new bpfwpIntegrations(); // Deprecated in v1.1.
137
+ new bpfwpDeactivationSurvey();
138
+ new bpfwpReviewAsk();
139
+ new bpfwpInstallationWalkthrough();
140
  //$this->permissions = new bpfwpPermissions();
141
  $this->schemas = new bpfwpSchemasManager();
142
  $this->settings = new bpfwpSettings();
213
  register_widget( 'bpfwpContactCardWidget' );
214
  }
215
 
216
+
217
  public function display_header_area() {
218
  global $bpfwp_controller, $post;
219
 
includes/class-dashboard.php CHANGED
@@ -34,6 +34,8 @@ class bpfwpDashboard {
34
  array($this, 'display_dashboard_screen')
35
  );
36
 
 
 
37
  // Create a new sub-menu in the order that we want
38
  $new_submenu = array();
39
  $menu_item_count = 5;
34
  array($this, 'display_dashboard_screen')
35
  );
36
 
37
+ if ( ! isset( $submenu['bpfwp-business-profile'] ) or ! is_array( $submenu['bpfwp-business-profile'] ) ) { return; }
38
+
39
  // Create a new sub-menu in the order that we want
40
  $new_submenu = array();
41
  $menu_item_count = 5;
includes/class-deactivation-survey.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+
4
+ if ( !class_exists( 'bpfwpDeactivationSurvey' ) ) {
5
+ /**
6
+ * Class to handle plugin deactivation survey
7
+ *
8
+ * @since 2.0.4
9
+ */
10
+ class bpfwpDeactivationSurvey {
11
+
12
+ public function __construct() {
13
+ add_action( 'current_screen', array( $this, 'maybe_add_survey' ) );
14
+ }
15
+
16
+ public function maybe_add_survey() {
17
+ if ( in_array( get_current_screen()->id, array( 'plugins', 'plugins-network' ), true) ) {
18
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_deactivation_scripts') );
19
+ add_action( 'admin_footer', array( $this, 'add_deactivation_html') );
20
+ }
21
+ }
22
+
23
+ public function enqueue_deactivation_scripts() {
24
+ wp_enqueue_style( 'bpfwp-deactivation-css', BPFWP_PLUGIN_URL . '/assets/css/plugin-deactivation.css' );
25
+ wp_enqueue_script( 'bpfwp-deactivation-js', BPFWP_PLUGIN_URL . '/assets/js/plugin-deactivation.js', array( 'jquery' ) );
26
+
27
+ wp_localize_script( 'bpfwp-deactivation-js', 'bpfwp_deactivation_data', array( 'site_url' => site_url() ) );
28
+ }
29
+
30
+ public function add_deactivation_html() {
31
+
32
+ $install_time = get_option( 'bpfwp-installation-time' );
33
+
34
+ $options = array(
35
+ 1 => array(
36
+ 'title' => esc_html__( 'I no longer need the plugin', 'business-profile' ),
37
+ ),
38
+ 2 => array(
39
+ 'title' => esc_html__( 'I\'m switching to a different plugin', 'business-profile' ),
40
+ 'details' => esc_html__( 'Please share which plugin', 'business-profile' ),
41
+ ),
42
+ 3 => array(
43
+ 'title' => esc_html__( 'I couldn\'t get the plugin to work', 'business-profile' ),
44
+ 'details' => esc_html__( 'Please share what wasn\'t working', 'business-profile' ),
45
+ ),
46
+ 4 => array(
47
+ 'title' => esc_html__( 'It\'s a temporary deactivation', 'business-profile' ),
48
+ ),
49
+ 5 => array(
50
+ 'title' => esc_html__( 'Other', 'business-profile' ),
51
+ 'details' => esc_html__( 'Please share the reason', 'business-profile' ),
52
+ ),
53
+ );
54
+ ?>
55
+ <div class="bpfwp-deactivate-survey-modal" id="bpfwp-deactivate-survey-business-profile">
56
+ <div class="bpfwp-deactivate-survey-wrap">
57
+ <form class="bpfwp-deactivate-survey" method="post" data-installtime="<?php echo $install_time; ?>">
58
+ <span class="bpfwp-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'business-profile' ); ?></span>
59
+ <span class="bpfwp-deactivate-survey-desc"><?php echo __('If you have a moment, please share why you are deactivating Five-Star Business Profile:', 'business-profile' ); ?></span>
60
+ <div class="bpfwp-deactivate-survey-options">
61
+ <?php foreach ( $options as $id => $option ) : ?>
62
+ <div class="bpfwp-deactivate-survey-option">
63
+ <label for="bpfwp-deactivate-survey-option-business-profile-<?php echo $id; ?>" class="bpfwp-deactivate-survey-option-label">
64
+ <input id="bpfwp-deactivate-survey-option-business-profile-<?php echo $id; ?>" class="bpfwp-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
65
+ <span class="bpfwp-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
66
+ </label>
67
+ <?php if ( ! empty( $option['details'] ) ) : ?>
68
+ <input class="bpfwp-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
69
+ <?php endif; ?>
70
+ </div>
71
+ <?php endforeach; ?>
72
+ </div>
73
+ <div class="bpfwp-deactivate-survey-footer">
74
+ <button type="submit" class="bpfwp-deactivate-survey-submit button button-primary button-large"><?php _e('Submit and Deactivate', 'business-profile' ); ?></button>
75
+ <a href="#" class="bpfwp-deactivate-survey-deactivate"><?php _e('Skip and Deactivate', 'business-profile' ); ?></a>
76
+ </div>
77
+ </form>
78
+ </div>
79
+ </div>
80
+ <?php
81
+ }
82
+ }
83
+
84
+ }
includes/class-installation-walkthrough.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class to handle everything related to the walk-through that runs on plugin activation
5
+ */
6
+
7
+ if ( !defined( 'ABSPATH' ) )
8
+ exit;
9
+
10
+ class bpfwpInstallationWalkthrough {
11
+
12
+ // The scheduler control so that a business can sets its opening hours
13
+ public $scheduler;
14
+
15
+ public function __construct() {
16
+ add_action( 'admin_menu', array($this, 'register_install_screen' ));
17
+ add_action( 'admin_head', array($this, 'hide_install_screen_menu_item' ));
18
+ add_action( 'admin_init', array($this, 'redirect'), 9999);
19
+
20
+ add_action('admin_head', array($this, 'admin_enqueue'));
21
+
22
+ require_once BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/classes/AdminPageSetting.class.php';
23
+ require_once BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php';
24
+
25
+ $args = array(
26
+ 'id' => 'opening-hours',
27
+ 'page' => 'walkthrough',
28
+ 'title' => __( 'Opening Hours', 'business-profile' ),
29
+ 'description' => __( 'Define your weekly opening hours by adding scheduling rules.', 'business-profile' ),
30
+ 'weekdays' => array(
31
+ 'monday' => _x( 'Mo', 'Monday abbreviation', 'business-profile' ),
32
+ 'tuesday' => _x( 'Tu', 'Tuesday abbreviation', 'business-profile' ),
33
+ 'wednesday' => _x( 'We', 'Wednesday abbreviation', 'business-profile' ),
34
+ 'thursday' => _x( 'Th', 'Thursday abbreviation', 'business-profile' ),
35
+ 'friday' => _x( 'Fr', 'Friday abbreviation', 'business-profile' ),
36
+ 'saturday' => _x( 'Sa', 'Saturday abbreviation', 'business-profile' ),
37
+ 'sunday' => _x( 'Su', 'Sunday abbreviation', 'business-profile' ),
38
+ ),
39
+ 'time_format' => _x( 'h:i A', 'Time format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats', 'business-profile' ),
40
+ 'date_format' => _x( 'mmmm d, yyyy', 'Date format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-rules', 'business-profile' ),
41
+ 'disable_weeks' => true,
42
+ 'disable_date' => true,
43
+ 'strings' => array(
44
+ 'add_rule' => __( 'Add another opening time', 'business-profile' ),
45
+ 'weekly' => _x( 'Weekly', 'Format of a scheduling rule', 'business-profile' ),
46
+ 'monthly' => _x( 'Monthly', 'Format of a scheduling rule', 'business-profile' ),
47
+ 'date' => _x( 'Date', 'Format of a scheduling rule', 'business-profile' ),
48
+ 'weekdays' => _x( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', 'business-profile' ),
49
+ 'month_weeks' => _x( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', 'business-profile' ),
50
+ 'date_label' => _x( 'Date', 'Label to select a date for a scheduling rule', 'business-profile' ),
51
+ 'time_label' => _x( 'Time', 'Label to select a time slot for a scheduling rule', 'business-profile' ),
52
+ 'allday' => _x( 'All day', 'Label to set a scheduling rule to last all day', 'business-profile' ),
53
+ 'start' => _x( 'Start', 'Label for the starting time of a scheduling rule', 'business-profile' ),
54
+ 'end' => _x( 'End', 'Label for the ending time of a scheduling rule', 'business-profile' ),
55
+ 'set_time_prompt' => _x( 'All day long. Want to %sset a time slot%s?', 'Prompt displayed when a scheduling rule is set without any time restrictions', 'business-profile' ),
56
+ 'toggle' => _x( 'Open and close this rule', 'Toggle a scheduling rule open and closed', 'business-profile' ),
57
+ 'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'business-profile' ),
58
+ 'delete_schedule' => __( 'Delete scheduling rule', 'business-profile' ),
59
+ 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'business-profile' ),
60
+ 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'business-profile' ),
61
+ 'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'business-profile' ),
62
+ 'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'business-profile' ),
63
+ 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'business-profile' ),
64
+ 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm', 'business-profile' ),
65
+ 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm', 'business-profile' ),
66
+ 'separator' => _x( '&mdash;', 'Separator between times of a scheduling rule', 'business-profile' ),
67
+ ),
68
+ 'args' => array(
69
+ 'class' => 'bpfwp-opening-hours'
70
+ )
71
+ );
72
+ $this->scheduler = new sapAdminPageSettingScheduler_2_1_2( $args );
73
+
74
+ add_action('wp_ajax_bpfwp_welcome_add_contact_page', array($this, 'add_contact_page'));
75
+ add_action('wp_ajax_bpfwp_welcome_set_contact_information', array($this, 'set_contact_information'));
76
+ add_action('wp_ajax_bpfwp_welcome_set_opening_hours', array($this, 'set_opening_hours'));
77
+ }
78
+
79
+ public function redirect() {
80
+ global $bpfwp_controller;
81
+
82
+ if ( ! get_transient( 'bpfwp-getting-started' ) )
83
+ return;
84
+
85
+ delete_transient( 'bpfwp-getting-started' );
86
+
87
+ if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
88
+ return;
89
+
90
+ $plugin_items = get_posts(array('post_type' => array( $bpfwp_controller->cpts->schema_cpt_slug, $bpfwp_controller->cpts->location_cpt_slug)));
91
+ if (!empty($plugin_items)) {
92
+ set_transient('bpfwp-admin-install-notice', true, 5);
93
+ return;
94
+ }
95
+
96
+ wp_safe_redirect( admin_url( 'index.php?page=bpfwp-getting-started' ) );
97
+ exit;
98
+ }
99
+
100
+ public function register_install_screen() {
101
+ add_dashboard_page(
102
+ esc_html__( 'Five Star Business Profile and Schema - Welcome!', 'business-profile' ),
103
+ esc_html__( 'Five Star Business Profile and Schema - Welcome!', 'business-profile' ),
104
+ 'manage_options',
105
+ 'bpfwp-getting-started',
106
+ array($this, 'display_install_screen')
107
+ );
108
+ }
109
+
110
+ public function hide_install_screen_menu_item() {
111
+ remove_submenu_page( 'index.php', 'bpfwp-getting-started' );
112
+ }
113
+
114
+ public function add_contact_page() {
115
+ global $bpfwp_controller;
116
+
117
+ $contact_page = wp_insert_post(array(
118
+ 'post_title' => (isset($_POST['contact_page_title']) ? stripslashes_deep($_POST['contact_page_title']) : ''),
119
+ 'post_content' => '',
120
+ 'post_status' => 'publish',
121
+ 'post_type' => 'page'
122
+ ));
123
+
124
+ $bpfwp_controller->settings->set_setting( 'contact-page', $contact_page );
125
+
126
+ exit();
127
+ }
128
+
129
+ public function set_contact_information() {
130
+ global $bpfwp_controller;
131
+
132
+ $bpfwp_controller->settings->set_setting( 'schema_type', sanitize_text_field( $_POST['schema_type'] ) );
133
+ $bpfwp_controller->settings->set_setting( 'name', sanitize_text_field( $_POST['name'] ) );
134
+ $bpfwp_controller->settings->set_setting( 'address', array( 'text' => sanitize_textarea_field( $_POST['address'] ) ) );
135
+ $bpfwp_controller->settings->set_setting( 'phone', sanitize_text_field( $_POST['phone'] ) );
136
+ $bpfwp_controller->settings->set_setting( 'contact-email', sanitize_text_field( $_POST['email'] ) );
137
+
138
+ exit();
139
+ }
140
+
141
+ public function set_opening_hours() {
142
+ global $bpfwp_controller;
143
+
144
+ $sanitized_data = $this->scheduler->sanitize_callback_wrapper( $_POST['walkthrough']['opening-hours'] );
145
+
146
+ $bpfwp_controller->settings->set_setting( 'opening-hours', $sanitized_data );
147
+
148
+ exit();
149
+ }
150
+
151
+ public function admin_enqueue() {
152
+ wp_enqueue_style( 'bpfwp-welcome-screen', BPFWP_PLUGIN_URL . '/assets/css/admin-bpfwp-welcome-screen.css', array(), BPFWP_VERSION );
153
+
154
+ foreach ( $this->scheduler->styles as $slug => $style ) {
155
+ wp_enqueue_style( $slug , BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/' . $style['path'], $style['dependencies'], $style['version'], $style['media'] );
156
+ }
157
+
158
+ wp_enqueue_script( 'bpfwp-getting-started', BPFWP_PLUGIN_URL . '/assets/js/admin-bpfwp-welcome-screen.js', array('jquery'), BPFWP_VERSION );
159
+
160
+ foreach ( $this->scheduler->scripts as $slug => $script ) {
161
+ wp_enqueue_script( $slug , BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/' . $script['path'], $script['dependencies'], $script['version'], $script['footer'] );
162
+ }
163
+ }
164
+
165
+ public function display_install_screen() { ?>
166
+ <?php global $bpfwp_controller; ?>
167
+ <?php $schema_types = $bpfwp_controller->settings->get_schema_types(); ?>
168
+
169
+ <div class='bpfwp-welcome-screen'>
170
+ <form class='bpfwp-welcome-screen-form'>
171
+ <?php if (!isset($_GET['exclude'])) { ?>
172
+ <div class='bpfwp-welcome-screen-header'>
173
+ <h1><?php _e('Welcome to the Five Star Business Profile and Schema', 'business-profile'); ?></h1>
174
+ <p><?php _e('Thanks for choosing the Five Star Business Profile and Schema! The following will help you get started with the setup of the plugin by creating a contact page, menu items and menu page, as well as configuring a few key options.', 'business-profile'); ?></p>
175
+ </div>
176
+ <?php } ?>
177
+
178
+ <div class='bpfwp-welcome-screen-box bpfwp-welcome-screen-create_contact_page bpfwp-welcome-screen-open' data-screen='create_contact_page'>
179
+ <h2><?php _e('1. Add a Contact Page', 'business-profile'); ?></h2>
180
+ <div class='bpfwp-welcome-screen-box-content'>
181
+ <p><?php _e('You can create a dedicated contact page below, or skip this step and add your contact schema to a page you\'ve already created manually.', 'business-profile'); ?></p>
182
+ <div class='bpfwp-welcome-screen-menu-page'>
183
+ <div class='bpfwp-welcome-screen-add-contact-page-name bpfwp-welcome-screen-box-content-divs'><label><?php _e('Page Title:', 'business-profile'); ?></label><input type='text' value='Contact' /></div>
184
+ <div class='bpfwp-welcome-screen-add-contact-page-button'><?php _e('Create Page', 'business-profile'); ?></div>
185
+ </div>
186
+ <div class="bpfwp-welcome-clear"></div>
187
+ <div class='bpfwp-welcome-screen-next-button' data-nextaction='set_contact_info'><?php _e('Next Step', 'business-profile'); ?></div>
188
+ <div class='clear'></div>
189
+ </div>
190
+ </div>
191
+
192
+ <div class='bpfwp-welcome-screen-box bpfwp-welcome-screen-set_contact_info' data-screen='set_contact_info'>
193
+ <h2><?php _e('2. Set Contact Information', 'business-profile'); ?></h2>
194
+ <div class='bpfwp-welcome-screen-box-content'>
195
+ <p><?php _e('Set the information that will be displayed on your contact page and in the contact schema for your business', 'business-profile'); ?></p>
196
+ <div class='bpfwp-welcome-screen-key-options'>
197
+ <div class='rtb-welcome-screen-option'>
198
+ <label class='bpfwp-option-name' for='bpfwp-contact-name'>Schema Type:</label>
199
+ <select name='bpfwp-schema-type'>
200
+ <?php foreach ( $schema_types as $schema_type => $schema_name ) { ?>
201
+ <option value='<?php echo $schema_type ?>'><?php echo $schema_name; ?></option>
202
+ <?php } ?>
203
+ </select>
204
+ </div>
205
+ <div class='rtb-welcome-screen-option'>
206
+ <label class='bpfwp-option-name' for='bpfwp-contact-name'>Name:</label>
207
+ <input type='text' name='bpfwp-contact-name' />
208
+ </div>
209
+ <div class='rtb-welcome-screen-option'>
210
+ <label class='bpfwp-option-name' for='bpfwp-contact-address'>Address:</label>
211
+ <textarea name='bpfwp-contact-address'></textarea>
212
+ </div>
213
+ <div class='rtb-welcome-screen-option'>
214
+ <label class='bpfwp-option-name' for='bpfwp-contact-name'>Phone:</label>
215
+ <input type='text' name='bpfwp-contact-phone' />
216
+ </div>
217
+ <div class='rtb-welcome-screen-option'>
218
+ <label class='bpfwp-option-name' for='bpfwp-contact-name'>Email:</label>
219
+ <input type='text' name='bpfwp-contact-email' value='<?php echo get_option('admin_email'); ?>' />
220
+ </div>
221
+ <div class='bpfwp-welcome-screen-set-contact-information-button'><?php _e('Set Contact Information', 'business-profile'); ?></div>
222
+ </div>
223
+ <div class='clear'></div>
224
+ <div class='bpfwp-welcome-screen-next-button bpfwp-welcome-screen-next-button-not-top-margin' data-nextaction='set_hours'><?php _e('Next Step', 'business-profile'); ?></div>
225
+ <div class='bpfwp-welcome-screen-previous-button' data-previousaction='create_contact_page'><?php _e('Previous Step', 'business-profile'); ?></div>
226
+ <div class='clear'></div>
227
+ </div>
228
+ </div>
229
+
230
+ <div class='bpfwp-welcome-screen-box bpfwp-welcome-screen-set_hours' data-screen='set_hours'>
231
+ <h2><?php _e('3. Set Opening Hours', 'business-profile'); ?></h2>
232
+ <div class='bpfwp-welcome-screen-box-content'>
233
+ <div class='bpfwp-welcome-screen-set-hours-div'>
234
+
235
+ <?php $this->scheduler->display_setting(); ?>
236
+
237
+ <div class='bpfwp-welcome-screen-set-hours-button'><?php _e('Set Hours', 'business-profile'); ?></div>
238
+ </div>
239
+ <div class="bpfwp-welcome-clear"></div>
240
+ <div class='bpfwp-welcome-screen-next-button' data-nextaction='create_schema'><?php _e('Next Step', 'business-profile'); ?></div>
241
+ <div class='bpfwp-welcome-screen-previous-button' data-previousaction='set_contact_info'><?php _e('Previous Step', 'business-profile'); ?></div>
242
+ <div class='clear'></div>
243
+ </div>
244
+ </div>
245
+
246
+ <div class='bpfwp-welcome-screen-box bpfwp-welcome-screen-create_schema' data-screen='create_schema'>
247
+ <h2><?php _e('4. Create a Schema', 'business-profile'); ?></h2>
248
+ <div class='bpfwp-welcome-screen-box-content'>
249
+ <p><?php _e('You can create a schema for items such as blog posts, products, FAQs, etc., or you can create multiple schema later.', 'business-profile'); ?></p>
250
+ <div class='bpfwp-welcome-screen-create-schema-link-div'>
251
+ <a href='post-new.php?post_type=<?php echo $bpfwp_controller->cpts->schema_cpt_slug; ?>'><?php _e('Create a schema now', 'business-profile'); ?></a>
252
+ </div>
253
+ <div class="bpfwp-welcome-clear"></div>
254
+ <div class='bpfwp-welcome-screen-previous-button' data-previousaction='set_hours'><?php _e('Previous Step', 'business-profile'); ?></div>
255
+ <div class='bpfwp-welcome-screen-finish-button'><a href='admin.php?page=bpfwp-dashboard'><?php _e('Finish', 'business-profile'); ?></a></div>
256
+ <div class='clear'></div>
257
+ </div>
258
+ </div>
259
+
260
+ <div class='bpfwp-welcome-screen-skip-container'>
261
+ <a href='edit.php?post_type=bpfwp-menu'><div class='bpfwp-welcome-screen-skip-button'><?php _e('Skip Setup', 'business-profile'); ?></div></a>
262
+ </div>
263
+ </form>
264
+ </div>
265
+
266
+ <?php }
267
+ }
268
+
269
+
270
+ ?>
includes/class-review-ask.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+
4
+ if ( !class_exists( 'bpfwpReviewAsk' ) ) {
5
+ /**
6
+ * Class to handle plugin review ask
7
+ *
8
+ * @since 2.0.4
9
+ */
10
+ class bpfwpReviewAsk {
11
+
12
+ public function __construct() {
13
+ add_action( 'admin_notices', array( $this, 'maybe_add_review_ask' ) );
14
+
15
+ add_action( 'wp_ajax_bpfwp_hide_review_ask', array( $this, 'hide_review_ask' ) );
16
+ add_action( 'wp_ajax_bpfwp_send_feedback', array( $this, 'send_feedback' ) );
17
+
18
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_review_ask_scripts') );
19
+ }
20
+
21
+ public function maybe_add_review_ask() {
22
+ $ask_review_time = get_option( 'bpfwp-review-ask-time' );
23
+
24
+ $install_time = get_option( 'bpfwp-installation-time' );
25
+ if ( ! $install_time ) { update_option( 'bpfwp-installation-time', time() ); }
26
+
27
+ $ask_review_time = $ask_review_time != '' ? $ask_review_time : $install_time + 3600*24*4;
28
+
29
+ if ($ask_review_time < time() and $install_time != '' and $install_time < time() - 3600*24*4) {
30
+
31
+ global $pagenow;
32
+
33
+ if ( $pagenow != 'post.php' && $pagenow != 'post-new.php' ) { ?>
34
+
35
+ <div class='notice notice-info is-dismissible bpfwp-main-dashboard-review-ask' style='display:none'>
36
+ <div class='bpfwp-review-ask-plugin-icon'></div>
37
+ <div class='bpfwp-review-ask-text'>
38
+ <p class='bpfwp-review-ask-starting-text'>Enjoying using the Five-Star Business Profile and Schema plugin?</p>
39
+ <p class='bpfwp-review-ask-feedback-text bpfwp-hidden'>Help us make the plugin better! Please take a minute to rate the plugin. Thanks!</p>
40
+ <p class='bpfwp-review-ask-review-text bpfwp-hidden'>Please let us know what we could do to make the plugin better!<br /><span>(If you would like a response, please include your email address.)</span></p>
41
+ <p class='bpfwp-review-ask-thank-you-text bpfwp-hidden'>Thank you for taking the time to help us!</p>
42
+ </div>
43
+ <div class='bpfwp-review-ask-actions'>
44
+ <div class='bpfwp-review-ask-action bpfwp-review-ask-not-really bpfwp-review-ask-white'>Not Really</div>
45
+ <div class='bpfwp-review-ask-action bpfwp-review-ask-yes bpfwp-review-ask-green'>Yes!</div>
46
+ <div class='bpfwp-review-ask-action bpfwp-review-ask-no-thanks bpfwp-review-ask-white bpfwp-hidden'>No Thanks</div>
47
+ <a href='https://wordpress.org/support/plugin/business-profile/reviews/' target='_blank'>
48
+ <div class='bpfwp-review-ask-action bpfwp-review-ask-review bpfwp-review-ask-green bpfwp-hidden'>OK, Sure</div>
49
+ </a>
50
+ </div>
51
+ <div class='bpfwp-review-ask-feedback-form bpfwp-hidden'>
52
+ <div class='bpfwp-review-ask-feedback-explanation'>
53
+ <textarea></textarea>
54
+ <br>
55
+ <input type="email" name="feedback_email_address" placeholder="<?php _e('Email Address', 'business-profile'); ?>">
56
+ </div>
57
+ <div class='bpfwp-review-ask-send-feedback bpfwp-review-ask-action bpfwp-review-ask-green'>Send Feedback</div>
58
+ </div>
59
+ <div class='bpfwp-clear'></div>
60
+ </div>
61
+
62
+ <?php
63
+ }
64
+ }
65
+ else {
66
+ wp_dequeue_script( 'bpfwp-review-ask-js' );
67
+ }
68
+ }
69
+
70
+ public function enqueue_review_ask_scripts() {
71
+ wp_enqueue_style( 'bpfwp-review-ask-css', BPFWP_PLUGIN_URL . '/assets/css/dashboard-review-ask.css' );
72
+ wp_enqueue_script( 'bpfwp-review-ask-js', BPFWP_PLUGIN_URL . '/assets/js/dashboard-review-ask.js', array( 'jquery' ), BPFWP_VERSION, true );
73
+ }
74
+
75
+ public function hide_review_ask() {
76
+
77
+ $ask_review_time = sanitize_text_field($_POST['ask_review_time']);
78
+
79
+ if ( get_option( 'bpfwp-review-ask-time' ) < time() + 3600*24 * $ask_review_time ) {
80
+ update_option( 'bpfwp-review-ask-time', time() + 3600*24 * $ask_review_time );
81
+ }
82
+
83
+ die();
84
+ }
85
+
86
+ public function send_feedback() {
87
+ $headers = 'Content-type: text/html;charset=utf-8' . "\r\n";
88
+ $feedback = sanitize_text_field($_POST['feedback']);
89
+ $feedback .= '<br /><br />Email Address: ';
90
+ $feedback .= sanitize_text_field($_POST['email_address']);
91
+
92
+ wp_mail('contact@fivestarplugins.com', 'BPFWP Feedback - Dashboard Form', $feedback, $headers);
93
+
94
+ die();
95
+ }
96
+ }
97
+
98
+ }
includes/class-settings.php CHANGED
@@ -184,6 +184,26 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
184
  return null;
185
  }
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  /**
188
  * Load the admin settings page.
189
  *
@@ -338,7 +358,7 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
338
  __( 'Google requires an API key to use their maps. %sGet an API key%s. A full walk-through is available in the %sdocumentiaton%s.', 'business-profile' ),
339
  '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key">',
340
  '</a>',
341
- '<a href="http://doc.themeofthecrop.com/plugins/business-profile/user/faq#google-maps-api-key">',
342
  '</a>'
343
  ),
344
  'args' => array(
@@ -590,7 +610,7 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
590
  array(
591
  'id' => 'article-rich-snippets',
592
  'title' => __( 'Post Rich Snippets', 'business-profile' ),
593
- 'label' => __( 'Automatically enable article \'Rich Snippets\' for Google for all regular posts on the site.', 'business-profile' ),
594
  'args' => array(
595
  'label_for' => 'bpfwp-settings[article-rich-snippets]',
596
  'class' => 'bpfwp-article-rich-snippets'
@@ -606,7 +626,7 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
606
  array(
607
  'id' => 'schema-default-helpers',
608
  'title' => __( 'Schema Default Helpers', 'business-profile' ),
609
- 'label' => __( 'Adds a helper pop-up that can be accessed on click on the Schema edit screen that list the available default options, functions and metas', 'business-profile' ),
610
  'args' => array(
611
  'label_for' => 'bpfwp-settings[schema-default-helpers]',
612
  'class' => 'bpfwp-schema-default-helpers'
@@ -621,7 +641,7 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
621
  array(
622
  'id' => 'bpfwp-integrations',
623
  'title' => __( 'Plugin Integrations', 'business-profile' ),
624
- 'tab' => 'bpfwp-premium'
625
  ),
626
  $integrations_permissions
627
  )
@@ -634,7 +654,7 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
634
  array(
635
  'id' => 'woocommerce-integration',
636
  'title' => __( 'WooCommerce Integration', 'business-profile' ),
637
- 'label' => __( 'Automatically enable product \'Rich Snippets\' for Google.', 'business-profile' ),
638
  'args' => array(
639
  'label_for' => 'bpfwp-settings[woocommerce-integration]',
640
  'class' => 'bpfwp-woocommerce-integration'
@@ -660,38 +680,187 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
660
  return apply_filters(
661
  'bp_schema_types',
662
  array(
663
- 'Organization' => 'Organization',
664
- 'Corporation' => 'Corporation',
665
- 'EducationalOrganization' => 'Educational Organization',
666
- 'GovernmentOrganization' => 'Government Organization',
667
- 'LocalBusiness' => 'Local Business',
668
- 'AnimalShelter' => '- Animal Shelter',
669
- 'AutomotiveBusiness' => '- Automotive Business',
670
- 'ChildCare' => '- Child Care',
671
- 'DryCleaningOrLaundry' => '- Dry Cleaning or Laundry',
672
- 'EmergencyService' => '- Emergency Service',
673
- 'EmploymentAgency' => '- Employment Agency',
674
- 'EntertainmentBusiness' => '- Entertainment Business',
675
- 'FinancialService' => '- Financial Service',
676
- 'FoodEstablishment' => '- Food Establishment',
677
- 'GovernmentOffice' => '- Government Office',
678
- 'HealthAndBeautyBusiness' => '- Health and Beauty Business',
679
- 'HomeAndConstructionBusiness' => '- Home and Construction Business',
680
- 'InternetCafe' => '- Internet Cafe',
681
- 'Library' => '- Library',
682
- 'LodgingBusiness' => '- Lodging Business',
683
- 'MedicalOrganization' => '- Medical Organization',
684
- 'RadioStation' => '- Radio Station',
685
- 'RealEstateAgent' => '- Real Estate Agent',
686
- 'RecyclingCenter' => '- Recycling Center',
687
- 'SelfStorage' => '- Self Storage',
688
- 'SportsActivityLocation' => '- Sports Activity Location',
689
- 'Store' => '- Store',
690
- 'TouristInformationCenter' => '- Tourist Information Center',
691
- 'TravelAgency' => '- Travel Agency',
692
- 'NGO' => 'NGO',
693
- 'PerformingGroup' => 'PerformingGroup',
694
- 'SportsTeam' => 'SportsTeam',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
695
  )
696
  );
697
  }
184
  return null;
185
  }
186
 
187
+ /**
188
+ * Set the value for a particular setting
189
+ *
190
+ *
191
+ * @since 2.0.4
192
+ * @access public
193
+ */
194
+ public function set_setting( $setting_name, $setting_value ) {
195
+
196
+ if ( empty( $this->settings ) ) {
197
+ $this->settings = get_option( 'bpfwp-settings' );
198
+ }
199
+
200
+ if ( $setting_name ) {
201
+ $this->settings[ $setting_name ] = $setting_value;
202
+ }
203
+
204
+ update_option( 'bpfwp-settings', $this->settings );
205
+ }
206
+
207
  /**
208
  * Load the admin settings page.
209
  *
358
  __( 'Google requires an API key to use their maps. %sGet an API key%s. A full walk-through is available in the %sdocumentiaton%s.', 'business-profile' ),
359
  '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key">',
360
  '</a>',
361
+ '<a href="http://doc.fivestarplugins.com/plugins/business-profile/user/faq#google-maps-api-key">',
362
  '</a>'
363
  ),
364
  'args' => array(
610
  array(
611
  'id' => 'article-rich-snippets',
612
  'title' => __( 'Post Rich Snippets', 'business-profile' ),
613
+ 'description' => __( 'Automatically enable article \'Rich Snippets\' for Google for all regular posts on the site.', 'business-profile' ),
614
  'args' => array(
615
  'label_for' => 'bpfwp-settings[article-rich-snippets]',
616
  'class' => 'bpfwp-article-rich-snippets'
626
  array(
627
  'id' => 'schema-default-helpers',
628
  'title' => __( 'Schema Default Helpers', 'business-profile' ),
629
+ 'description' => __( 'Adds a helper pop-up that can be accessed on click on the Schema edit screen that list the available default options, functions and metas', 'business-profile' ),
630
  'args' => array(
631
  'label_for' => 'bpfwp-settings[schema-default-helpers]',
632
  'class' => 'bpfwp-schema-default-helpers'
641
  array(
642
  'id' => 'bpfwp-integrations',
643
  'title' => __( 'Plugin Integrations', 'business-profile' ),
644
+ 'tab' => 'bpfwp-premium'
645
  ),
646
  $integrations_permissions
647
  )
654
  array(
655
  'id' => 'woocommerce-integration',
656
  'title' => __( 'WooCommerce Integration', 'business-profile' ),
657
+ 'description' => __( 'Automatically enable product \'Rich Snippets\' for Google.', 'business-profile' ),
658
  'args' => array(
659
  'label_for' => 'bpfwp-settings[woocommerce-integration]',
660
  'class' => 'bpfwp-woocommerce-integration'
680
  return apply_filters(
681
  'bp_schema_types',
682
  array(
683
+ 'Organization' => 'Organization',
684
+ 'Airline' => 'Airline',
685
+ 'Consortium' => 'Consortium',
686
+ 'Corporation' => 'Corporation',
687
+ 'EducationalOrganization' => 'Educational Organization',
688
+ 'CollegeOrUniversity' => '- College or University',
689
+ 'ElementarySchool' => '- Elementary School',
690
+ 'HighSchool' => '- High School',
691
+ 'MiddleSchool' => '- Middle School',
692
+ 'Prechool' => '- Prechool',
693
+ 'School' => '- School',
694
+ 'FundingScheme' => 'Funding Scheme',
695
+ 'GovernmentOrganization' => 'Government Organization',
696
+ 'LibrarySystem' => 'Library System',
697
+ 'LocalBusiness' => 'Local Business',
698
+ 'AnimalShelter' => '- Animal Shelter',
699
+ 'AutomotiveBusiness' => '- Automotive Business',
700
+ 'AutoBodyShop' => '--- AutoBody Shop',
701
+ 'AutoDealer' => '--- Auto Dealer',
702
+ 'AutoPartsStore' => '--- Auto Parts Store',
703
+ 'AutoRental' => '--- Auto Rental',
704
+ 'AutoRepair' => '--- Auto Repair',
705
+ 'AutoWash' => '--- Auto Wash',
706
+ 'GasStation' => '--- Gas Station',
707
+ 'MotorcycleDealer' => '--- Motorcycle Dealer',
708
+ 'MotorcycleRepair' => '--- Motorcycle Repair',
709
+ 'ChildCare' => '- Child Care',
710
+ 'Dentist' => '- Dentist',
711
+ 'DryCleaningOrLaundry' => '- Dry Cleaning or Laundry',
712
+ 'EmergencyService' => '- Emergency Service',
713
+ 'FirsStation' => '--- Fire Station',
714
+ 'Hospital' => '--- Hospital',
715
+ 'PoliceStation' => '--- Police Station',
716
+ 'EmploymentAgency' => '- Employment Agency',
717
+ 'EntertainmentBusiness' => '- Entertainment Business',
718
+ 'AdultEntertainment' => '--- Adult Entertainment',
719
+ 'AmusementPark' => '--- Amusement Park',
720
+ 'ArtGallery' => '--- Art Gallery',
721
+ 'Casino' => '--- Casino',
722
+ 'ComedyClub' => '--- Comedy Club',
723
+ 'MovieTheater' => '--- Movie Theater',
724
+ 'NightClub' => '--- Night Club',
725
+ 'FinancialService' => '- Financial Service',
726
+ 'AccountingService' => '--- Accounting Service',
727
+ 'AutomatedTeller' => '--- Automated Teller',
728
+ 'BankOrCreditUnion' => '--- Bank or Credit Union',
729
+ 'InsuranceAgency' => '--- Insurance Agency',
730
+ 'FoodEstablishment' => '- Food Establishment',
731
+ 'Bakery' => '--- Bakery',
732
+ 'BarOrPub' => '--- Bar or Pub',
733
+ 'Brewery' => '--- Brewery',
734
+ 'CafeOrCoffeeShop' => '--- Cafe or Coffee Shop',
735
+ 'Distillery' => '--- Distillery',
736
+ 'FastFoodRestaurant' => '--- Fast Food Restaurant',
737
+ 'IceCreamShop' => '--- Ice Cream Shop',
738
+ 'Restaurant' => '--- Restaurant',
739
+ 'Winery' => '--- Winery',
740
+ 'GovernmentOffice' => '- Government Office',
741
+ 'PostOffice' => '--- Post Office',
742
+ 'HealthAndBeautyBusiness' => '- Health and Beauty Business',
743
+ 'BeautySalon' => '--- Beauty Salon',
744
+ 'DaySpa' => '--- Day Spa',
745
+ 'HairSalon' => '--- Hair Salon',
746
+ 'HealthClub' => '--- Health Club',
747
+ 'NailSalon' => '--- Nail Salon',
748
+ 'TattooParlor' => '--- Tattoo Parlor',
749
+ 'HomeAndConstructionBusiness' => '- Home and Construction Business',
750
+ 'Electrician' => '--- Electrician',
751
+ 'GeneralContractor' => '--- General Contractor',
752
+ 'HVACBusiness' => '--- HVAC Business',
753
+ 'HousePainter' => '--- House Painter',
754
+ 'Locksmith' => '--- Locksmith',
755
+ 'MovingCompany' => '--- Moving Company',
756
+ 'Plumber' => '--- Plumber',
757
+ 'RoofingContractor' => '--- Roofing Contractor',
758
+ 'InternetCafe' => '- Internet Cafe',
759
+ 'LegalService' => '- Legal Service',
760
+ 'Attorney' => '--- Attorney',
761
+ 'Notary' => '--- Notary',
762
+ 'Library' => '- Library',
763
+ 'LodgingBusiness' => '- Lodging Business',
764
+ 'BedAndBreakfast' => '--- Bed and Breakfast',
765
+ 'Campground' => '--- Campground',
766
+ 'Hostel' => '--- Hostel',
767
+ 'Hotel' => '--- Hotel',
768
+ 'Motel' => '--- Motel',
769
+ 'Resort' => '--- Resort',
770
+ 'MedicalBusiness' => '- Medical Business',
771
+ 'CommunityHealth' => '--- Community Health',
772
+ 'Dentist' => '--- Dentist',
773
+ 'Dermatology' => '--- Dermatology',
774
+ 'DietNutrition' => '--- Diet Nutrition',
775
+ 'Emergency' => '--- Emergency',
776
+ 'Geriatric' => '--- Geriatric',
777
+ 'Gynecologic' => '--- Gynecologic',
778
+ 'MedicalClinic' => '--- Medical Clinic',
779
+ 'Midwifery' => '--- Midwifery',
780
+ 'Nursing' => '--- Nursing',
781
+ 'Obstetric' => '--- Obstetric',
782
+ 'Oncologic' => '--- Oncologic',
783
+ 'Optician' => '--- Optician',
784
+ 'Optometric' => '--- Optometric',
785
+ 'Otolaryngologic' => '--- Otolaryngologic',
786
+ 'Pediatric' => '--- Pediatric',
787
+ 'Pharmacy' => '--- Pharmacy',
788
+ 'Physiotherapy' => '--- Physiotherapy',
789
+ 'PlasticSurgery' => '--- Plastic Surgery',
790
+ 'Podiatric' => '--- Podiatric',
791
+ 'PrimaryCare' => '--- Primary Care',
792
+ 'Psychiatric' => '--- Psychiatric',
793
+ 'PublicHealth' => '--- Public Health',
794
+ 'ProfessionalService' => '- Professional Service',
795
+ 'RadioStation' => '- Radio Station',
796
+ 'RealEstateAgent' => '- Real Estate Agent',
797
+ 'RecyclingCenter' => '- Recycling Center',
798
+ 'SelfStorage' => '- Self Storage',
799
+ 'ShoppingCenter' => '- Shopping Center',
800
+ 'SportsActivityLocation' => '- Sports Activity Location',
801
+ 'BowlingAlley' => '--- Bowling Alley',
802
+ 'ExerciseGym' => '--- Exercise Gym',
803
+ 'GolfCourse' => '--- Golf Course',
804
+ 'HealthClub' => '--- Health Club',
805
+ 'PublicSwimmingPool' => '--- Public Swimming Pool',
806
+ 'SkiResort' => '--- Ski Resort',
807
+ 'SportsClub' => '--- Sports Club',
808
+ 'StadiumOrArena' => '--- Stadium or Arena',
809
+ 'TennisComplex' => '--- Tennis Complex',
810
+ 'Store' => '- Store',
811
+ 'AutoPartsStore' => '--- Auto Parts Store',
812
+ 'BikeStore' => '--- Bike Store',
813
+ 'BookStore' => '--- Book Store',
814
+ 'ClothingStore' => '--- Clothing Store',
815
+ 'ComputerStore' => '--- Computer Store',
816
+ 'ConvenienceStore' => '--- Convenience Store',
817
+ 'DepartmentStore' => '--- Department Store',
818
+ 'ElectronicsStore' => '--- Electronics Store',
819
+ 'Florist' => '--- Florist',
820
+ 'FurnitureSotre' => '--- Furniture Store',
821
+ 'GardenStore' => '--- Garden Store',
822
+ 'GroceryStore' => '--- Grocery Store',
823
+ 'HardwareStore' => '--- Hardware Store',
824
+ 'HobbyShop' => '--- Hobby Shop',
825
+ 'HomeGoodsStore' => '--- Home Goods Store',
826
+ 'JewelryStore' => '--- Jewelry Store',
827
+ 'LiquorStore' => '--- Liquor Store',
828
+ 'MensClothingStore' => '--- Mens Clothing Store',
829
+ 'MobilePhoneStore' => '--- Mobile Phone Store',
830
+ 'MovieRentalStore' => '--- Movie Rental Store',
831
+ 'MusicStore' => '--- Music Store',
832
+ 'OfficeEquipmentStore' => '--- Office Equipment Store',
833
+ 'OutletStore' => '--- Outlet Store',
834
+ 'PawnShop' => '--- Pawn Shop',
835
+ 'PetStore' => '--- Pet Store',
836
+ 'ShoeStore' => '--- Shoe Store',
837
+ 'SportingGoodsStore' => '--- Sporting Goods Store',
838
+ 'TireShop' => '--- Tire Shop',
839
+ 'ToyStore' => '--- Toy Store',
840
+ 'WholesaleStore' => '--- Wholesale Store',
841
+ 'TelevisionStation' => '- Television Station',
842
+ 'TouristInformationCenter' => '- Tourist Information Center',
843
+ 'TravelAgency' => '- Travel Agency',
844
+ 'MedicalOrganization' => 'Medical Organization',
845
+ 'Dentist' => '- Dentist',
846
+ 'DiagnosticLab' => '- Diagnostic Lab',
847
+ 'Hospital' => '- Hospital',
848
+ 'MedicalClinic' => '- Medical Clinic',
849
+ 'Pharmacy' => '- Pharmacy',
850
+ 'Physician' => '- Physician',
851
+ 'VeterinaryCare' => '- Veterinary Care',
852
+ 'NGO' => 'NGO',
853
+ 'NewsMediaOrganization' => 'News Media Organization',
854
+ 'PerformingGroup' => 'PerformingGroup',
855
+ 'DanceGroup' => '- Dance Group',
856
+ 'MusicGroup' => '- Music Group',
857
+ 'TheaterGroup' => '- Theater Group',
858
+ 'Project' => 'Project',
859
+ 'FundingAgency' => '- Funding Agency',
860
+ 'ResearchProject' => '- Research Project',
861
+ 'SportsOrganization' => 'Sports Organization',
862
+ 'SportsTeam' => '- Sports Team',
863
+ 'WorkersUnion' => 'Workers Union',
864
  )
865
  );
866
  }
includes/template-functions.php CHANGED
@@ -243,7 +243,7 @@ if ( ! function_exists( 'bpwfwp_print_phone' ) ) {
243
  ?>
244
 
245
  <div class="bp-phone" itemprop="telephone">
246
- <?php echo bpfwp_setting( 'phone', $location ); ?>
247
  </div>
248
 
249
  <?php else : ?>
243
  ?>
244
 
245
  <div class="bp-phone" itemprop="telephone">
246
+ <a href="tel:<?php echo bpfwp_setting( 'phone', $location ); ?>"><?php echo bpfwp_setting( 'phone', $location ); ?></a>
247
  </div>
248
 
249
  <?php else : ?>
lib/simple-admin-pages/classes/AdminPageSetting.class.php CHANGED
@@ -201,7 +201,7 @@ abstract class sapAdminPageSetting_2_1_2 {
201
  */
202
  public function set_value( $val = null ) {
203
 
204
- if ( $val === null ) {
205
  $option_group_value = get_option( $this->page );
206
  $val = isset( $option_group_value[ $this->id ] ) ? $option_group_value[ $this->id ] : '';
207
  }
201
  */
202
  public function set_value( $val = null ) {
203
 
204
+ if ( $val === null && isset( $this->page ) ) {
205
  $option_group_value = get_option( $this->page );
206
  $val = isset( $option_group_value[ $this->id ] ) ? $option_group_value[ $this->id ] : '';
207
  }
readme.txt CHANGED
@@ -187,6 +187,14 @@ You'll find more help in the [User Guide](http://doc.themeofthecrop.com/plugins/
187
 
188
  == Changelog ==
189
 
 
 
 
 
 
 
 
 
190
  = 2.0.3 (2020-02-14) =
191
  - Adds in a few more is_object checks to counter the command line interface installation not calling things in the correct order
192
 
187
 
188
  == Changelog ==
189
 
190
+ = 2.0.4 (2020-03-27) =
191
+ - Added link/the ability to click to call to phone numbers in the contact card
192
+ - Added all the Organization types from the schema functionality as options in the Schema Type setting for the contact card
193
+ - Added a setup walk-through that runs on initial plugin activation
194
+ - Corrected some styling issues for the metaboxes on the location post type edit screen
195
+ - Updated some settings descriptions
196
+ - Corrected warning that sometimes came up in the Dashboard area of the admin when this and another Five Star plugin were both installed
197
+
198
  = 2.0.3 (2020-02-14) =
199
  - Adds in a few more is_object checks to counter the command line interface installation not calling things in the correct order
200