All In One Schema Rich Snippets - Version 1.6.1

Version Description

  • Improvement - Compatibility with the latest WordPress PHP_CodeSniffer rules.
  • Improvement - Updated the Schema URL to the https instead of HTTP.
  • Fix - Tabs conflict with the Astra theme.
  • Fix - Image field is required error showing in the Recipe schema.
  • Fix - Remove the support for Rating in the service schema as per the new Google update.
Download this release

Release Info

Developer brainstormworg
Plugin Icon 128x128 All In One Schema Rich Snippets
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.1

Files changed (11) hide show
  1. admin/css/admin.css +0 -6
  2. admin/index.php +1235 -1218
  3. css/style.css +1 -0
  4. functions.php +1352 -1337
  5. index.php +378 -316
  6. init.php +681 -561
  7. js/cmb.js +3 -2
  8. languages/all-in-one-schemaorg-rich-snippets.pot +1455 -0
  9. meta-boxes.php +1053 -935
  10. readme.txt +9 -2
  11. settings.php +184 -168
admin/css/admin.css CHANGED
@@ -1,10 +1,4 @@
1
  html{ display:block !important;}
2
- .etabs { margin: 0; padding: 0; }
3
- .tab { display: inline-block; zoom:1; *display:inline; background: #fff; border: solid 1px #999; border-bottom: none; -moz-border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; font-weight:bold; }
4
- .tab a { box-shadow: none; font-size: 14px; line-height: 2em; display: block; padding: 0 10px; outline: none; text-decoration:none; color:rgb(175, 175, 175); }
5
- .tab a:hover { text-decoration: none; color:#0073aa; }
6
- .tab a.active { font-weight: bold; text-decoration:none; color:#333; }
7
- .tab.active a:hover { text-decoration: none; color:#0073aa; }
8
  .tab-container { width: 95%; }
9
  .get_in_touch { margin: 10px; font-size: 14px;cursor: pointer;}
10
  #bsf-postbox-container-2 {width: 65%;}
1
  html{ display:block !important;}
 
 
 
 
 
 
2
  .tab-container { width: 95%; }
3
  .get_in_touch { margin: 10px; font-size: 14px;cursor: pointer;}
4
  #bsf-postbox-container-2 {width: 65%;}
admin/index.php CHANGED
@@ -1,1218 +1,1235 @@
1
- <?php
2
- // Start object buffering to supress warning messages
3
- ob_start();
4
- if ( is_admin() )
5
- {
6
- add_action( 'admin_footer', 'add_footer_script' );
7
- }
8
- //enqueues the scripts and styles in admin dashboard
9
- function bsf_admin_styles() {
10
- wp_enqueue_style( 'star_style' );
11
- wp_enqueue_style( 'meta_style' );
12
- wp_enqueue_script( 'bsf_jquery' );
13
- wp_enqueue_script( 'jquery-ui-core' );
14
- wp_enqueue_script( 'bsf_jquery_star' );
15
- }
16
- function add_the_script() {
17
- wp_enqueue_script('postbox');
18
- wp_enqueue_style( 'admin_style' );
19
- }
20
- add_action('admin_print_scripts', 'add_the_script');
21
- //The Main Admin Dashboard for Rich Snippets Plugin
22
- function rich_snippet_dashboard() {
23
- $plugins_url = plugins_url();
24
- if ( !get_option( 'bsf_woocom_init_setting' ) ) {
25
- $args_woocom = true;
26
- }else {
27
- $args_woocom = get_option('bsf_woocom_setting');
28
- }
29
-
30
- $args_review = get_option('bsf_review');
31
- $args_event = get_option('bsf_event');
32
- $args_person = get_option('bsf_person');
33
- $args_product = get_option('bsf_product');
34
- $args_recipe = get_option('bsf_recipe');
35
- $args_soft = get_option('bsf_software');
36
- $args_video = get_option('bsf_video');
37
- $args_article = get_option('bsf_article');
38
- $args_service = get_option('bsf_service');
39
-
40
- $woo_setting = '';
41
- if( !empty( $args_woocom ) ) {
42
- $woo_setting = "Checked";
43
- }
44
-
45
- if(isset($args_event["event_desc"]) ) {
46
- $event_desc = $args_event["event_desc"];
47
- }
48
- else {
49
- $event_desc = null;
50
- }
51
-
52
- if(isset($args_recipe["author_name"])) {
53
- $author_name = $args_recipe["author_name"];
54
- }
55
- else {
56
- $author_name = null;
57
- }
58
-
59
- if(isset($args_recipe["recipe_desc"])) {
60
- $recipe_desc = $args_recipe["recipe_desc"];
61
- }
62
- else {
63
- $recipe_desc = null;
64
- }
65
-
66
- if(isset($args_service["provider_location"])) {
67
- $provider_location = $args_service["provider_location"];
68
- }
69
- else {
70
- $provider_location = null;
71
- }
72
-
73
- $args_color = get_option('bsf_custom');
74
- echo '<div class="wrap">';
75
- echo '<div id="star-icons-32" class="icon32"></div><h2>'.__("All in One Schema.org Rich Snippets - Dashboard","rich-snippets").'</h2>';
76
- echo '<div id="post-body" class="columns-2">';
77
- echo '<div class="clear"></div>';
78
- echo '<div id="bsf-postbox-container-2" class="postbox-container"><div id="tab-container" class="tab-container">';
79
- echo '<ul class="nav-tab-wrapper bsf-tab-wraper">
80
- <li><a href="#tab-1" class="nav-tab">'.__("Configuration","rich-snippets").'</a></li>
81
- <li><a href="#tab-4" class="nav-tab">'.__("Customization","rich-snippets").'</a></li>
82
-
83
- <li><a href="#tab-3" class="nav-tab">'.__("FAQs","rich-snippets").'</a></li>
84
- <li><a href="#tab-5" class="nav-tab">'.__("Getting Started","rich-snippets").'</a></li>
85
- </ul>
86
- <div class="clear"></div>
87
- <div class="panel-container bsf-panel">
88
- <div id="tab-1">
89
- <div id="poststuff">
90
- <div class="schema-notice-head">
91
- <p>'.__("Choose the schema markup and update the strings you want to display on the front-end.", "rich-snippets").'</p>
92
- </div>
93
- <div id="postbox-container-2" class="postbox-container">
94
- <div class="meta-box-sortables ui-sortable">
95
- <div class="postbox closed">
96
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
97
- <h3 class="hndle"><span>'.__("Item Review","rich-snippets").'</span></h3>
98
- <div class="inside">
99
- <div class="table">
100
- <p>'.__("Strings to be displayed on frontend for <strong>Item Review Rich Snippets &mdash;</strong>","rich-snippets").'</p>
101
- <form id="bsf_review_form" method="post">
102
- '.wp_nonce_field( 'snippet_review_form_action', 'snippet_review_nonce_field' ).'
103
- <table class="bsf_metabox">
104
- <tbody>
105
- <tr>
106
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
107
- <td><input class="bsf_text_medium" type="text" name="review_title" value="'.stripslashes( $args_review["review_title"] ).'"/></td>
108
- </tr>
109
- <tr>
110
- <td align="right"><strong><label>'.__("Reviewer :","rich-snippets").'</label></strong></td>
111
- <td><input class="bsf_text_medium" type="text" name="item_reviewer" value="'.stripslashes( $args_review["item_reviewer"] ).'"/></td>
112
- </tr>
113
- <tr>
114
- <td align="right"><strong><label>'.__("Review Date :","rich-snippets").'</label></strong></td>
115
- <td><input class="bsf_text_medium" type="text" name="review_date" value="'.stripslashes( $args_review["review_date"] ).'"/></td>
116
- </tr>
117
- <tr>
118
- <td align="right"><strong><label>'.__("Item Name :","rich-snippets").'</label></strong></td>
119
- <td><input class="bsf_text_medium" type="text" name="item_name" value="'.stripslashes( $args_review["item_name"] ).'"/></td>
120
- </tr>
121
- <tr>
122
- <td align="right"><strong><label>'.__("Item Ratings :","rich-snippets").'</label></strong></td>
123
- <td><input class="bsf_text_medium" type="text" name="item_rating" value="'.stripslashes( $args_review["item_rating"] ).'"/></td>
124
- </tr>
125
- <tr><td colspan="2"></td></tr>
126
- <tr>
127
- <td></td>
128
- <td><input type="submit" class="button-primary" name="item_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=review">'.__('Reset ','rich-snippets').'</a></td>
129
- </tr>
130
- </tbody>
131
- </table>
132
- </form>
133
- </div>
134
- </div>
135
- </div>
136
- <div class="postbox closed">
137
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
138
- <h3 class="hndle"><span>'.__("Events","rich-snippets").'</span></h3>
139
- <div class="inside">
140
- <div class="table">
141
- <p>'.__("Strings to be displayed on frontend for <strong>Events Rich Snippets &mdash;</strong>","rich-snippets").'</p>
142
- <form id="bsf_event_form" method="post">
143
- '.wp_nonce_field( 'snippet_event_form_action', 'snippet_event_nonce_field' ).'
144
- <table class="bsf_metabox">
145
- <tbody>
146
- <tr>
147
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
148
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_event["snippet_title"] ).'"/></td>
149
- </tr>
150
- <tr>
151
- <td align="right"><strong><label>'.__("Event Title :","rich-snippets").'</label></strong></td>
152
- <td><input class="bsf_text_medium" type="text" name="event_title" value="'.stripslashes( $args_event["event_title"] ).'"/></td>
153
- </tr>
154
- <tr>
155
- <td align="right"><strong><label>'.__("Event Location :","rich-snippets").'</label></strong></td>
156
- <td><input class="bsf_text_medium" type="text" name="event_location" value="'.stripslashes( $args_event["event_location"] ).'"/></td>
157
- </tr>
158
- <tr>
159
- <td align="right"><strong><label>'.__("Start Time :","rich-snippets").'</label></strong></td>
160
- <td><input class="bsf_text_medium" type="text" name="start_time" value="'.stripslashes( $args_event["start_time"] ).'"/></td>
161
- </tr>
162
- <tr>
163
- <td align="right"><strong><label>'.__("End Time :","rich-snippets").'</label></strong></td>
164
- <td><input class="bsf_text_medium" type="text" name="end_time" value="'.stripslashes( $args_event["end_time"] ).'"/></td>
165
- </tr>
166
- <tr>
167
- <td align="right"><strong><label>'.__("Description :","rich-snippets").'</label></strong></td>
168
- <td><input class="bsf_text_medium" type="text" name="event_desc" value="'.stripslashes( $event_desc ).'"/></td>
169
- </tr>
170
- <tr>
171
- <td align="right"><strong><label>'.__("Ticket Promotion :","rich-snippets").'</label></strong></td>
172
- <td><input class="bsf_text_medium" type="text" name="events_price" value="'.stripslashes( $args_event["events_price"] ).'"/></td>
173
- </tr>
174
- <tr><td colspan="2"></td></tr>
175
- <tr>
176
- <td></td>
177
- <td><input type="submit" class="button-primary" name="event_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=event">'.__('Reset ','rich-snippets').'</a></td>
178
- </tr>
179
- </tbody>
180
- </table>
181
- </form>
182
- </div>
183
- </div>
184
- </div>
185
- <div class="postbox closed">
186
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
187
- <h3 class="hndle"><span>'.__("Person","rich-snippets").'</span></h3>
188
- <div class="inside">
189
- <div class="table">
190
- <p>'.__("Strings to be displayed on frontend for <strong>Person's Rich Snippets &mdash;</strong>","rich-snippets").'</p>
191
- <form id="bsf_person_form" method="post">
192
- '.wp_nonce_field( 'snippet_person_form_action', 'snippet_person_nonce_field' ).'
193
- <table class="bsf_metabox">
194
- <tbody>
195
- <tr>
196
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
197
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_person["snippet_title"] ).'"/></td>
198
- </tr>
199
- <tr>
200
- <td align="right"><strong><label>'.__("Person's Name :","rich-snippets").'</label></strong></td>
201
- <td><input class="bsf_text_medium" type="text" name="person_name" value="'.stripslashes( $args_person["person_name"] ).'"/></td>
202
- </tr>
203
- <tr>
204
- <td align="right"><strong><label>'.__("Nickname :","rich-snippets").'</label></strong></td>
205
- <td><input class="bsf_text_medium" type="text" name="person_nickname" value="'.stripslashes( $args_person["person_nickname"] ).'"/></td>
206
- </tr>
207
- <tr>
208
- <td align="right"><strong><label>'.__("Job Title :","rich-snippets").'</label></strong></td>
209
- <td><input class="bsf_text_medium" type="text" name="person_job_title" value="'.stripslashes( $args_person["person_job_title"] ).'"/></td>
210
- </tr>
211
- <tr>
212
- <td align="right"><strong><label>'.__("Homepage :","rich-snippets").'</label></strong></td>
213
- <td><input class="bsf_text_medium" type="text" name="person_website" value="'.stripslashes( $args_person["person_website"] ).'"/></td>
214
- </tr>
215
- <tr>
216
- <td align="right"><strong><label>'.__("Company Name :","rich-snippets").'</label></strong></td>
217
- <td><input class="bsf_text_medium" type="text" name="person_company" value="'.stripslashes( $args_person["person_company"] ).'"/></td>
218
- </tr>
219
- <tr>
220
- <td align="right"><strong><label>'.__("Address :","rich-snippets").'</label></strong></td>
221
- <td><input class="bsf_text_medium" type="text" name="person_address" value="'.stripslashes( $args_person["person_address"] ).'"/></td>
222
- </tr>
223
- <tr><td colspan="2"></td></tr>
224
- <tr>
225
- <td></td>
226
- <td><input type="submit" class="button-primary" name="person_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=person">'.__('Reset ','rich-snippets').'</a></td>
227
- </tr>
228
- </tbody>
229
- </table>
230
- </form>
231
- </div>
232
- </div>
233
- </div>
234
- <div class="postbox closed">
235
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
236
- <h3 class="hndle"><span>'.__("Product","rich-snippets").'</span></h3>
237
- <div class="inside">
238
- <div class="table">
239
- <p>'.__("Strings to be displayed on frontend for <strong>Product Rich Snippets &mdash;</strong>","rich-snippets").'</p>
240
- <form id="bsf_product_form" method="post">
241
- '.wp_nonce_field( 'snippet_product_form_action', 'snippet_product_nonce_field' ).'
242
- <table class="bsf_metabox">
243
- <tbody>
244
- <tr>
245
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
246
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_product["snippet_title"] ).'"/></td>
247
- </tr>
248
- <tr>
249
- <td align="right"><strong><label>'.__("Author Rating :","rich-snippets").'</label></strong></td>
250
- <td><input class="bsf_text_medium" type="text" name="product_rating" value="'.stripslashes( $args_product["product_rating"] ).'"/></td>
251
- </tr>
252
- <tr>
253
- <td align="right"><strong><label>'.__("Brand Name :","rich-snippets").'</label></strong></td>
254
- <td><input class="bsf_text_medium" type="text" name="product_brand" value="'.stripslashes( $args_product["product_brand"] ).'"/></td>
255
- </tr>
256
- <tr>
257
- <td align="right"><strong><label>'.__("Product Name :","rich-snippets").'</label></strong></td>
258
- <td><input class="bsf_text_medium" type="text" name="product_name" value="'.stripslashes( $args_product["product_name"] ).'"/></td>
259
- </tr>
260
- <tr>
261
- <td align="right"><strong><label>'.__("User Rating :","rich-snippets").'</label></strong></td>
262
- <td><input class="bsf_text_medium" type="text" name="product_agr" value="'.stripslashes( $args_product["product_agr"] ).'"/></td>
263
- </tr>
264
- <tr>
265
- <td align="right"><strong><label>'.__("Price :","rich-snippets").'</label></strong></td>
266
- <td><input class="bsf_text_medium" type="text" name="product_price" value="'.stripslashes( $args_product["product_price"] ).'"/></td>
267
- </tr>
268
- <tr>
269
- <td align="right"><strong><label>'.__("Product Availability :","rich-snippets").'</label></strong></td>
270
- <td><input class="bsf_text_medium" type="text" name="product_avail" value="'.stripslashes( $args_product["product_avail"] ).'"/></td>
271
- </tr>
272
- <tr><td colspan="2"></td></tr>
273
- <tr>
274
- <td></td>
275
- <td><input type="submit" class="button-primary" name="product_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=product">'.__('Reset ','rich-snippets').'</a></td>
276
- </tr>
277
- </tbody>
278
- </table>
279
- </form>
280
- </div>
281
- </div>
282
- </div>
283
- <div class="postbox closed">
284
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
285
- <h3 class="hndle"><span>'.__("Recipe","rich-snippets").'</span></h3>
286
- <div class="inside">
287
- <div class="table">
288
- <p>'.__("Strings to be displayed on frontend for <strong>Recipe Rich Snippets &mdash;</strong>","rich-snippets").'</p>
289
- <form id="bsf_recipe_form" method="post">
290
- '.wp_nonce_field( 'snippet_recipe_form_action', 'snippet_recipe_nonce_field' ).'
291
- <table class="bsf_metabox">
292
- <tbody>
293
- <tr>
294
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
295
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_recipe["snippet_title"] ).'"/></td>
296
- </tr>
297
- <tr>
298
- <td align="right"><strong><label>'.__("Recipe Name :","rich-snippets").'</label></strong></td>
299
- <td><input class="bsf_text_medium" type="text" name="recipe_name" value="'.stripslashes( $args_recipe["recipe_name"] ).'"/></td>
300
- </tr>
301
- <tr>
302
- <td align="right"><strong><label>'.__("Author Name :","rich-snippets").'</label></strong></td>
303
- <td><input class="bsf_text_medium" type="text" name="author_name" value="'.stripslashes( $author_name ).'"/></td>
304
- </tr>
305
- <tr>
306
- <td align="right"><strong><label>'.__("Published On : ","rich-snippets").'</label></strong></td>
307
- <td><input class="bsf_text_medium" type="text" name="recipe_pub" value="'.stripslashes( $args_recipe["recipe_pub"] ).'"/></td>
308
- </tr>
309
- <tr>
310
- <td align="right"><strong><label>'.__("Preparation Time:","rich-snippets").'</label></strong></td>
311
- <td><input class="bsf_text_medium" type="text" name="recipe_prep" value="'.stripslashes( $args_recipe["recipe_prep"] ).'"/></td>
312
- </tr>
313
- <tr>
314
- <td align="right"><strong><label>'.__("Cook Time :","rich-snippets").'</label></strong></td>
315
- <td><input class="bsf_text_medium" type="text" name="recipe_cook" value="'.stripslashes( $args_recipe["recipe_cook"] ).'"/></td>
316
- </tr>
317
- <tr>
318
- <td align="right"><strong><label>'.__("Total Time :","rich-snippets").'</label></strong></td>
319
- <td><input class="bsf_text_medium" type="text" name="recipe_time" value="'.stripslashes( $args_recipe["recipe_time"] ).'"/></td>
320
- </tr>
321
- <tr>
322
- <td align="right"><strong><label>'.__("Description :","rich-snippets").'</label></strong></td>
323
- <td><input class="bsf_text_medium" type="text" name="recipe_desc" value="'.stripslashes( $recipe_desc ).'"/></td>
324
- </tr>
325
- <tr>
326
- <td align="right"><strong><label>'.__("Average Rating:","rich-snippets").'</label></strong></td>
327
- <td><input class="bsf_text_medium" type="text" name="recipe_rating" value="'.stripslashes( $args_recipe["recipe_rating"] ).'"/></td>
328
- </tr>
329
- <tr><td colspan="2"></td></tr>
330
- <tr>
331
- <td></td>
332
- <td><input type="submit" class="button-primary" name="recipe_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=recipe">'.__('Reset ','rich-snippets').'</a></td>
333
- </tr>
334
- </tbody>
335
- </table>
336
- </form>
337
- </div>
338
- </div>
339
- </div>
340
- <div class="postbox closed">
341
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
342
- <h3 class="hndle"><span>'.__("Software Application","rich-snippets").'</span></h3>
343
- <div class="inside">
344
- <div class="table">
345
- <p>'.__("Strings to be displayed on frontend for <strong>Software Application Rich Snippets &mdash;</strong>","rich-snippets").'</p>
346
- <form id="bsf_software_form" method="post">
347
- '.wp_nonce_field( 'snippet_soft_app_form_action', 'snippet_soft_app_nonce_field' ).'
348
- <table class="bsf_metabox">
349
- <tbody>
350
- <tr>
351
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
352
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_soft["snippet_title"] ).'"/></td>
353
- </tr>
354
- <tr>
355
- <td align="right"><strong><label>'.__("Author Rating :","rich-snippets").'</label></strong></td>
356
- <td><input class="bsf_text_medium" type="text" name="software_rating" value="'.stripslashes( $args_soft["software_rating"] ).'"/></td>
357
- </tr>
358
- <tr>
359
- <td align="right"><strong><label>'.__("User Rating :","rich-snippets").'</label></strong></td>
360
- <td><input class="bsf_text_medium" type="text" name="software_agr" value="'.stripslashes( $args_soft["software_agr"] ).'"/></td>
361
- </tr>
362
- <tr>
363
- <td align="right"><strong><label>'.__("Software Price :","rich-snippets").'</label></strong></td>
364
- <td><input class="bsf_text_medium" type="text" name="software_price" value="'.stripslashes( $args_soft["software_price"] ).'"/></td>
365
- </tr>
366
- <tr>
367
- <td align="right"><strong><label>'.__("Software Name:","rich-snippets").'</label></strong></td>
368
- <td><input class="bsf_text_medium" type="text" name="software_name" value="'.stripslashes( $args_soft["software_name"] ).'"/></td>
369
- </tr>
370
- <tr>
371
- <td align="right"><strong><label>'.__("Operating System :","rich-snippets").'</label></strong></td>
372
- <td><input class="bsf_text_medium" type="text" name="software_os" value="'.stripslashes( $args_soft["software_os"] ).'"/></td>
373
- </tr>
374
- <tr>
375
- <td align="right"><strong><label>'.__("Landing Page:","rich-snippets").'</label></strong></td>
376
- <td><input class="bsf_text_medium" type="text" name="software_website" value="'.stripslashes( $args_soft["software_website"] ).'"/></td>
377
- </tr>
378
- <tr><td colspan="2"></td></tr>
379
- <tr>
380
- <td></td>
381
- <td><input type="submit" class="button-primary" name="software_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=software">'.__('Reset ','rich-snippets').'</a></td>
382
- </tr>
383
- </tbody>
384
- </table>
385
- </form>
386
- </div>
387
- </div>
388
- </div>
389
-
390
-
391
- <div class="postbox closed">
392
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
393
- <h3 class="hndle"><span>'.__("Video","rich-snippets").'</span></h3>
394
- <div class="inside">
395
- <div class="table">
396
- <p>'.__("Strings to be displayed on frontend for <strong>Video Rich Snippets &mdash;</strong>","rich-snippets").'</p>
397
- <form id="bsf_video_form" method="post">
398
- '.wp_nonce_field( 'snippet_video_form_action', 'snippet_video_nonce_field' ).'
399
- <table class="bsf_metabox">
400
- <tbody>
401
- <tr>
402
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
403
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_video["snippet_title"] ).'"/></td>
404
- </tr>
405
- <tr>
406
- <td align="right"><strong><label>'.__("Video Title :","rich-snippets").'</label></strong></td>
407
- <td><input class="bsf_text_medium" type="text" name="video_title" value="'.stripslashes( $args_video["video_title"] ).'"/></td>
408
- </tr>
409
- <tr>
410
- <td align="right"><strong><label>'.__("Description :","rich-snippets").'</label></strong></td>
411
- <td><input class="bsf_text_medium" type="text" name="video_desc" value="'.stripslashes( $args_video["video_desc"] ).'"/></td>
412
- </tr>
413
- <tr>
414
- <td align="right"><strong><label>'.__("Video Duration :","rich-snippets").'</label></strong></td>
415
- <td><input class="bsf_text_medium" type="text" name="video_time" value="'.stripslashes( $args_video["video_time"] ).'"/></td>
416
- </tr>
417
- <tr>
418
- <td align="right"><strong><label>'.__("Video Upload Date :","rich-snippets").'</label></strong></td>
419
- <td><input class="bsf_text_medium" type="text" name="video_date" value="'.stripslashes( $args_video["video_date"] ).'"/></td>
420
- </tr>
421
- <tr><td colspan="2"></td></tr>
422
- <tr>
423
- <td></td>
424
- <td><input type="submit" class="button-primary" name="video_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=video">'.__('Reset ','rich-snippets').'</a></td>
425
- </tr>
426
- </tbody>
427
- </table>
428
- </form>
429
- </div>
430
- </div>
431
- </div>
432
- <div class="postbox closed">
433
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
434
- <h3 class="hndle"><span>'.__("Article","rich-snippets").'</span></h3>
435
- <div class="inside">
436
- <div class="table">
437
- <p>'.__("Strings to be displayed on frontend for <strong>Article Rich Snippets &mdash;</strong>","rich-snippets").'</p>
438
- <form id="bsf_article_form" method="post">
439
- '.wp_nonce_field( 'snippet_article_form_action', 'snippet_article_nonce_field' ).'
440
- <table class="bsf_metabox">
441
- <tbody>
442
- <tr>
443
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
444
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_article["snippet_title"] ).'"/></td>
445
- </tr>
446
- <tr>
447
- <td align="right"><strong><label>'.__("Article Name :","rich-snippets").'</label></strong></td>
448
- <td><input class="bsf_text_medium" type="text" name="article_name" value="'.stripslashes( $args_article["article_name"] ).'"/></td>
449
- </tr>
450
- <tr>
451
- <td align="right"><strong><label>'.__("Author :","rich-snippets").'</label></strong></td>
452
- <td><input class="bsf_text_medium" type="text" name="article_author" value="'.stripslashes( $args_article["article_author"] ).'"/></td>
453
- </tr>
454
- <tr>
455
- <td align="right"><strong><label>'.__("Description :","rich-snippets").'</label></strong></td>
456
- <td><input class="bsf_text_medium" type="text" name="article_desc" value="'.stripslashes( $args_article["article_desc"] ).'"/></td>
457
- </tr>
458
- <tr>
459
- <td align="right"><strong><label>'.__("Image :","rich-snippets").'</label></strong></td>
460
- <td><input class="bsf_text_medium" type="text" name="article_image" value="'.stripslashes( $args_article["article_image"] ).'"/></td>
461
- </tr>
462
- <tr>
463
- <td align="right"><strong><label>'.__("Publisher :","rich-snippets").'</label></strong></td>
464
- <td><input class="bsf_text_medium" type="text" name="article_publisher" value="'.stripslashes( $args_article["article_publisher"] ).'"/></td>
465
- </tr>
466
- <tr>
467
- <td align="right"><strong><label>'.__("Publisher Logo :","rich-snippets").'</label></strong></td>
468
- <td><input class="bsf_text_medium" type="text" name="article_publisher_logo" value="'.stripslashes( $args_article["article_publisher_logo"] ).'"/></td>
469
- </tr>
470
- <tr><td colspan="2"></td></tr>
471
- <tr>
472
- <td></td>
473
- <td><input type="submit" class="button-primary" name="article_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=article">'.__('Reset ','rich-snippets').'</a></td>
474
- </tr>
475
- </tbody>
476
- </table>
477
- </form>
478
- </div>
479
- </div>
480
- </div>
481
- <div class="postbox closed">
482
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
483
- <h3 class="hndle"><span>'.__("Service","rich-snippets").'</span></h3>
484
- <div class="inside">
485
- <div class="table">
486
- <p>'.__("Strings to be displayed on frontend for <strong>Service Rich Snippets &mdash;</strong>","rich-snippets").'</p>
487
- <form id="bsf_service_form" method="post">
488
- '.wp_nonce_field( 'snippet_service_form_action', 'snippet_service_nonce_field' ).'
489
- <table class="bsf_metabox">
490
- <tbody>
491
- <tr>
492
- <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
493
- <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.stripslashes( $args_service["snippet_title"] ).'"/></td>
494
- </tr>
495
- <tr>
496
- <td align="right"><strong><label>'.__("Service Type :","rich-snippets").'</label></strong></td>
497
- <td><input class="bsf_text_medium" type="text" name="service_type" value="'.stripslashes( $args_service["service_type"] ).'"/></td>
498
- </tr>
499
- <tr>
500
- <td align="right"><strong><label>'.__("Area :","rich-snippets").'</label></strong></td>
501
- <td><input class="bsf_text_medium" type="text" name="service_area" value="'.stripslashes( $args_service["service_area"] ).'"/></td>
502
- </tr>
503
- <tr>
504
- <td align="right"><strong><label>'.__("Description :","rich-snippets").'</label></strong></td>
505
- <td><input class="bsf_text_medium" type="text" name="service_desc" value="'.stripslashes( $args_service["service_desc"] ).'"/></td>
506
- </tr>
507
- <tr>
508
- <td align="right"><strong><label>'.__("Provider Name :","rich-snippets").'</label></strong></td>
509
- <td><input class="bsf_text_medium" type="text" name="service_provider_name" value="'.stripslashes( $args_service["service_provider_name"] ).'"/></td>
510
- </tr>
511
- <tr>
512
- <td align="right"><strong><label>'.__("Provider Location :","rich-snippets").'</label></strong></td>
513
- <td><input class="bsf_text_medium" type="text" name="provider_location" value="'.stripslashes( $provider_location ).'"/></td>
514
- </tr>
515
- <tr>
516
- <td align="right"><strong><label>'.__("URL :","rich-snippets").'</label></strong></td>
517
- <td><input class="bsf_text_medium" type="text" name="service_channel" value="'.stripslashes( $args_service["service_channel"] ).'"/></td>
518
- </tr>
519
- <tr>
520
- <td align="right"><strong><label>'.__("URL Text :","rich-snippets").'</label></strong></td>
521
- <td><input class="bsf_text_medium" type="text" name="service_url_link" value="'.stripslashes( $args_service["service_url_link"] ).'"/></td>
522
- </tr>
523
- <tr>
524
- <td align="right"><strong><label>'.__("Service Rating :","rich-snippets").'</label></strong></td>
525
- <td><input class="bsf_text_medium" type="text" name="service_rating" value="'.stripslashes( $args_service["service_rating"] ).'"/></td>
526
- </tr>
527
- <tr><td colspan="2"></td></tr>
528
- <tr>
529
- <td></td>
530
- <td><input type="submit" class="button-primary" name="service_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=service">'.__('Reset ','rich-snippets').'</a></td>
531
- </tr>
532
- </tbody>
533
- </table>
534
- </form>
535
- </div>
536
- </div>
537
- </div>
538
- <!-- Post blox -->
539
-
540
- </div>
541
- <div class="schema-notice">
542
- <p>'.__("Need some more schema types with automation to implement schema markup? Get the latest and premium schema markup plugin to automate the process of adding schema markup on your entire website. <br><a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=configure' target='_blank'> Know more about Schema Pro.</a>", "rich-snippets").'</p>
543
- </div>
544
- </div>
545
- </div>
546
- </div>
547
-
548
-
549
- <div id="tab-5">
550
- <div id="poststuff">
551
- <div id="postbox-container-17" class="postbox-container">
552
- <div class="meta-box-sortables ui-sortable bsf-even-even">
553
- <div class="bsf-postbox">
554
- <h3 class="bsf-hndle" style="margin-top:0;"><span>'.__("Welcome to All In One Schema Rich Snippets","rich-snippets").'</span></h3>
555
- <div class="inside">
556
- <p>Thank you for choosing All-in-one Schema Rich Snippets - the most popular WordPress schema markup plugin!</p>
557
-
558
- <p>All-in-one Schema Rich Snippets helps you add different schema content types to your site so that you can communicate precise information about your web pages to search engines and get rich snippets.</p>
559
- <div class="bsf-xs-separator"></div>
560
- <h3>Supported types of Schemas:</h3>
561
- <ul class="schema-types">
562
- <div class="schema-type-col-2">
563
- <li>Review</li>
564
- <li>Event</li>
565
- <li>Services</li>
566
- </div>
567
- <div class="schema-type-col-2">
568
- <li>Person</li>
569
- <li>Product</li>
570
- </div>
571
- <div class="schema-type-col-2">
572
- <li>Video</li>
573
- <li>Articles</li>
574
- </div>
575
- <div class="schema-type-col-2">
576
- <li>Recipe</li>
577
- <li>Software Application</li>
578
- </div>
579
- </ul>
580
- <div class="bsf-xs-separator"></div>
581
- </div>
582
- </div>
583
- </div>
584
- <div class="meta-box-sortables ui-sortable bsf-even-odd">
585
- <h3 class="bsf-hndle"><span>'.__("How it works","rich-snippets").'</span></h3>
586
- <div class="inside">
587
- <ol class="bsf-li-counter">
588
- <li>'.__("Configure The Settings","rich-snippets").'
589
- <p>'.__("Go to the “Rich Snippets” option in your WordPress dashboard. Under the Configuration tab, select your desired schema type and update the strings you want to display on the front-end. You can use the Customization tab to manage how your rich snippet content box will look.","rich-snippets").'</p></li>
590
- <li>'.__("Add Markup To Pages","rich-snippets").'<p>'.__("Edit the posts or pages where you wish to add rich snippets and scroll down to the “Configure Rich Snippet” meta box to add schema markup.","rich-snippets").'</p></li>
591
- <li>'.__("Test Your Rich Snippets","rich-snippets").'<p>'.__("Google Structured Data Testing is a widely used online tool to test structured data. Open the <a href='https://search.google.com/structured-data/testing-tool/u/0/' target='_blank'>Google Structured Testing Tool</a> and fetch your website URL to test the schema markup you’ve just implemented on your webpages.","rich-snippets").'</p></li>
592
- </ol>
593
- </div>
594
- </div>
595
- <div class="meta-box-sortables ui-sortable bsf-even-even">
596
- <h3 class="bsf-hndle"><span>'.__("Want to Automate Your Schema Markup?","rich-snippets").'</span></h3>
597
- <div class="inside">
598
- <h3>'.__("Consider Schema Pro","rich-snippets").'</h3>
599
- <p>'.__("Schema Pro is an advanced schema markup plugin that automates the process of adding schema markup on multiple pages with just a few clicks. Schema Pro uses JSON-LD markup, which is the latest technology recommended by Google. With it, you can kick those front-end content boxes to the curb and<b> get rich snippets without displaying any new human-readable content</b> on your site.","rich-snippets").'</p>
600
- <h3></h3>
601
- <div class="bsf-schema-desc">
602
- <div class="bsf-schema-features-1">
603
- <div class="bsf-schema-features-wrap">
604
- <div class="bsf-schema-features-icon">
605
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/click.png").'"/>
606
- </div>
607
- <div class="bsf-schema-features-cont">
608
- <h3>Schema Markup Automation</h3>
609
- <p>Schema Pro automates the process of adding schema markup on your website. Just configure your markup one time and you can easily apply it to hundreds or thousands of pages.</p>
610
- </div>
611
- </div>
612
- </div>
613
- <div class="bsf-schema-features-1">
614
- <div class="bsf-schema-features-wrap">
615
- <div class="bsf-schema-features-icon">
616
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/seo.png").'"/>
617
- </div>
618
- <div class="bsf-schema-features-cont">
619
- <h3>Complete Schema Implementation</h3>
620
- <p>Schema Pro gives you the full benefits of schema markup with both organization level and content type schemas. Implement organization level markup site-wide and content type on specific pages.</p>
621
- </div>
622
- </div>
623
- </div>
624
- <div class="bsf-schema-features-1">
625
- <div class="bsf-schema-features-wrap">
626
- <div class="bsf-schema-features-icon">
627
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/website.png").'"/>
628
- </div>
629
- <div class="bsf-schema-features-cont">
630
- <h3>Advanced Targeting Rules</h3>
631
- <p>Schema Pro lets you use pinpoint inclusion/exclusion rules to apply different schema content types on both a post type or individual post level.</p>
632
- </div>
633
- </div>
634
- </div>
635
- <div class="bsf-schema-features-1">
636
- <div class="bsf-schema-features-wrap">
637
- <div class="bsf-schema-features-icon">
638
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/custom.png").'"/>
639
- </div>
640
- <div class="bsf-schema-features-cont">
641
- <h3>Custom Field Support<h3>
642
- <p>Schema Pro comes with all the necessary fields for each content type, as well as support for your own custom fields. It lets you map existing custom fields or create new ones to suit your needs.</p>
643
- </div>
644
- </div>
645
- </div>
646
- <div class="bsf-schema-features-1">
647
- <div class="bsf-schema-features-wrap">
648
- <div class="bsf-schema-features-icon">
649
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/quick.png").'"/>
650
- </div>
651
- <div class="bsf-schema-features-cont">
652
- <h3>Accuracy and Testing</h3>
653
- <p>Schema Pro lets you implement accurate markup and analyse your schema implementation instantly so you can rest assured that you’ve implemented it right.</p>
654
- </div>
655
- </div>
656
- </div>
657
- <div class="bsf-schema-features-1">
658
- <div class="bsf-schema-features-wrap">
659
- <div class="bsf-schema-features-icon">
660
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/acf.png").'"/>
661
- </div>
662
- <div class="bsf-schema-features-cont">
663
- <h3>Compatibility with Yoast SEO, ACF, PODS </h3>
664
- <p>Schema Pro is compatible with popular third-party plugins. It can inherit the settings from Yoast SEO and fetch custom fields that you&#39;ve created using the ACF or PODS plugins.</p>
665
- </div>
666
- </div>
667
- </div>
668
- </div>
669
- </div>
670
- </div>
671
- <div class="meta-box-sortables ui-sortable bsf-even-odd">
672
- <h3 class="bsf-hndle"><span>'.__("With Schema Pro, you can…","rich-snippets").'</span></h3>
673
- <div class="inside">
674
- <ol class="bsf-li-counter">
675
- <li>Automate schema markup for your entire website.</li>
676
- <li>Implement schema markup faster and more accurately.</li>
677
- <li>Target different post types with different Schema types.</li>
678
- </ol>
679
- </div>
680
- </div>
681
- <div class="meta-box-sortables ui-sortable bsf-even-even">
682
- <h3 class="bsf-hndle"><span>'.__("Testimonials","rich-snippets").'</span></h3>
683
- <div class="inside">
684
- <div class="bsf-schema">
685
- <div class="bsf-testimonial-wrap">
686
- <div class="bsf-schema-features-wrap">
687
- <div class="bsf-schema-testimonial-icon">
688
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/adam-circle.jpg").'"/>
689
- </div>
690
- <div class="bsf-schema-features-cont">
691
- <p>I have used every Schema Plugin for WordPress over the last few years, hundreds of dollars invested, and Schema Pro blows them all out of the water. It’s the only schema plugin you need.</p>
692
- <b>Adam Preiser,</b> <span>Founder of WPCrafter.com</span>
693
- </div>
694
- </div>
695
- </div>
696
- <div class="bsf-ls-separator"></div>
697
- <div class="bsf-testimonial-wrap">
698
- <div class="bsf-schema-features-wrap">
699
- <div class="bsf-schema-testimonial-icon">
700
- <img src="'.plugins_url("/all-in-one-schemaorg-rich-snippets/images/kylevan.png").'"/>
701
- </div>
702
- <div class="bsf-schema-features-cont">
703
- <p>Schema Pro has unlocked a powerful set of tools that produced results almost immediately. As a non-coder, a solution like this allows me to set up and stand out against the competition- and it couldn&#39;t be any easier to use!</p>
704
- <b>Kyle Van Deusen,</b> <span> Owner at ogalweb.com</span>
705
- </div>
706
- </div>
707
- </div>
708
- </div>
709
- </div>
710
- </div>
711
- <div class="meta-box-sortables ui-sortable bsf-even-odd testimonial-wraper">
712
- <div class="inside">
713
- <div class="bsf-schema">
714
- <div class="bsf-schema-button-wrap">
715
- <a href="https://wpschema.com/pricing/?utm_source=allinone&utm_campaign=repo&utm_medium=welcome" target="_blank" class="bsf-btn bsf-btn-lg btn-btn-purple">Get Schema Pro</a>
716
- </div>
717
- <div class="bsf-schema-button-wrap">
718
- <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=welcome" target="_blank" class="bsf-btn bsf-btn-lg btn-btn-grey">See All Features</a>
719
- </div>
720
- </div>
721
- </div>
722
- </div>
723
- </div>
724
- </div>
725
- </div>
726
-
727
- <div id="tab-3">
728
- <div id="poststuff">
729
- <div id="postbox-container-5" class="postbox-container">
730
- <div class="meta-box-sortables ui-sortable">
731
- <div class="postbox closed">
732
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
733
- <h3 class="hndle">'.__("Where can I test my schema markup implementation?","rich-snippets").'</h3>
734
- <div class="inside">
735
- <p>'.__("You can use the standard Google Structured Data Testing Tool to test your schema markup implementation. You can also take a look at the preview of how your search result might look.","rich-snippets").' <a href="http://www.google.com/webmasters/tools/richsnippets" target="_blank">Click Here.</a></p>
736
- </div>
737
- </div>
738
- <div class="postbox closed">
739
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
740
- <h3 class="hndle">'.__("Do I have to fill in all the details?","rich-snippets").'</h3>
741
- <div class="inside">
742
- <p>'.__("No. But, every schema type has some fields that HAVE to be filled as stated by Google. Therefore, it is recommended to fill these required fields in the schema markup you are implementing.","rich-snippets").'</p>
743
- </div>
744
- </div>
745
- <div class="postbox closed">
746
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
747
- <h3 class="hndle">'.__("Why does the plugin create extra content in the frontend? Can I hide it?","rich-snippets").'</h3>
748
- <div class="inside">
749
- <p>We understand that you don&#39;t like the content that gets displayed on your page / post. However, as per the strong recommendation of Google, MicroData should be clearly visible to the user.</p>
750
- <p>Here is a reference link of what Google says. <a href="https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display" target="_blank"> https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display</a></p>
751
- <p> If you still do not want your schema markup to affect your frontend design, you can use <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=faq" target="_blank">Schema Pro</a> - our advanced Schema markup plugin that is built with the latest JSON- LD technology which does not require a content box to be displayed on the front-end.</p>
752
- </div>
753
- </div>
754
- <div class="postbox closed">
755
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
756
- <h3 class="hndle">'.__("Does the plugin work with other plugins like WordPress SEO, WooCommerce, etc?","rich-snippets").'</h3>
757
- <div class="inside">
758
- <p>Well, the plugin works perfectly with most of the other plugins as the only thing "All in One Schema.org Rich Snippets" does is - it gives you power to add Rich Snippets MicroData to your pages and posts easily. <br><br>If you come across a conflict with any other plugin, please do not hesitate to report an issue.</p>
759
- </div>
760
- </div>
761
- <div class="postbox closed">
762
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
763
- <h3 class="hndle">'.__("How long will it take to show up rich snippets for my search results?","rich-snippets").'</h3>
764
- <div class="inside">
765
- <p>We cannot assure the time it will take to display a rich snippet for your search results. This is completely dependent on when your website is crawled by the search engine. However, there are many more factors, such as your website authority that contribute to the time taken for your website to be crawled and a rich snippet displayed.</p>
766
- <p>If rich snippets are not appearing in your search results as of yet, most probably they might start appearing as soon as Google or other search engines find your website more authoritative.</p>
767
- <p>Meanwhile - you can validate and see the preview of your rich snippets on <a target="_blank" href="http://www.google.com/webmasters/tools/richsnippets">[ Google Structured Data Testing Tool ]</a> .</p>
768
- </div>
769
- </div>
770
- <div class="postbox closed">
771
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
772
- <h3 class="hndle">'.__("I don't see the feature I want. How can I get it?","rich-snippets").'</h3>
773
- <div class="inside">
774
- <p>'.__("<a href='https://wpschema.com/contact/' target='_blank'>Get in touch</a> with us to ask if this feature is in our development roadmap. If it is not in our roadmap, and if you still think this feature would make the plugin better, we have a couple of options for you:","rich-snippets").'</p>
775
- <ol>
776
- <li>'.__("Code the new feature if you are a developer and submit your code. If we include this feature in our releases, credits will be given to you.","rich-snippets").'</li>
777
- <li>'.__("Offer a sponsorship to get this feature done for all plugin users OR request a professional customisation service.","rich-snippets").'</li>
778
- </ol>
779
- </div>
780
- </div>
781
- </div>
782
- </div>
783
- </div>
784
- </div>
785
- <!-- Tab 4-->
786
- <div id="tab-4">
787
- <div id="poststuff">
788
- <div id="postbox-container-11" class="postbox-container">
789
- <div class="meta-box-sortables ui-sortable">
790
- <div class="postbox">
791
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
792
- <h3 class="hndle">'.__("<span>Customize the look and feel of rich snippet box</span>","rich-snippets").'</h3>
793
- <div class="inside">
794
- <form id="bsf_css_editor" method="post" onsubmit="return false;" action="">
795
- '.wp_nonce_field( 'snippet_color_form_action', 'snippet_color_nonce_field' ).'
796
- <table class="bsf_metabox">
797
- <tr>
798
- <th> <label for="snippet_box_bg"> '.__('Box Background ', 'rich-snippets').' </label> </th>
799
- <td> <input type="text" name="snippet_box_bg" id="snippet_box_bg" value="'.stripslashes( $args_color["snippet_box_bg"] ).'" class="snippet_box_bg" /> </td>
800
- </tr>
801
- <tr>
802
- <th> <label for="snippet_title_bg"> '.__('Title Background', 'rich-snippets').' </label> </th>
803
- <td> <input type="text" name="snippet_title_bg" id="snippet_title_bg" value="'.stripslashes( $args_color["snippet_title_bg"] ).'" class="snippet_title_bg" /> </td>
804
- </tr>
805
- <tr>
806
- <th> <label for="snippet_border"> '.__('Border Color', 'rich-snippets').' </label> </th>
807
- <td> <input type="text" name="snippet_border" id="snippet_border" value="'.stripslashes( $args_color["snippet_border"] ).'" class="snippet_border" /> </td>
808
- </tr>
809
- <tr>
810
- <th> <label for="snippet_title_color"> '.__('Title Color', 'rich-snippets').' </label> </th>
811
- <td> <input type="text" name="snippet_title_color" id="snippet_title_color" value="'.stripslashes( $args_color["snippet_title_color"] ).'" class="snippet_title_color" /> </td>
812
- </tr>
813
- <tr>
814
- <th> <label for="snippet_box_color"> '.__('Snippet Text Color', 'rich-snippets').' </label> </th>
815
- <td> <input type="text" name="snippet_box_color" id="snippet_box_color" value="'.stripslashes( $args_color["snippet_box_color"] ).'" class="snippet_box_color" /> </td>
816
- </tr>
817
- <tr>
818
- <td></td>
819
- <td><input id="submit_colors" class="button-primary" type="submit" value="Update Colors" />&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=color">'.__('Reset ','rich-snippets').'</a></td>
820
- </tr>
821
- </table>
822
- </form>
823
- </div>
824
- </div>
825
- <div class="schema-notice">
826
- <p>'.__("Don&#39;t want to add a content box on the front-end? Get the latest and premium schema markup plugin that adds Google recommended JSON-LD structured data format without the content box. <a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=customize' target='_blank'> Know more about Schema Pro.</a>", "rich-snippets").'</p>
827
- </div>
828
- </div>
829
- </div>
830
- </div>
831
- </div>
832
- </div>
833
-
834
- </div>
835
- </div>
836
- <div class="postbox-container" id="bsf-postbox-container-1" >
837
- <div id="side-sortables" class="meta-box-sortables ui-sortable">
838
- <div class="postbox bsf-woocommerce-setting closed">
839
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
840
- <h3 class="get_in_touch">'.__("WooCommerce Configuration","rich-snippets").'</h3>
841
- <div class="inside">
842
- <form id="bsf_css_editor" method="post" action="">
843
- '.wp_nonce_field( 'snippet_woocommerce_form_action', 'snippet_woocommerce_nonce_field' ).'
844
- <p> '.__( 'WooCommerce comes with Schema.org code by default and using our plugin on WooCommerce product pages does will add duplicate schema so it is not recommended. If you could still like to enable our plugin on WooCommerce products, please enable this option.', 'rich-snippets' ).' </p>
845
- <table class="bsf_metabox" > <input type="hidden" name="site_url" value="'.site_url().'" /> </p>
846
- <tr>
847
- <td>
848
- <input type="checkbox" name="woocommerce_option" id="woocommerce_option" value="1" '.$woo_setting.' />
849
- <label for="woocommerce_option">Enable schema on WooCommerce products</label>
850
- </td>
851
- </tr>
852
- <tr>
853
- <td>
854
- <input style="margin-top:10px;" type="submit" class="button-primary" name="setting_submit" value="'.__("Update ").'"/>
855
- </td>
856
- </tr>
857
- </table>
858
- </form>
859
- </div>
860
- </div>'.get_support(1).'
861
- </div>';
862
- echo '
863
- <script src="'.plugin_dir_url( __FILE__ ).'js/jquery.easytabs.min.js'.'"></script>
864
- <script src="'.plugin_dir_url( __FILE__ ).'js/jquery.hashchange.min.js'.'"></script>
865
- <script language="javascript">
866
- jQuery("#tab-container").easytabs();
867
- jQuery("#postbox-container-1").css({"width":"87%","padding-right":"2%"});
868
- jQuery("#postbox-container-2").css("width","35%");
869
- jQuery("#postbox-container-3").css({"width":"87%","padding-right":"2%"});
870
- jQuery("#postbox-container-4").css("width","35%");
871
- jQuery("#postbox-container-5").css({"width":"87%","padding-right":"2%"});
872
- jQuery("#postbox-container-6").css("width","35%");
873
- jQuery("#postbox-container-7").css("width","35%");
874
- jQuery("#postbox-container-8").css("width","35%");
875
- jQuery("#postbox-container-9").css("width","35%");
876
- jQuery("#postbox-container-10").css("width","35%");
877
- jQuery("#postbox-container-11").css({"width":"87%","padding-right":"2%"});
878
- jQuery(".postbox h3").click( function() {
879
- jQuery(jQuery(this).parent().get(0)).toggleClass("closed");
880
- });
881
- jQuery(".handlediv").click( function() {
882
- jQuery(jQuery(this).parent().get(0)).toggleClass("closed");
883
- });
884
- </script>';
885
- }
886
- // Update options
887
-
888
- if(isset($_POST['setting_submit']))
889
- {
890
- if ( ! isset( $_POST['snippet_woocommerce_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_woocommerce_nonce_field'], 'snippet_woocommerce_form_action' )
891
- ) {
892
- print 'Sorry, your nonce did not verify.';
893
- exit;
894
- }
895
- else {
896
- $args = null;
897
- if(isset($_POST["woocommerce_option"]))
898
- {
899
- $args = true;
900
- }
901
- else {
902
- $args = false;
903
- }
904
- update_option( 'bsf_woocom_init_setting', 'done' );
905
- $status = update_option('bsf_woocom_setting',$args);
906
- displayStatus($status);
907
- }
908
- }
909
- if(isset($_POST['item_submit']))
910
- {
911
- if ( ! isset( $_POST['snippet_review_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_review_nonce_field'], 'snippet_review_form_action' )
912
- ) {
913
- print 'Sorry, your nonce did not verify.';
914
- exit;
915
- }
916
- else {
917
- foreach(array('review_title','item_reviewer','review_date','item_name','item_rating') as $option)
918
- {
919
- if(isset($_POST[$option]))
920
- {
921
- $args[$option] = esc_attr( $_POST[$option] );
922
- }
923
- }
924
- $status = update_option('bsf_review',$args);
925
- displayStatus($status);
926
- }
927
- }
928
- if(isset($_POST['event_submit']))
929
- {
930
- if ( ! isset( $_POST['snippet_event_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_event_nonce_field'], 'snippet_event_form_action' )
931
- ) {
932
- print 'Sorry, your nonce did not verify.';
933
- exit;
934
- }
935
- else {
936
- foreach(array('snippet_title','event_title','event_location','event_performer','start_time','end_time','event_desc','events_price') as $option)
937
- {
938
- if(isset($_POST[$option]))
939
- {
940
- $args[$option] = esc_attr( $_POST[$option] );
941
- }
942
- }
943
- $status = update_option('bsf_event',$args);
944
- displayStatus($status);
945
- }
946
- }
947
- if(isset($_POST['person_submit']))
948
- {
949
- if ( ! isset( $_POST['snippet_person_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_person_nonce_field'], 'snippet_person_form_action' )
950
- ) {
951
- print 'Sorry, your nonce did not verify.';
952
- exit;
953
- }
954
- else {
955
- foreach(array('snippet_title','person_name','person_nickname','person_job_title','person_website','person_company','person_address') as $option)
956
- {
957
- if(isset($_POST[$option]))
958
- {
959
- $args[$option] = esc_attr( $_POST[$option] );
960
- }
961
- }
962
- $status = update_option('bsf_person',$args);
963
- displayStatus($status);
964
- }
965
- }
966
- if(isset($_POST['product_submit']))
967
- {
968
- if ( ! isset( $_POST['snippet_product_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_product_nonce_field'], 'snippet_product_form_action' )
969
- ) {
970
- print 'Sorry, your nonce did not verify.';
971
- exit;
972
- }
973
- else {
974
- foreach(array('snippet_title','product_rating','product_brand','product_name','product_agr','product_price','product_avail') as $option)
975
- {
976
- if(isset($_POST[$option]))
977
- {
978
- $args[$option] = esc_attr( $_POST[$option] );
979
- }
980
- }
981
- $status = update_option('bsf_product',$args);
982
- displayStatus($status);
983
- }
984
- }
985
- if(isset($_POST['recipe_submit']))
986
- {
987
- if ( ! isset( $_POST['snippet_recipe_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_recipe_nonce_field'], 'snippet_recipe_form_action' )
988
- ) {
989
- print 'Sorry, your nonce did not verify.';
990
- exit;
991
- }
992
- else {
993
- foreach(array('snippet_title','recipe_name','author_name','recipe_pub','recipe_prep','recipe_cook','recipe_time','recipe_desc','recipe_rating') as $option)
994
- {
995
- if(isset($_POST[$option]))
996
- {
997
- $args[$option] = esc_attr( $_POST[$option] );
998
- }
999
- }
1000
- $status = update_option('bsf_recipe',$args);
1001
- displayStatus($status);
1002
- }
1003
- }
1004
- if(isset($_POST['software_submit']))
1005
- {
1006
- if ( ! isset( $_POST['snippet_soft_app_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_soft_app_nonce_field'], 'snippet_soft_app_form_action' )
1007
- ) {
1008
- print 'Sorry, your nonce did not verify.';
1009
- exit;
1010
- }
1011
- else {
1012
- foreach(array('snippet_title','software_rating','software_agr','software_price','software_name','software_os','software_website') as $option)
1013
- {
1014
- if(isset($_POST[$option]))
1015
- {
1016
- $args[$option] = esc_attr( $_POST[$option] );
1017
- }
1018
- }
1019
- $status = update_option('bsf_software',$args);
1020
- displayStatus($status);
1021
- }
1022
- }
1023
- if(isset($_POST['video_submit']))
1024
- {
1025
- if ( ! isset( $_POST['snippet_video_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_video_nonce_field'], 'snippet_video_form_action' )
1026
- ) {
1027
- print 'Sorry, your nonce did not verify.';
1028
- exit;
1029
- }
1030
- else {
1031
- foreach(array('snippet_title','video_title','video_desc','video_time','video_date') as $option)
1032
- {
1033
- if(isset($_POST[$option]))
1034
- {
1035
- $args[$option] = esc_attr( $_POST[$option] );
1036
- }
1037
- }
1038
- $status = update_option('bsf_video',$args);
1039
- displayStatus($status);
1040
- }
1041
- }
1042
- if(isset($_POST['article_submit']))
1043
- {
1044
- if ( ! isset( $_POST['snippet_article_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_article_nonce_field'], 'snippet_article_form_action' )
1045
- ) {
1046
- print 'Sorry, your nonce did not verify.';
1047
- exit;
1048
- }
1049
- else {
1050
- foreach(array('snippet_title','article_name','article_author','article_desc','article_image','article_publisher','article_publisher_logo') as $option)
1051
- {
1052
- if(isset($_POST[$option]))
1053
- {
1054
- $args[$option] = esc_attr( $_POST[$option] );
1055
- }
1056
- }
1057
- $status = update_option('bsf_article',$args);
1058
- displayStatus($status);
1059
- }
1060
- }
1061
- if(isset($_POST['service_submit']))
1062
- {
1063
- if ( ! isset( $_POST['snippet_service_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_service_nonce_field'], 'snippet_service_form_action' )
1064
- ) {
1065
- print 'Sorry, your nonce did not verify.';
1066
- exit;
1067
- }
1068
- else {
1069
- foreach(array('snippet_title','service_type','service_area','service_desc','service_provider_name','provider_location','service_rating','service_channel','service_url_link') as $option)
1070
- {
1071
- if(isset($_POST[$option]))
1072
- {
1073
- $args[$option] = esc_attr( $_POST[$option] );
1074
- }
1075
- }
1076
- $status = update_option('bsf_service',$args);
1077
- displayStatus($status);
1078
- }
1079
- }
1080
- function displayStatus($status) {
1081
- if($status)
1082
- {
1083
- echo '<div class="updated"><p>' . __('Success! Your changes were successfully saved!', 'rich-snippets') . '</p></div>';
1084
- }
1085
- else
1086
- {
1087
- echo '<div class="error"><p>' . __('Sorry, Your changes are not saved!', 'rich-snippets') . '</p></div>';
1088
- }
1089
- }
1090
- if(isset($_GET['action']))
1091
- {
1092
- if(esc_attr( $_GET['action'] ) == 'reset' )
1093
- {
1094
- $option_to_reset = esc_attr( $_GET['options'] );
1095
- if($option_to_reset == 'review')
1096
- delete_option('bsf_review');
1097
- if($option_to_reset == 'event')
1098
- delete_option('bsf_event');
1099
- if($option_to_reset == 'person')
1100
- delete_option('bsf_person');
1101
-
1102
- if($option_to_reset == 'product')
1103
- delete_option('bsf_product');
1104
- if($option_to_reset == 'recipe')
1105
- delete_option('bsf_recipe');
1106
- if($option_to_reset == 'software')
1107
- delete_option('bsf_software');
1108
- if($option_to_reset == 'video')
1109
- delete_option('bsf_video');
1110
-
1111
- if($option_to_reset == 'article')
1112
- delete_option('bsf_article');
1113
- if($option_to_reset == 'service')
1114
- delete_option('bsf_service');
1115
-
1116
- if($option_to_reset == 'color')
1117
- delete_option('bsf_custom');
1118
-
1119
- bsf_reset_options($option_to_reset);
1120
- }
1121
- }
1122
- function bsf_reset_options($option_to_reset)
1123
- {
1124
- require_once(dirname(__FILE__) .'/../settings.php');
1125
- if($option_to_reset == 'review')
1126
- add_review_option();
1127
- if($option_to_reset == 'event')
1128
- add_event_option();
1129
- if($option_to_reset == 'person')
1130
- add_person_option();
1131
- if($option_to_reset == 'product')
1132
- add_product_option();
1133
- if($option_to_reset == 'recipe')
1134
- add_recipe_option();
1135
- if($option_to_reset == 'software')
1136
- add_software_option();
1137
- if($option_to_reset == 'video')
1138
- add_video_option();
1139
- if($option_to_reset == 'article')
1140
- add_article_option();
1141
- if($option_to_reset == 'service')
1142
- add_service_option();
1143
- if($option_to_reset == 'color')
1144
- add_color_option();
1145
-
1146
- header("location:?page=rich_snippet_dashboard");
1147
- }
1148
- function add_footer_script()
1149
- {?>
1150
- <script type="text/javascript">
1151
- jQuery("#submit_colors").click(function()
1152
- {
1153
- var data = jQuery("#bsf_css_editor").serialize();
1154
- var form_data = "action=bsf_submit_color&" + data;
1155
- //alert(form_data);
1156
- jQuery.post(ajaxurl, form_data,
1157
- function (response) {
1158
- alert(response);
1159
- }
1160
- );
1161
- });
1162
- jQuery("#support_form").submit(function()
1163
- {
1164
- var data = jQuery("#support_form").serialize();
1165
- var form_data = "action=bsf_submit_request&" + data;
1166
- // alert(form_data);
1167
- jQuery.post(ajaxurl, form_data,
1168
- function (response) {
1169
- alert(response);
1170
- jQuery("#support_form .bsf_text_medium, #support_form .bsf_textarea_small").val("");
1171
- }
1172
- );
1173
- });
1174
- </script>
1175
- <?php }
1176
- function get_support()
1177
- {
1178
- $html = '
1179
- <div class="postbox bsf-contact closed">
1180
- <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
1181
- <h3 class="get_in_touch">'.__("Get in touch with the Plugin Developers","rich-snippets").'</h3>
1182
- <div class="inside">
1183
- <form name="support" id="support_form" action="" method="post" onsubmit="return false;">
1184
- <p> '.__( 'Just fill out the form below and your message will be emailed to the Plugin Developers.', 'rich-snippets' ).' </p>
1185
- <table class="bsf_metabox" > <input type="hidden" name="site_url" value="'.site_url().'" /> </p>
1186
- <tr><td><label for="name"><strong>'.__( 'Your Name:', 'rich-snippets').'<span style="color:red;"> *</span></strong> </label></td>
1187
- <td><input required="required" type="text" class="bsf_text_medium" name="name" /></td></tr>
1188
- <tr><td><label for="email"><strong>'.__( 'Your Email:', 'rich-snippets').'<span style="color:red;"> *</span></strong> </label></td>
1189
- <td><input required="required" type="text" class="bsf_text_medium" name="email" /></td></tr>
1190
- <tr><td><label for="post_url"><strong>'.__( 'Reference URL:', 'rich-snippets').'<span style="color:red;"> *</span></strong> </label></td>
1191
- <td><input required="required" type="text" class="bsf_text_medium" name="post_url" /></td></tr>
1192
- <tr><td><label for="subject"><strong>'.__( 'Subject:', 'rich-snippets').'</strong> </label></td>
1193
- <td>
1194
- <select class="select_full" name="subject">
1195
- <option value="question"> I have a question </option>
1196
- <option value="bug"> I found a bug </option>
1197
- <option value="help"> I need help </option>
1198
- <option value="professional"> I need professional service </option>
1199
- <option value="contribute"> I want to contribute my code</option>
1200
- <option value="other"> Other </option>
1201
- </select>
1202
- </td><td></td></tr>
1203
- <tr><td class="bsf_label"><label for="message"><strong>'.__( 'Your Query in Brief:', 'rich-snippets').'</strong> </label></td>
1204
- <td rowspan="4"><textarea class="bsf_textarea_small" name="message" required></textarea> </td></tr>
1205
- <tr></tr> <tr></tr> <tr></tr>
1206
- <tr><td></td>
1207
- <td><input id="submit_request" class="button-primary" type="submit" value="Submit Request" /> <span id="status"></span></td></tr>
1208
- </table>
1209
- </form>
1210
- </div>
1211
- </div>
1212
- </div>
1213
- </div>
1214
- </div>
1215
- ';
1216
- return $html;
1217
- }
1218
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Start object buffering to supress warning messages.
4
+ *
5
+ * @package Schema - All In One Schema Rich Snippets.
6
+ */
7
+
8
+ ob_start();
9
+ if ( is_admin() ) {
10
+ add_action( 'admin_footer', 'add_footer_script' );
11
+ }
12
+ /**
13
+ * Enqueues the styles in admin dashboard.
14
+ *
15
+ * @return void
16
+ */
17
+ function bsf_admin_styles() {
18
+ wp_enqueue_style( 'star_style' );
19
+ wp_enqueue_style( 'meta_style' );
20
+ wp_enqueue_script( 'bsf_jquery' );
21
+ wp_enqueue_script( 'jquery-ui-core' );
22
+ wp_enqueue_script( 'bsf_jquery_star' );
23
+ }
24
+ /**
25
+ * Enqueues the scripts in admin dashboard.
26
+ *
27
+ * @return void
28
+ */
29
+ function add_the_script() {
30
+ wp_enqueue_script( 'postbox' );
31
+ wp_enqueue_style( 'admin_style' );
32
+ }
33
+ add_action( 'admin_print_scripts', 'add_the_script' );
34
+ /**
35
+ * The Main Admin Dashboard for Rich Snippets Plugin.
36
+ *
37
+ * @return void
38
+ */
39
+ function rich_snippet_dashboard() {
40
+ $plugins_url = plugins_url();
41
+ if ( ! get_option( 'bsf_woocom_init_setting' ) ) {
42
+ $args_woocom = true;
43
+ } else {
44
+ $args_woocom = get_option( 'bsf_woocom_setting' );
45
+ }
46
+
47
+ $args_review = get_option( 'bsf_review' );
48
+ $args_event = get_option( 'bsf_event' );
49
+ $args_person = get_option( 'bsf_person' );
50
+ $args_product = get_option( 'bsf_product' );
51
+ $args_recipe = get_option( 'bsf_recipe' );
52
+ $args_soft = get_option( 'bsf_software' );
53
+ $args_video = get_option( 'bsf_video' );
54
+ $args_article = get_option( 'bsf_article' );
55
+ $args_service = get_option( 'bsf_service' );
56
+
57
+ $woo_setting = '';
58
+ if ( ! empty( $args_woocom ) ) {
59
+ $woo_setting = 'Checked';
60
+ }
61
+
62
+ if ( isset( $args_event['event_desc'] ) ) {
63
+ $event_desc = $args_event['event_desc'];
64
+ } else {
65
+ $event_desc = null;
66
+ }
67
+
68
+ if ( isset( $args_recipe['author_name'] ) ) {
69
+ $author_name = $args_recipe['author_name'];
70
+ } else {
71
+ $author_name = null;
72
+ }
73
+
74
+ if ( isset( $args_recipe['recipe_desc'] ) ) {
75
+ $recipe_desc = $args_recipe['recipe_desc'];
76
+ } else {
77
+ $recipe_desc = null;
78
+ }
79
+
80
+ if ( isset( $args_service['provider_location'] ) ) {
81
+ $provider_location = $args_service['provider_location'];
82
+ } else {
83
+ $provider_location = null;
84
+ }
85
+
86
+ $args_color = get_option( 'bsf_custom' );
87
+ echo '<div class="wrap">';
88
+ echo '<div id="star-icons-32" class="icon32"></div><h2>' . esc_html__( 'All in One Schema.org Rich Snippets - Dashboard', 'all-in-one-schemaorg-rich-snippets' ) . '</h2>';
89
+ echo '<div id="post-body" class="columns-2">';
90
+ echo '<div class="clear"></div>';
91
+ echo '<div id="bsf-postbox-container-2" class="postbox-container"><div id="tab-container" class="tab-container">';
92
+ echo '<ul class="nav-tab-wrapper bsf-tab-wraper">
93
+ <li><a href="#tab-1" class="nav-tab">' . esc_html__( 'Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
94
+ <li><a href="#tab-4" class="nav-tab">' . esc_html__( 'Customization', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
95
+
96
+ <li><a href="#tab-3" class="nav-tab">' . esc_html__( 'FAQs', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
97
+ <li><a href="#tab-5" class="nav-tab">' . esc_html__( 'Getting Started', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
98
+ </ul>
99
+ <div class="clear"></div>
100
+ <div class="panel-container bsf-panel">
101
+ <div id="tab-1">
102
+ <div id="poststuff">
103
+ <div class="schema-notice-head">
104
+ <p>' . esc_html__( 'Choose the schema markup and update the strings you want to display on the front-end.', 'all-in-one-schemaorg-rich-snippets' ) . '</p>
105
+ </div>
106
+ <div id="postbox-container-2" class="postbox-container">
107
+ <div class="meta-box-sortables ui-sortable">
108
+ <div class="postbox closed">
109
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
110
+ <h3 class="hndle"><span>' . esc_html__( 'Item Review', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
111
+ <div class="inside">
112
+ <div class="table">
113
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Item Review Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
114
+ <form id="bsf_review_form" method="post">
115
+ ' . wp_nonce_field( 'snippet_review_form_action', 'snippet_review_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
116
+ . '
117
+ <table class="bsf_metabox">
118
+ <tbody>
119
+ <tr>
120
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
121
+ <td><input class="bsf_text_medium" type="text" name="review_title" value="' . esc_attr( stripslashes( $args_review['review_title'] ) ) . '"/></td>
122
+ </tr>
123
+ <tr>
124
+ <td align="right"><strong><label>' . esc_html__( 'Reviewer :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
125
+ <td><input class="bsf_text_medium" type="text" name="item_reviewer" value="' . esc_attr( stripslashes( $args_review['item_reviewer'] ) ) . '"/></td>
126
+ </tr>
127
+ <tr>
128
+ <td align="right"><strong><label>' . esc_html__( 'Review Date :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
129
+ <td><input class="bsf_text_medium" type="text" name="review_date" value="' . esc_attr( stripslashes( $args_review['review_date'] ) ) . '"/></td>
130
+ </tr>
131
+ <tr>
132
+ <td align="right"><strong><label>' . esc_html__( 'Item Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
133
+ <td><input class="bsf_text_medium" type="text" name="item_name" value="' . esc_attr( stripslashes( $args_review['item_name'] ) ) . '"/></td>
134
+ </tr>
135
+ <tr>
136
+ <td align="right"><strong><label>' . esc_html__( 'Item Ratings :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
137
+ <td><input class="bsf_text_medium" type="text" name="item_rating" value="' . esc_attr( stripslashes( $args_review['item_rating'] ) ) . '"/></td>
138
+ </tr>
139
+ <tr><td colspan="2"></td></tr>
140
+ <tr>
141
+ <td></td>
142
+ <td><input type="submit" class="button-primary" name="item_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=review">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
143
+ </tr>
144
+ </tbody>
145
+ </table>
146
+ </form>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ <div class="postbox closed">
151
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
152
+ <h3 class="hndle"><span>' . esc_html__( 'Events', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
153
+ <div class="inside">
154
+ <div class="table">
155
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Events Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
156
+ <form id="bsf_event_form" method="post">
157
+ ' . wp_nonce_field( 'snippet_event_form_action', 'snippet_event_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
158
+ . '
159
+ <table class="bsf_metabox">
160
+ <tbody>
161
+ <tr>
162
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
163
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_event['snippet_title'] ) ) . '"/></td>
164
+ </tr>
165
+ <tr>
166
+ <td align="right"><strong><label>' . esc_html__( 'Event Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
167
+ <td><input class="bsf_text_medium" type="text" name="event_title" value="' . esc_attr( stripslashes( $args_event['event_title'] ) ) . '"/></td>
168
+ </tr>
169
+ <tr>
170
+ <td align="right"><strong><label>' . esc_html__( 'Event Location :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
171
+ <td><input class="bsf_text_medium" type="text" name="event_location" value="' . esc_attr( stripslashes( $args_event['event_location'] ) ) . '"/></td>
172
+ </tr>
173
+ <tr>
174
+ <td align="right"><strong><label>' . esc_html__( 'Start Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
175
+ <td><input class="bsf_text_medium" type="text" name="start_time" value="' . esc_attr( stripslashes( $args_event['start_time'] ) ) . '"/></td>
176
+ </tr>
177
+ <tr>
178
+ <td align="right"><strong><label>' . esc_html__( 'End Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
179
+ <td><input class="bsf_text_medium" type="text" name="end_time" value="' . esc_attr( stripslashes( $args_event['end_time'] ) ) . '"/></td>
180
+ </tr>
181
+ <tr>
182
+ <td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
183
+ <td><input class="bsf_text_medium" type="text" name="event_desc" value="' . esc_attr( stripslashes( $event_desc ) ) . '"/></td>
184
+ </tr>
185
+ <tr>
186
+ <td align="right"><strong><label>' . esc_html__( 'Ticket Promotion :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
187
+ <td><input class="bsf_text_medium" type="text" name="events_price" value="' . esc_attr( stripslashes( $args_event['events_price'] ) ) . '"/></td>
188
+ </tr>
189
+ <tr><td colspan="2"></td></tr>
190
+ <tr>
191
+ <td></td>
192
+ <td><input type="submit" class="button-primary" name="event_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=event">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
193
+ </tr>
194
+ </tbody>
195
+ </table>
196
+ </form>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ <div class="postbox closed">
201
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
202
+ <h3 class="hndle"><span>' . esc_html__( 'Person', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
203
+ <div class="inside">
204
+ <div class="table">
205
+ <p>' . wp_kses_post( __( "Strings to be displayed on frontend for <strong>Person's Rich Snippets &mdash;</strong>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
206
+ <form id="bsf_person_form" method="post">
207
+ ' . wp_nonce_field( 'snippet_person_form_action', 'snippet_person_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
208
+ . '
209
+ <table class="bsf_metabox">
210
+ <tbody>
211
+ <tr>
212
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
213
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_person['snippet_title'] ) ) . '"/></td>
214
+ </tr>
215
+ <tr>
216
+ <td align="right"><strong><label>' . esc_html__( "Person's Name :", 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
217
+ <td><input class="bsf_text_medium" type="text" name="person_name" value="' . esc_attr( stripslashes( $args_person['person_name'] ) ) . '"/></td>
218
+ </tr>
219
+ <tr>
220
+ <td align="right"><strong><label>' . esc_html__( 'Nick Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
221
+ <td><input class="bsf_text_medium" type="text" name="person_nickname" value="' . esc_attr( stripslashes( $args_person['person_nickname'] ) ) . '"/></td>
222
+ </tr>
223
+ <tr>
224
+ <td align="right"><strong><label>' . esc_html__( 'Job Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
225
+ <td><input class="bsf_text_medium" type="text" name="person_job_title" value="' . esc_attr( stripslashes( $args_person['person_job_title'] ) ) . '"/></td>
226
+ </tr>
227
+ <tr>
228
+ <td align="right"><strong><label>' . esc_html__( 'Home page :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
229
+ <td><input class="bsf_text_medium" type="text" name="person_website" value="' . esc_attr( stripslashes( $args_person['person_website'] ) ) . '"/></td>
230
+ </tr>
231
+ <tr>
232
+ <td align="right"><strong><label>' . esc_html__( 'Company Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
233
+ <td><input class="bsf_text_medium" type="text" name="person_company" value="' . esc_attr( stripslashes( $args_person['person_company'] ) ) . '"/></td>
234
+ </tr>
235
+ <tr>
236
+ <td align="right"><strong><label>' . esc_html__( 'Address :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
237
+ <td><input class="bsf_text_medium" type="text" name="person_address" value="' . esc_attr( stripslashes( $args_person['person_address'] ) ) . '"/></td>
238
+ </tr>
239
+ <tr><td colspan="2"></td></tr>
240
+ <tr>
241
+ <td></td>
242
+ <td><input type="submit" class="button-primary" name="person_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=person">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
243
+ </tr>
244
+ </tbody>
245
+ </table>
246
+ </form>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ <div class="postbox closed">
251
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
252
+ <h3 class="hndle"><span>' . esc_html__( 'Product', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
253
+ <div class="inside">
254
+ <div class="table">
255
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Product Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
256
+ <form id="bsf_product_form" method="post">
257
+ ' . wp_nonce_field( 'snippet_product_form_action', 'snippet_product_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
258
+ . '
259
+ <table class="bsf_metabox">
260
+ <tbody>
261
+ <tr>
262
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
263
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_product['snippet_title'] ) ) . '"/></td>
264
+ </tr>
265
+ <tr>
266
+ <td align="right"><strong><label>' . esc_html__( 'Author Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
267
+ <td><input class="bsf_text_medium" type="text" name="product_rating" value="' . esc_attr( stripslashes( $args_product['product_rating'] ) ) . '"/></td>
268
+ </tr>
269
+ <tr>
270
+ <td align="right"><strong><label>' . esc_html__( 'Brand Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
271
+ <td><input class="bsf_text_medium" type="text" name="product_brand" value="' . esc_attr( stripslashes( $args_product['product_brand'] ) ) . '"/></td>
272
+ </tr>
273
+ <tr>
274
+ <td align="right"><strong><label>' . esc_html__( 'Product Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
275
+ <td><input class="bsf_text_medium" type="text" name="product_name" value="' . esc_attr( stripslashes( $args_product['product_name'] ) ) . '"/></td>
276
+ </tr>
277
+ <tr>
278
+ <td align="right"><strong><label>' . esc_html__( 'User Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
279
+ <td><input class="bsf_text_medium" type="text" name="product_agr" value="' . esc_attr( stripslashes( $args_product['product_agr'] ) ) . '"/></td>
280
+ </tr>
281
+ <tr>
282
+ <td align="right"><strong><label>' . esc_html__( 'Price :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
283
+ <td><input class="bsf_text_medium" type="text" name="product_price" value="' . esc_attr( stripslashes( $args_product['product_price'] ) ) . '"/></td>
284
+ </tr>
285
+ <tr>
286
+ <td align="right"><strong><label>' . esc_html__( 'Product Availability :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
287
+ <td><input class="bsf_text_medium" type="text" name="product_avail" value="' . esc_attr( stripslashes( $args_product['product_avail'] ) ) . '"/></td>
288
+ </tr>
289
+ <tr><td colspan="2"></td></tr>
290
+ <tr>
291
+ <td></td>
292
+ <td><input type="submit" class="button-primary" name="product_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=product">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
293
+ </tr>
294
+ </tbody>
295
+ </table>
296
+ </form>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ <div class="postbox closed">
301
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
302
+ <h3 class="hndle"><span>' . esc_html__( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
303
+ <div class="inside">
304
+ <div class="table">
305
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Recipe Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
306
+ <form id="bsf_recipe_form" method="post">
307
+ ' . wp_nonce_field( 'snippet_recipe_form_action', 'snippet_recipe_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
308
+ . '
309
+ <table class="bsf_metabox">
310
+ <tbody>
311
+ <tr>
312
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
313
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_recipe['snippet_title'] ) ) . '"/></td>
314
+ </tr>
315
+ <tr>
316
+ <td align="right"><strong><label>' . esc_html__( 'Recipe Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
317
+ <td><input class="bsf_text_medium" type="text" name="recipe_name" value="' . esc_attr( stripslashes( $args_recipe['recipe_name'] ) ) . '"/></td>
318
+ </tr>
319
+ <tr>
320
+ <td align="right"><strong><label>' . esc_html__( 'Author Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
321
+ <td><input class="bsf_text_medium" type="text" name="author_name" value="' . esc_attr( stripslashes( $author_name ) ) . '"/></td>
322
+ </tr>
323
+ <tr>
324
+ <td align="right"><strong><label>' . esc_html__( 'Published On : ', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
325
+ <td><input class="bsf_text_medium" type="text" name="recipe_pub" value="' . esc_attr( stripslashes( $args_recipe['recipe_pub'] ) ) . '"/></td>
326
+ </tr>
327
+ <tr>
328
+ <td align="right"><strong><label>' . esc_html__( 'Preparation Time:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
329
+ <td><input class="bsf_text_medium" type="text" name="recipe_prep" value="' . esc_attr( stripslashes( $args_recipe['recipe_prep'] ) ) . '"/></td>
330
+ </tr>
331
+ <tr>
332
+ <td align="right"><strong><label>' . esc_html__( 'Cook Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
333
+ <td><input class="bsf_text_medium" type="text" name="recipe_cook" value="' . esc_attr( stripslashes( $args_recipe['recipe_cook'] ) ) . '"/></td>
334
+ </tr>
335
+ <tr>
336
+ <td align="right"><strong><label>' . esc_html__( 'Total Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
337
+ <td><input class="bsf_text_medium" type="text" name="recipe_time" value="' . esc_attr( stripslashes( $args_recipe['recipe_time'] ) ) . '"/></td>
338
+ </tr>
339
+ <tr>
340
+ <td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
341
+ <td><input class="bsf_text_medium" type="text" name="recipe_desc" value="' . esc_attr( stripslashes( $recipe_desc ) ) . '"/></td>
342
+ </tr>
343
+ <tr>
344
+ <td align="right"><strong><label>' . esc_html__( 'Average Rating:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
345
+ <td><input class="bsf_text_medium" type="text" name="recipe_rating" value="' . esc_attr( stripslashes( $args_recipe['recipe_rating'] ) ) . '"/></td>
346
+ </tr>
347
+ <tr><td colspan="2"></td></tr>
348
+ <tr>
349
+ <td></td>
350
+ <td><input type="submit" class="button-primary" name="recipe_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=recipe">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
351
+ </tr>
352
+ </tbody>
353
+ </table>
354
+ </form>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ <div class="postbox closed">
359
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
360
+ <h3 class="hndle"><span>' . esc_html__( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
361
+ <div class="inside">
362
+ <div class="table">
363
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Software Application Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
364
+ <form id="bsf_software_form" method="post">
365
+ ' . wp_nonce_field( 'snippet_soft_app_form_action', 'snippet_soft_app_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
366
+ . '
367
+ <table class="bsf_metabox">
368
+ <tbody>
369
+ <tr>
370
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
371
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_soft['snippet_title'] ) ) . '"/></td>
372
+ </tr>
373
+ <tr>
374
+ <td align="right"><strong><label>' . esc_html__( 'Author Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
375
+ <td><input class="bsf_text_medium" type="text" name="software_rating" value="' . esc_attr( stripslashes( $args_soft['software_rating'] ) ) . '"/></td>
376
+ </tr>
377
+ <tr>
378
+ <td align="right"><strong><label>' . esc_html__( 'User Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
379
+ <td><input class="bsf_text_medium" type="text" name="software_agr" value="' . esc_attr( stripslashes( $args_soft['software_agr'] ) ) . '"/></td>
380
+ </tr>
381
+ <tr>
382
+ <td align="right"><strong><label>' . esc_html__( 'Software Price :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
383
+ <td><input class="bsf_text_medium" type="text" name="software_price" value="' . esc_attr( stripslashes( $args_soft['software_price'] ) ) . '"/></td>
384
+ </tr>
385
+ <tr>
386
+ <td align="right"><strong><label>' . esc_html__( 'Software Name:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
387
+ <td><input class="bsf_text_medium" type="text" name="software_name" value="' . esc_attr( stripslashes( $args_soft['software_name'] ) ) . '"/></td>
388
+ </tr>
389
+ <tr>
390
+ <td align="right"><strong><label>' . esc_html__( 'Operating System :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
391
+ <td><input class="bsf_text_medium" type="text" name="software_os" value="' . esc_attr( stripslashes( $args_soft['software_os'] ) ) . '"/></td>
392
+ </tr>
393
+ <tr>
394
+ <td align="right"><strong><label>' . esc_html__( 'Landing Page:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
395
+ <td><input class="bsf_text_medium" type="text" name="software_website" value="' . esc_attr( stripslashes( $args_soft['software_website'] ) ) . '"/></td>
396
+ </tr>
397
+ <tr><td colspan="2"></td></tr>
398
+ <tr>
399
+ <td></td>
400
+ <td><input type="submit" class="button-primary" name="software_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=software">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
401
+ </tr>
402
+ </tbody>
403
+ </table>
404
+ </form>
405
+ </div>
406
+ </div>
407
+ </div>
408
+
409
+
410
+ <div class="postbox closed">
411
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
412
+ <h3 class="hndle"><span>' . esc_html__( 'Video', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
413
+ <div class="inside">
414
+ <div class="table">
415
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Video Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
416
+ <form id="bsf_video_form" method="post">
417
+ ' . wp_nonce_field( 'snippet_video_form_action', 'snippet_video_nonce_field' )//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
418
+ . '
419
+ <table class="bsf_metabox">
420
+ <tbody>
421
+ <tr>
422
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
423
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_video['snippet_title'] ) ) . '"/></td>
424
+ </tr>
425
+ <tr>
426
+ <td align="right"><strong><label>' . esc_html__( 'Video Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
427
+ <td><input class="bsf_text_medium" type="text" name="video_title" value="' . esc_attr( stripslashes( $args_video['video_title'] ) ) . '"/></td>
428
+ </tr>
429
+ <tr>
430
+ <td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
431
+ <td><input class="bsf_text_medium" type="text" name="video_desc" value="' . esc_attr( stripslashes( $args_video['video_desc'] ) ) . '"/></td>
432
+ </tr>
433
+ <tr>
434
+ <td align="right"><strong><label>' . esc_html__( 'Video Duration :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
435
+ <td><input class="bsf_text_medium" type="text" name="video_time" value="' . esc_attr( stripslashes( $args_video['video_time'] ) ) . '"/></td>
436
+ </tr>
437
+ <tr>
438
+ <td align="right"><strong><label>' . esc_html__( 'Video Upload Date :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
439
+ <td><input class="bsf_text_medium" type="text" name="video_date" value="' . esc_attr( stripslashes( $args_video['video_date'] ) ) . '"/></td>
440
+ </tr>
441
+ <tr><td colspan="2"></td></tr>
442
+ <tr>
443
+ <td></td>
444
+ <td><input type="submit" class="button-primary" name="video_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=video">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
445
+ </tr>
446
+ </tbody>
447
+ </table>
448
+ </form>
449
+ </div>
450
+ </div>
451
+ </div>
452
+ <div class="postbox closed">
453
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
454
+ <h3 class="hndle"><span>' . esc_html__( 'Article', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
455
+ <div class="inside">
456
+ <div class="table">
457
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Article Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
458
+ <form id="bsf_article_form" method="post">
459
+ ' . wp_nonce_field( 'snippet_article_form_action', 'snippet_article_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
460
+ . '
461
+ <table class="bsf_metabox">
462
+ <tbody>
463
+ <tr>
464
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
465
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_article['snippet_title'] ) ) . '"/></td>
466
+ </tr>
467
+ <tr>
468
+ <td align="right"><strong><label>' . esc_html__( 'Article Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
469
+ <td><input class="bsf_text_medium" type="text" name="article_name" value="' . esc_attr( stripslashes( $args_article['article_name'] ) ) . '"/></td>
470
+ </tr>
471
+ <tr>
472
+ <td align="right"><strong><label>' . esc_html__( 'Author :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
473
+ <td><input class="bsf_text_medium" type="text" name="article_author" value="' . esc_attr( stripslashes( $args_article['article_author'] ) ) . '"/></td>
474
+ </tr>
475
+ <tr>
476
+ <td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
477
+ <td><input class="bsf_text_medium" type="text" name="article_desc" value="' . esc_attr( stripslashes( $args_article['article_desc'] ) ) . '"/></td>
478
+ </tr>
479
+ <tr>
480
+ <td align="right"><strong><label>' . esc_html__( 'Image :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
481
+ <td><input class="bsf_text_medium" type="text" name="article_image" value="' . esc_attr( stripslashes( $args_article['article_image'] ) ) . '"/></td>
482
+ </tr>
483
+ <tr>
484
+ <td align="right"><strong><label>' . esc_html__( 'Publisher :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
485
+ <td><input class="bsf_text_medium" type="text" name="article_publisher" value="' . esc_attr( stripslashes( $args_article['article_publisher'] ) ) . '"/></td>
486
+ </tr>
487
+ <tr>
488
+ <td align="right"><strong><label>' . esc_html__( 'Publisher Logo :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
489
+ <td><input class="bsf_text_medium" type="text" name="article_publisher_logo" value="' . esc_attr( stripslashes( $args_article['article_publisher_logo'] ) ) . '"/></td>
490
+ </tr>
491
+ <tr><td colspan="2"></td></tr>
492
+ <tr>
493
+ <td></td>
494
+ <td><input type="submit" class="button-primary" name="article_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=article">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
495
+ </tr>
496
+ </tbody>
497
+ </table>
498
+ </form>
499
+ </div>
500
+ </div>
501
+ </div>
502
+ <div class="postbox closed">
503
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
504
+ <h3 class="hndle"><span>' . esc_html__( 'Service', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
505
+ <div class="inside">
506
+ <div class="table">
507
+ <p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Service Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
508
+ <form id="bsf_service_form" method="post">
509
+ ' . wp_nonce_field( 'snippet_service_form_action', 'snippet_service_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
510
+ . '
511
+ <table class="bsf_metabox">
512
+ <tbody>
513
+ <tr>
514
+ <td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
515
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_service['snippet_title'] ) ) . '"/></td>
516
+ </tr>
517
+ <tr>
518
+ <td align="right"><strong><label>' . esc_html__( 'Service Type :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
519
+ <td><input class="bsf_text_medium" type="text" name="service_type" value="' . esc_attr( stripslashes( $args_service['service_type'] ) ) . '"/></td>
520
+ </tr>
521
+ <tr>
522
+ <td align="right"><strong><label>' . esc_html__( 'Area :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
523
+ <td><input class="bsf_text_medium" type="text" name="service_area" value="' . esc_attr( stripslashes( $args_service['service_area'] ) ) . '"/></td>
524
+ </tr>
525
+ <tr>
526
+ <td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
527
+ <td><input class="bsf_text_medium" type="text" name="service_desc" value="' . esc_attr( stripslashes( $args_service['service_desc'] ) ) . '"/></td>
528
+ </tr>
529
+ <tr>
530
+ <td align="right"><strong><label>' . esc_html__( 'Provider Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
531
+ <td><input class="bsf_text_medium" type="text" name="service_provider_name" value="' . esc_attr( stripslashes( $args_service['service_provider_name'] ) ) . '"/></td>
532
+ </tr>
533
+ <tr>
534
+ <td align="right"><strong><label>' . esc_html__( 'Provider Location :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
535
+ <td><input class="bsf_text_medium" type="text" name="provider_location" value="' . esc_attr( stripslashes( $provider_location ) ) . '"/></td>
536
+ </tr>
537
+ <tr>
538
+ <td align="right"><strong><label>' . esc_html__( 'URL :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
539
+ <td><input class="bsf_text_medium" type="text" name="service_channel" value="' . esc_attr( stripslashes( $args_service['service_channel'] ) ) . '"/></td>
540
+ </tr>
541
+ <tr>
542
+ <td align="right"><strong><label>' . esc_html__( 'URL Text :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
543
+ <td><input class="bsf_text_medium" type="text" name="service_url_link" value="' . esc_attr( stripslashes( $args_service['service_url_link'] ) ) . '"/></td>
544
+ </tr>
545
+ <tr>
546
+ <td align="right"><strong><label>' . esc_html__( 'Service Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
547
+ <td><input class="bsf_text_medium" type="text" name="service_rating" value="' . esc_attr( stripslashes( $args_service['service_rating'] ) ) . '"/></td>
548
+ </tr>
549
+ <tr><td colspan="2"></td></tr>
550
+ <tr>
551
+ <td></td>
552
+ <td><input type="submit" class="button-primary" name="service_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=service">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
553
+ </tr>
554
+ </tbody>
555
+ </table>
556
+ </form>
557
+ </div>
558
+ </div>
559
+ </div>
560
+ <!-- Post blox -->
561
+
562
+ </div>
563
+ <div class="schema-notice">
564
+ <p>' . wp_kses_post( __( "Need some more schema types with automation to implement schema markup? Get the latest and premium schema markup plugin to automate the process of adding schema markup on your entire website. <br><a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=configure' target='_blank'> Know more about Schema Pro.</a>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
565
+ </div>
566
+ </div>
567
+ </div>
568
+ </div>
569
+
570
+
571
+ <div id="tab-5">
572
+ <div id="poststuff">
573
+ <div id="postbox-container-17" class="postbox-container">
574
+ <div class="meta-box-sortables ui-sortable bsf-even-even">
575
+ <div class="bsf-postbox">
576
+ <h3 class="bsf-hndle" style="margin-top:0;"><span>' . esc_html__( 'Welcome to All In One Schema Rich Snippets', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
577
+ <div class="inside">
578
+ <p>Thank you for choosing All-in-one Schema Rich Snippets - the most popular WordPress schema markup plugin!</p>
579
+
580
+ <p>All-in-one Schema Rich Snippets helps you add different schema content types to your site so that you can communicate precise information about your web pages to search engines and get rich snippets.</p>
581
+ <div class="bsf-xs-separator"></div>
582
+ <h3>Supported types of Schemas:</h3>
583
+ <ul class="schema-types">
584
+ <div class="schema-type-col-2">
585
+ <li>Review</li>
586
+ <li>Event</li>
587
+ <li>Services</li>
588
+ </div>
589
+ <div class="schema-type-col-2">
590
+ <li>Person</li>
591
+ <li>Product</li>
592
+ </div>
593
+ <div class="schema-type-col-2">
594
+ <li>Video</li>
595
+ <li>Articles</li>
596
+ </div>
597
+ <div class="schema-type-col-2">
598
+ <li>Recipe</li>
599
+ <li>Software Application</li>
600
+ </div>
601
+ </ul>
602
+ <div class="bsf-xs-separator"></div>
603
+ </div>
604
+ </div>
605
+ </div>
606
+ <div class="meta-box-sortables ui-sortable bsf-even-odd">
607
+ <h3 class="bsf-hndle"><span>' . esc_html__( 'How it works', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
608
+ <div class="inside">
609
+ <ol class="bsf-li-counter">
610
+ <li>' . esc_html__( 'Configure The Settings', 'all-in-one-schemaorg-rich-snippets' ) . '
611
+ <p>' . esc_html__( 'Go to the “Rich Snippets” option in your WordPress dashboard. Under the Configuration tab, select your desired schema type and update the strings you want to display on the front-end. You can use the Customization tab to manage how your rich snippet content box will look.', 'all-in-one-schemaorg-rich-snippets' ) . '</p></li>
612
+ <li>' . esc_html__( 'Add Markup To Pages', 'all-in-one-schemaorg-rich-snippets' ) . '<p>' . esc_html__( 'Edit the posts or pages where you wish to add rich snippets and scroll down to the “Configure Rich Snippet” meta box to add schema markup.', 'all-in-one-schemaorg-rich-snippets' ) . '</p></li>
613
+ <li>' . esc_html__( 'Test Your Rich Snippets', 'all-in-one-schemaorg-rich-snippets' ) . '<p>' . wp_kses_post( __( "Google Structured Data Testing is a widely used online tool to test structured data. Open the <a href='https://search.google.com/structured-data/testing-tool/u/0/' target='_blank'>Google Structured Testing Tool</a> and fetch your website URL to test the schema markup you’ve just implemented on your webpages.", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p></li>
614
+ </ol>
615
+ </div>
616
+ </div>
617
+ <div class="meta-box-sortables ui-sortable bsf-even-even">
618
+ <h3 class="bsf-hndle"><span>' . esc_html__( 'Want to Automate Your Schema Markup?', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
619
+ <div class="inside">
620
+ <h3>' . esc_html__( 'Consider Schema Pro', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
621
+ <p>' . wp_kses_post( __( 'Schema Pro is an advanced schema markup plugin that automates the process of adding schema markup on multiple pages with just a few clicks. Schema Pro uses JSON-LD markup, which is the latest technology recommended by Google. With it, you can kick those front-end content boxes to the curb and<b> get rich snippets without displaying any new human-readable content</b> on your site.', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
622
+ <h3></h3>
623
+ <div class="bsf-schema-desc">
624
+ <div class="bsf-schema-features-1">
625
+ <div class="bsf-schema-features-wrap">
626
+ <div class="bsf-schema-features-icon">
627
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/click.png' ) ) . '"/>
628
+ </div>
629
+ <div class="bsf-schema-features-cont">
630
+ <h3>Schema Markup Automation</h3>
631
+ <p>Schema Pro automates the process of adding schema markup on your website. Just configure your markup one time and you can easily apply it to hundreds or thousands of pages.</p>
632
+ </div>
633
+ </div>
634
+ </div>
635
+ <div class="bsf-schema-features-1">
636
+ <div class="bsf-schema-features-wrap">
637
+ <div class="bsf-schema-features-icon">
638
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/seo.png' ) ) . '"/>
639
+ </div>
640
+ <div class="bsf-schema-features-cont">
641
+ <h3>Complete Schema Implementation</h3>
642
+ <p>Schema Pro gives you the full benefits of schema markup with both organization level and content type schemas. Implement organization level markup site-wide and content type on specific pages.</p>
643
+ </div>
644
+ </div>
645
+ </div>
646
+ <div class="bsf-schema-features-1">
647
+ <div class="bsf-schema-features-wrap">
648
+ <div class="bsf-schema-features-icon">
649
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/website.png' ) ) . '"/>
650
+ </div>
651
+ <div class="bsf-schema-features-cont">
652
+ <h3>Advanced Targeting Rules</h3>
653
+ <p>Schema Pro lets you use pinpoint inclusion/exclusion rules to apply different schema content types on both a post type or individual post level.</p>
654
+ </div>
655
+ </div>
656
+ </div>
657
+ <div class="bsf-schema-features-1">
658
+ <div class="bsf-schema-features-wrap">
659
+ <div class="bsf-schema-features-icon">
660
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/custom.png' ) ) . '"/>
661
+ </div>
662
+ <div class="bsf-schema-features-cont">
663
+ <h3>Custom Field Support<h3>
664
+ <p>Schema Pro comes with all the necessary fields for each content type, as well as support for your own custom fields. It lets you map existing custom fields or create new ones to suit your needs.</p>
665
+ </div>
666
+ </div>
667
+ </div>
668
+ <div class="bsf-schema-features-1">
669
+ <div class="bsf-schema-features-wrap">
670
+ <div class="bsf-schema-features-icon">
671
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/quick.png' ) ) . '"/>
672
+ </div>
673
+ <div class="bsf-schema-features-cont">
674
+ <h3>Accuracy and Testing</h3>
675
+ <p>Schema Pro lets you implement accurate markup and analyse your schema implementation instantly so you can rest assured that you’ve implemented it right.</p>
676
+ </div>
677
+ </div>
678
+ </div>
679
+ <div class="bsf-schema-features-1">
680
+ <div class="bsf-schema-features-wrap">
681
+ <div class="bsf-schema-features-icon">
682
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/acf.png' ) ) . '"/>
683
+ </div>
684
+ <div class="bsf-schema-features-cont">
685
+ <h3>Compatibility with Yoast SEO, ACF, PODS </h3>
686
+ <p>Schema Pro is compatible with popular third-party plugins. It can inherit the settings from Yoast SEO and fetch custom fields that you&#39;ve created using the ACF or PODS plugins.</p>
687
+ </div>
688
+ </div>
689
+ </div>
690
+ </div>
691
+ </div>
692
+ </div>
693
+ <div class="meta-box-sortables ui-sortable bsf-even-odd">
694
+ <h3 class="bsf-hndle"><span>' . esc_html__( 'With Schema Pro, you can…', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
695
+ <div class="inside">
696
+ <ol class="bsf-li-counter">
697
+ <li>Automate schema markup for your entire website.</li>
698
+ <li>Implement schema markup faster and more accurately.</li>
699
+ <li>Target different post types with different Schema types.</li>
700
+ </ol>
701
+ </div>
702
+ </div>
703
+ <div class="meta-box-sortables ui-sortable bsf-even-even">
704
+ <h3 class="bsf-hndle"><span>' . esc_html__( 'Testimonials', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
705
+ <div class="inside">
706
+ <div class="bsf-schema">
707
+ <div class="bsf-testimonial-wrap">
708
+ <div class="bsf-schema-features-wrap">
709
+ <div class="bsf-schema-testimonial-icon">
710
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/adam-circle.jpg' ) ) . '"/>
711
+ </div>
712
+ <div class="bsf-schema-features-cont">
713
+ <p>I have used every Schema Plugin for WordPress over the last few years, hundreds of dollars invested, and Schema Pro blows them all out of the water. It’s the only schema plugin you need.</p>
714
+ <b>Adam Preiser,</b> <span>Founder of WPCrafter.com</span>
715
+ </div>
716
+ </div>
717
+ </div>
718
+ <div class="bsf-ls-separator"></div>
719
+ <div class="bsf-testimonial-wrap">
720
+ <div class="bsf-schema-features-wrap">
721
+ <div class="bsf-schema-testimonial-icon">
722
+ <img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/kylevan.png' ) ) . '"/>
723
+ </div>
724
+ <div class="bsf-schema-features-cont">
725
+ <p>Schema Pro has unlocked a powerful set of tools that produced results almost immediately. As a non-coder, a solution like this allows me to set up and stand out against the competition- and it couldn&#39;t be any easier to use!</p>
726
+ <b>Kyle Van Deusen,</b> <span> Owner at ogalweb.com</span>
727
+ </div>
728
+ </div>
729
+ </div>
730
+ </div>
731
+ </div>
732
+ </div>
733
+ <div class="meta-box-sortables ui-sortable bsf-even-odd testimonial-wraper">
734
+ <div class="inside">
735
+ <div class="bsf-schema">
736
+ <div class="bsf-schema-button-wrap">
737
+ <a href="https://wpschema.com/pricing/?utm_source=allinone&utm_campaign=repo&utm_medium=welcome" target="_blank" class="bsf-btn bsf-btn-lg btn-btn-purple">Get Schema Pro</a>
738
+ </div>
739
+ <div class="bsf-schema-button-wrap">
740
+ <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=welcome" target="_blank" class="bsf-btn bsf-btn-lg btn-btn-grey">See All Features</a>
741
+ </div>
742
+ </div>
743
+ </div>
744
+ </div>
745
+ </div>
746
+ </div>
747
+ </div>
748
+
749
+ <div id="tab-3">
750
+ <div id="poststuff">
751
+ <div id="postbox-container-5" class="postbox-container">
752
+ <div class="meta-box-sortables ui-sortable">
753
+ <div class="postbox closed">
754
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
755
+ <h3 class="hndle">' . esc_html__( 'Where can I test my schema markup implementation?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
756
+ <div class="inside">
757
+ <p>' . esc_html__( 'You can use the standard Google Structured Data Testing Tool to test your schema markup implementation. You can also take a look at the preview of how your search result might look.', 'all-in-one-schemaorg-rich-snippets' ) . ' <a href="http://www.google.com/webmasters/tools/richsnippets" target="_blank">Click Here.</a></p>
758
+ </div>
759
+ </div>
760
+ <div class="postbox closed">
761
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
762
+ <h3 class="hndle">' . esc_html__( 'Do I have to fill in all the details?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
763
+ <div class="inside">
764
+ <p>' . esc_html__( 'No. But, every schema type has some fields that HAVE to be filled as stated by Google. Therefore, it is recommended to fill these required fields in the schema markup you are implementing.', 'all-in-one-schemaorg-rich-snippets' ) . '</p>
765
+ </div>
766
+ </div>
767
+ <div class="postbox closed">
768
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
769
+ <h3 class="hndle">' . esc_html__( 'Why does the plugin create extra content in the frontend? Can I hide it?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
770
+ <div class="inside">
771
+ <p>We understand that you don&#39;t like the content that gets displayed on your page / post. However, as per the strong recommendation of Google, MicroData should be clearly visible to the user.</p>
772
+ <p>Here is a reference link of what Google says. <a href="https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display" target="_blank"> https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display</a></p>
773
+ <p> If you still do not want your schema markup to affect your frontend design, you can use <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=faq" target="_blank">Schema Pro</a> - our advanced Schema markup plugin that is built with the latest JSON- LD technology which does not require a content box to be displayed on the front-end.</p>
774
+ </div>
775
+ </div>
776
+ <div class="postbox closed">
777
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
778
+ <h3 class="hndle">' . esc_html__( 'Does the plugin work with other plugins like WordPress SEO, WooCommerce, etc?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
779
+ <div class="inside">
780
+ <p>Well, the plugin works perfectly with most of the other plugins as the only thing "All in One Schema.org Rich Snippets" does is - it gives you power to add Rich Snippets MicroData to your pages and posts easily. <br><br>If you come across a conflict with any other plugin, please do not hesitate to report an issue.</p>
781
+ </div>
782
+ </div>
783
+ <div class="postbox closed">
784
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
785
+ <h3 class="hndle">' . esc_html__( 'How long will it take to show up rich snippets for my search results?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
786
+ <div class="inside">
787
+ <p>We cannot assure the time it will take to display a rich snippet for your search results. This is completely dependent on when your website is crawled by the search engine. However, there are many more factors, such as your website authority that contribute to the time taken for your website to be crawled and a rich snippet displayed.</p>
788
+ <p>If rich snippets are not appearing in your search results as of yet, most probably they might start appearing as soon as Google or other search engines find your website more authoritative.</p>
789
+ <p>Meanwhile - you can validate and see the preview of your rich snippets on <a target="_blank" href="http://www.google.com/webmasters/tools/richsnippets">[ Google Structured Data Testing Tool ]</a> .</p>
790
+ </div>
791
+ </div>
792
+ <div class="postbox closed">
793
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
794
+ <h3 class="hndle">' . esc_html__( "I don't see the feature I want. How can I get it?", 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
795
+ <div class="inside">
796
+ <p>' . wp_kses_post( __( "<a href='https://wpschema.com/contact/' target='_blank'>Get in touch</a> with us to ask if this feature is in our development roadmap. If it is not in our roadmap, and if you still think this feature would make the plugin better, we have a couple of options for you:", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
797
+ <ol>
798
+ <li>' . esc_html__( 'Code the new feature if you are a developer and submit your code. If we include this feature in our releases, credits will be given to you.', 'all-in-one-schemaorg-rich-snippets' ) . '</li>
799
+ <li>' . esc_html__( 'Offer a sponsorship to get this feature done for all plugin users OR request a professional customisation service.', 'all-in-one-schemaorg-rich-snippets' ) . '</li>
800
+ </ol>
801
+ </div>
802
+ </div>
803
+ </div>
804
+ </div>
805
+ </div>
806
+ </div>
807
+ <!-- Tab 4-->
808
+ <div id="tab-4">
809
+ <div id="poststuff">
810
+ <div id="postbox-container-11" class="postbox-container">
811
+ <div class="meta-box-sortables ui-sortable">
812
+ <div class="postbox">
813
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
814
+ <h3 class="hndle">' . wp_kses_post( __( '<span>Customize the look and feel of rich snippet box</span>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</h3>
815
+ <div class="inside">
816
+ <form id="bsf_css_editor" method="post" onsubmit="return false;" action="">
817
+ ' . wp_nonce_field( 'snippet_color_form_action', 'snippet_color_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
818
+ . '
819
+ <table class="bsf_metabox">
820
+ <tr>
821
+ <th> <label for="snippet_box_bg"> ' . esc_html__( 'Box Background ', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
822
+ <td> <input type="text" name="snippet_box_bg" id="snippet_box_bg" value="' . esc_attr( stripslashes( $args_color['snippet_box_bg'] ) ) . '" class="snippet_box_bg" /> </td>
823
+ </tr>
824
+ <tr>
825
+ <th> <label for="snippet_title_bg"> ' . esc_html__( 'Title Background', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
826
+ <td> <input type="text" name="snippet_title_bg" id="snippet_title_bg" value="' . esc_attr( stripslashes( $args_color['snippet_title_bg'] ) ) . '" class="snippet_title_bg" /> </td>
827
+ </tr>
828
+ <tr>
829
+ <th> <label for="snippet_border"> ' . esc_html__( 'Border Color', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
830
+ <td> <input type="text" name="snippet_border" id="snippet_border" value="' . esc_attr( stripslashes( $args_color['snippet_border'] ) ) . '" class="snippet_border" /> </td>
831
+ </tr>
832
+ <tr>
833
+ <th> <label for="snippet_title_color"> ' . esc_html__( 'Title Color', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
834
+ <td> <input type="text" name="snippet_title_color" id="snippet_title_color" value="' . esc_attr( stripslashes( $args_color['snippet_title_color'] ) ) . '" class="snippet_title_color" /> </td>
835
+ </tr>
836
+ <tr>
837
+ <th> <label for="snippet_box_color"> ' . esc_html__( 'Snippet Text Color', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
838
+ <td> <input type="text" name="snippet_box_color" id="snippet_box_color" value="' . esc_attr( stripslashes( $args_color['snippet_box_color'] ) ) . '" class="snippet_box_color" /> </td>
839
+ </tr>
840
+ <tr>
841
+ <td></td>
842
+ <td><input id="submit_colors" class="button-primary" type="submit" value="Update Colors" />&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=color">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
843
+ </tr>
844
+ </table>
845
+ </form>
846
+ </div>
847
+ </div>
848
+ <div class="schema-notice">
849
+ <p>' . wp_kses_post( __( "Don&#39;t want to add a content box on the front-end? Get the latest and premium schema markup plugin that adds Google recommended JSON-LD structured data format without the content box. <a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=customize' target='_blank'> Know more about Schema Pro.</a>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
850
+ </div>
851
+ </div>
852
+ </div>
853
+ </div>
854
+ </div>
855
+ </div>
856
+
857
+ </div>
858
+ </div>
859
+ <div class="postbox-container" id="bsf-postbox-container-1" >
860
+ <div id="side-sortables" class="meta-box-sortables ui-sortable">
861
+ <div class="postbox bsf-woocommerce-setting closed">
862
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
863
+ <h3 class="get_in_touch">' . esc_html__( 'WooCommerce Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
864
+ <div class="inside">
865
+ <form id="bsf_css_editor" method="post" action="">
866
+ ' . wp_nonce_field( 'snippet_woocommerce_form_action', 'snippet_woocommerce_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
867
+ . '
868
+ <p> ' . esc_html__( 'WooCommerce comes with Schema.org code by default and using our plugin on WooCommerce product pages does will add duplicate schema so it is not recommended. If you could still like to enable our plugin on WooCommerce products, please enable this option.', 'all-in-one-schemaorg-rich-snippets' ) . ' </p>
869
+ <table class="bsf_metabox" > <input type="hidden" name="site_url" value="' . esc_url( site_url() ) . '" /> </p>
870
+ <tr>
871
+ <td>
872
+ <input type="checkbox" name="woocommerce_option" id="woocommerce_option" value="1" ' . esc_attr( $woo_setting ) . ' />
873
+ <label for="woocommerce_option">Enable schema on WooCommerce products</label>
874
+ </td>
875
+ </tr>
876
+ <tr>
877
+ <td>
878
+ <input style="margin-top:10px;" type="submit" class="button-primary" name="setting_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>
879
+ </td>
880
+ </tr>
881
+ </table>
882
+ </form>
883
+ </div>
884
+ </div>' . get_support( 1 ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
885
+ . '
886
+ </div>';
887
+ echo '
888
+ <script src="' . esc_url( plugin_dir_url( __FILE__ ) ) //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
889
+ . 'js/jquery.easytabs.min.js"></script>
890
+ <script src="' . esc_url( plugin_dir_url( __FILE__ ) ) //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
891
+ . 'js/jquery.hashchange.min.js"></script>
892
+ <script language="javascript">
893
+ jQuery("#tab-container").easytabs();
894
+ jQuery("#postbox-container-1").css({"width":"87%","padding-right":"2%"});
895
+ jQuery("#postbox-container-2").css("width","35%");
896
+ jQuery("#postbox-container-3").css({"width":"87%","padding-right":"2%"});
897
+ jQuery("#postbox-container-4").css("width","35%");
898
+ jQuery("#postbox-container-5").css({"width":"87%","padding-right":"2%"});
899
+ jQuery("#postbox-container-6").css("width","35%");
900
+ jQuery("#postbox-container-7").css("width","35%");
901
+ jQuery("#postbox-container-8").css("width","35%");
902
+ jQuery("#postbox-container-9").css("width","35%");
903
+ jQuery("#postbox-container-10").css("width","35%");
904
+ jQuery("#postbox-container-11").css({"width":"87%","padding-right":"2%"});
905
+ jQuery(".postbox h3").click( function() {
906
+ jQuery(jQuery(this).parent().get(0)).toggleClass("closed");
907
+ });
908
+ jQuery(".handlediv").click( function() {
909
+ jQuery(jQuery(this).parent().get(0)).toggleClass("closed");
910
+ });
911
+ </script>';
912
+ }
913
+ // Update options.
914
+ if ( isset( $_POST['setting_submit'] ) ) {
915
+ if ( ! isset( $_POST['snippet_woocommerce_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_woocommerce_nonce_field'], 'snippet_woocommerce_form_action' )
916
+ ) {
917
+ print 'Sorry, your nonce did not verify.';
918
+ exit;
919
+ } else {
920
+ $args = null;
921
+ if ( isset( $_POST['woocommerce_option'] ) ) {
922
+ $args = true;
923
+ } else {
924
+ $args = false;
925
+ }
926
+ update_option( 'bsf_woocom_init_setting', 'done' );
927
+ $status = update_option( 'bsf_woocom_setting', $args );
928
+ display_status( $status );
929
+ }
930
+ }
931
+ if ( isset( $_POST['item_submit'] ) ) {
932
+ if ( ! isset( $_POST['snippet_review_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_review_nonce_field'], 'snippet_review_form_action' )
933
+ ) {
934
+ print 'Sorry, your nonce did not verify.';
935
+ exit;
936
+ } else {
937
+ foreach ( array( 'review_title', 'item_reviewer', 'review_date', 'item_name', 'item_rating' ) as $option ) {
938
+ if ( isset( $_POST[ $option ] ) ) {
939
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
940
+ }
941
+ }
942
+ $status = update_option( 'bsf_review', $args );
943
+ display_status( $status );
944
+ }
945
+ }
946
+ if ( isset( $_POST['event_submit'] ) ) {
947
+ if ( ! isset( $_POST['snippet_event_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_event_nonce_field'], 'snippet_event_form_action' )
948
+ ) {
949
+ print 'Sorry, your nonce did not verify.';
950
+ exit;
951
+ } else {
952
+ foreach ( array( 'snippet_title', 'event_title', 'event_location', 'event_performer', 'start_time', 'end_time', 'event_desc', 'events_price' ) as $option ) {
953
+ if ( isset( $_POST[ $option ] ) ) {
954
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
955
+ }
956
+ }
957
+ $status = update_option( 'bsf_event', $args );
958
+ display_status( $status );
959
+ }
960
+ }
961
+ if ( isset( $_POST['person_submit'] ) ) {
962
+ if ( ! isset( $_POST['snippet_person_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_person_nonce_field'], 'snippet_person_form_action' )
963
+ ) {
964
+ print 'Sorry, your nonce did not verify.';
965
+ exit;
966
+ } else {
967
+ foreach ( array( 'snippet_title', 'person_name', 'person_nickname', 'person_job_title', 'person_website', 'person_company', 'person_address' ) as $option ) {
968
+ if ( isset( $_POST[ $option ] ) ) {
969
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
970
+ }
971
+ }
972
+ $status = update_option( 'bsf_person', $args );
973
+ display_status( $status );
974
+ }
975
+ }
976
+ if ( isset( $_POST['product_submit'] ) ) {
977
+ if ( ! isset( $_POST['snippet_product_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_product_nonce_field'], 'snippet_product_form_action' )
978
+ ) {
979
+ print 'Sorry, your nonce did not verify.';
980
+ exit;
981
+ } else {
982
+ foreach ( array( 'snippet_title', 'product_rating', 'product_brand', 'product_name', 'product_agr', 'product_price', 'product_avail' ) as $option ) {
983
+ if ( isset( $_POST[ $option ] ) ) {
984
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
985
+ }
986
+ }
987
+ $status = update_option( 'bsf_product', $args );
988
+ display_status( $status );
989
+ }
990
+ }
991
+ if ( isset( $_POST['recipe_submit'] ) ) {
992
+ if ( ! isset( $_POST['snippet_recipe_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_recipe_nonce_field'], 'snippet_recipe_form_action' )
993
+ ) {
994
+ print 'Sorry, your nonce did not verify.';
995
+ exit;
996
+ } else {
997
+ foreach ( array( 'snippet_title', 'recipe_name', 'author_name', 'recipe_pub', 'recipe_prep', 'recipe_cook', 'recipe_time', 'recipe_desc', 'recipe_rating' ) as $option ) {
998
+ if ( isset( $_POST[ $option ] ) ) {
999
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
1000
+ }
1001
+ }
1002
+ $status = update_option( 'bsf_recipe', $args );
1003
+ display_status( $status );
1004
+ }
1005
+ }
1006
+ if ( isset( $_POST['software_submit'] ) ) {
1007
+ if ( ! isset( $_POST['snippet_soft_app_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_soft_app_nonce_field'], 'snippet_soft_app_form_action' )
1008
+ ) {
1009
+ print 'Sorry, your nonce did not verify.';
1010
+ exit;
1011
+ } else {
1012
+ foreach ( array( 'snippet_title', 'software_rating', 'software_agr', 'software_price', 'software_name', 'software_os', 'software_website' ) as $option ) {
1013
+ if ( isset( $_POST[ $option ] ) ) {
1014
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
1015
+ }
1016
+ }
1017
+ $status = update_option( 'bsf_software', $args );
1018
+ display_status( $status );
1019
+ }
1020
+ }
1021
+ if ( isset( $_POST['video_submit'] ) ) {
1022
+ if ( ! isset( $_POST['snippet_video_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_video_nonce_field'], 'snippet_video_form_action' )
1023
+ ) {
1024
+ print 'Sorry, your nonce did not verify.';
1025
+ exit;
1026
+ } else {
1027
+ foreach ( array( 'snippet_title', 'video_title', 'video_desc', 'video_time', 'video_date' ) as $option ) {
1028
+ if ( isset( $_POST[ $option ] ) ) {
1029
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
1030
+ }
1031
+ }
1032
+ $status = update_option( 'bsf_video', $args );
1033
+ display_status( $status );
1034
+ }
1035
+ }
1036
+ if ( isset( $_POST['article_submit'] ) ) {
1037
+ if ( ! isset( $_POST['snippet_article_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_article_nonce_field'], 'snippet_article_form_action' )
1038
+ ) {
1039
+ print 'Sorry, your nonce did not verify.';
1040
+ exit;
1041
+ } else {
1042
+ foreach ( array( 'snippet_title', 'article_name', 'article_author', 'article_desc', 'article_image', 'article_publisher', 'article_publisher_logo' ) as $option ) {
1043
+ if ( isset( $_POST[ $option ] ) ) {
1044
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
1045
+ }
1046
+ }
1047
+ $status = update_option( 'bsf_article', $args );
1048
+ display_status( $status );
1049
+ }
1050
+ }
1051
+ if ( isset( $_POST['service_submit'] ) ) {
1052
+ if ( ! isset( $_POST['snippet_service_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_service_nonce_field'], 'snippet_service_form_action' )
1053
+ ) {
1054
+ print 'Sorry, your nonce did not verify.';
1055
+ exit;
1056
+ } else {
1057
+ foreach ( array( 'snippet_title', 'service_type', 'service_area', 'service_desc', 'service_provider_name', 'provider_location', 'service_rating', 'service_channel', 'service_url_link' ) as $option ) {
1058
+ if ( isset( $_POST[ $option ] ) ) {
1059
+ $args[ $option ] = esc_attr( $_POST[ $option ] );
1060
+ }
1061
+ }
1062
+ $status = update_option( 'bsf_service', $args );
1063
+ display_status( $status );
1064
+ }
1065
+ }
1066
+ /**
1067
+ * Display status.
1068
+ *
1069
+ * @param string $status .
1070
+ */
1071
+ function display_status( $status ) {
1072
+ if ( $status ) {
1073
+ echo '<div class="updated"><p>' . esc_html__( 'Success! Your changes were successfully saved!', 'all-in-one-schemaorg-rich-snippets' ) . '</p></div>';
1074
+ } else {
1075
+ echo '<div class="error"><p>' . esc_html__( 'Sorry, Your changes are not saved!', 'all-in-one-schemaorg-rich-snippets' ) . '</p></div>';
1076
+ }
1077
+ }
1078
+ if ( isset( $_GET['action'] ) ) {
1079
+ if ( 'reset' == esc_attr( $_GET['action'] ) ) {
1080
+ $option_to_reset = esc_attr( $_GET['options'] );
1081
+ if ( 'review' == $option_to_reset ) {
1082
+ delete_option( 'bsf_review' );
1083
+ }
1084
+ if ( 'event' == $option_to_reset ) {
1085
+ delete_option( 'bsf_event' );
1086
+ }
1087
+ if ( 'person' == $option_to_reset ) {
1088
+ delete_option( 'bsf_person' );
1089
+ }
1090
+
1091
+ if ( 'product' == $option_to_reset ) {
1092
+ delete_option( 'bsf_product' );
1093
+ }
1094
+ if ( 'recipe' == $option_to_reset ) {
1095
+ delete_option( 'bsf_recipe' );
1096
+ }
1097
+ if ( 'software' == $option_to_reset ) {
1098
+ delete_option( 'bsf_software' );
1099
+ }
1100
+ if ( 'video' == $option_to_reset ) {
1101
+ delete_option( 'bsf_video' );
1102
+ }
1103
+
1104
+ if ( 'article' == $option_to_reset ) {
1105
+ delete_option( 'bsf_article' );
1106
+ }
1107
+ if ( 'service' == $option_to_reset ) {
1108
+ delete_option( 'bsf_service' );
1109
+ }
1110
+
1111
+ if ( 'color' == $option_to_reset ) {
1112
+ delete_option( 'bsf_custom' );
1113
+ }
1114
+
1115
+ bsf_reset_options( $option_to_reset );
1116
+ }
1117
+ }
1118
+ /**
1119
+ * BSF reset option.
1120
+ *
1121
+ * @param string $option_to_reset .
1122
+ */
1123
+ function bsf_reset_options( $option_to_reset ) {
1124
+ require_once dirname( esc_html__FILEesc_html__ ) . '/../settings.php';
1125
+ if ( 'review' == $option_to_reset ) {
1126
+ add_review_option();
1127
+ }
1128
+ if ( 'event' == $option_to_reset ) {
1129
+ add_event_option();
1130
+ }
1131
+ if ( 'person' == $option_to_reset ) {
1132
+ add_person_option();
1133
+ }
1134
+ if ( 'product' == $option_to_reset ) {
1135
+ add_product_option();
1136
+ }
1137
+ if ( 'recipe' == $option_to_reset ) {
1138
+ add_recipe_option();
1139
+ }
1140
+ if ( 'software' == $option_to_reset ) {
1141
+ add_software_option();
1142
+ }
1143
+ if ( 'video' == $option_to_reset ) {
1144
+ add_video_option();
1145
+ }
1146
+ if ( 'article' == $option_to_reset ) {
1147
+ add_article_option();
1148
+ }
1149
+ if ( 'service' == $option_to_reset ) {
1150
+ add_service_option();
1151
+ }
1152
+ if ( 'color' == $option_to_reset ) {
1153
+ add_color_option();
1154
+ }
1155
+
1156
+ header( 'location:?page=rich_snippet_dashboard' );
1157
+ }
1158
+ /**
1159
+ * Add footer script.
1160
+ */
1161
+ function add_footer_script() {
1162
+ ?>
1163
+ <script type="text/javascript">
1164
+ jQuery("#submit_colors").click(function()
1165
+ {
1166
+ var data = jQuery("#bsf_css_editor").serialize();
1167
+ var form_data = "action=bsf_submit_color&" + data;
1168
+ //alert(form_data);
1169
+ jQuery.post(ajaxurl, form_data,
1170
+ function (response) {
1171
+ alert(response);
1172
+ }
1173
+ );
1174
+ });
1175
+ jQuery("#support_form").submit(function()
1176
+ {
1177
+ var data = jQuery("#support_form").serialize();
1178
+ var form_data = "action=bsf_submit_request&" + data;
1179
+ // alert(form_data);
1180
+ jQuery.post(ajaxurl, form_data,
1181
+ function (response) {
1182
+ alert(response);
1183
+ jQuery("#support_form .bsf_text_medium, #support_form .bsf_textarea_small").val("");
1184
+ }
1185
+ );
1186
+ });
1187
+ </script>
1188
+ <?php }
1189
+ /**
1190
+ * Get support.
1191
+ */
1192
+ function get_support() {
1193
+
1194
+ $html = '
1195
+ <div class="postbox bsf-contact closed">
1196
+ <button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
1197
+ <h3 class="get_in_touch">' . esc_html__( 'Get in touch with the Plugin Developers', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
1198
+ <div class="inside">
1199
+ <form name="support" id="support_form" action="" method="post" onsubmit="return false;">'
1200
+ . wp_nonce_field( 'aiosrs_support_form', 'aiosrs_support_form_nonce' ) . '
1201
+ <p> ' . esc_html__( 'Just fill out the form below and your message will be emailed to the Plugin Developers.', 'all-in-one-schemaorg-rich-snippets' ) . ' </p>
1202
+ <table class="bsf_metabox" > <input type="hidden" name="site_url" value="' . site_url() . '" /> </p>
1203
+ <tr><td><label for="name"><strong>' . esc_html__( 'Your Name:', 'all-in-one-schemaorg-rich-snippets' ) . '<span style="color:red;"> *</span></strong> </label></td>
1204
+ <td><input required="required" type="text" class="bsf_text_medium" name="name" /></td></tr>
1205
+ <tr><td><label for="email"><strong>' . esc_html__( 'Your Email:', 'all-in-one-schemaorg-rich-snippets' ) . '<span style="color:red;"> *</span></strong> </label></td>
1206
+ <td><input required="required" type="text" class="bsf_text_medium" name="email" /></td></tr>
1207
+ <tr><td><label for="post_url"><strong>' . esc_html__( 'Reference URL:', 'all-in-one-schemaorg-rich-snippets' ) . '<span style="color:red;"> *</span></strong> </label></td>
1208
+ <td><input required="required" type="text" class="bsf_text_medium" name="post_url" /></td></tr>
1209
+ <tr><td><label for="subject"><strong>' . esc_html__( 'Subject:', 'all-in-one-schemaorg-rich-snippets' ) . '</strong> </label></td>
1210
+ <td>
1211
+ <select class="select_full" name="subject">
1212
+ <option value="question"> I have a question </option>
1213
+ <option value="bug"> I found a bug </option>
1214
+ <option value="help"> I need help </option>
1215
+ <option value="professional"> I need professional service </option>
1216
+ <option value="contribute"> I want to contribute my code</option>
1217
+ <option value="other"> Other </option>
1218
+ </select>
1219
+ </td><td></td></tr>
1220
+ <tr><td class="bsf_label"><label for="message"><strong>' . esc_html__( 'Your Query in Brief:', 'all-in-one-schemaorg-rich-snippets' ) . '</strong> </label></td>
1221
+ <td rowspan="4"><textarea class="bsf_textarea_small" name="message" required></textarea> </td></tr>
1222
+ <tr></tr> <tr></tr> <tr></tr>
1223
+ <tr><td></td>
1224
+ <td><input id="submit_request" class="button-primary" type="submit" value="Submit Request" /> <span id="status"></span></td></tr>
1225
+ </table>
1226
+ </form>
1227
+ </div>
1228
+ </div>
1229
+ </div>
1230
+ </div>
1231
+ </div>
1232
+ ';
1233
+ return $html;
1234
+ }
1235
+ ?>
css/style.css CHANGED
@@ -101,6 +101,7 @@
101
  margin: -2px 2px;
102
  border: none !important;
103
  padding: 0 !important;
 
104
  }
105
  .rating-count {
106
  font-weight:bold;
101
  margin: -2px 2px;
102
  border: none !important;
103
  padding: 0 !important;
104
+ display: inline-block;
105
  }
106
  .rating-count {
107
  font-weight:bold;
functions.php CHANGED
@@ -1,1337 +1,1352 @@
1
- <?php
2
- /**
3
- * Template Name: Plugin Functions
4
- *
5
- */
6
- //add_filter( 'bsf_meta_boxes', 'bsf_review_metaboxes' );
7
- /**
8
- * Define the metabox and field configurations.
9
- *
10
- * @param array $meta_boxes
11
- * @return array
12
- */
13
- add_action( 'init', 'bsf_initialize_bsf_meta_boxes', 9999 );
14
- // Register an action for submitting rating
15
- add_action( 'wp_ajax_nopriv_bsf_submit_rating', 'bsf_add_rating' );
16
- add_action( 'wp_ajax_bsf_submit_rating', 'bsf_add_rating' );
17
- // Register an action for updating rating
18
- add_action( 'wp_ajax_nopriv_bsf_update_rating', 'bsf_update_rating' );
19
- add_action( 'wp_ajax_bsf_update_rating', 'bsf_update_rating' );
20
- // Include the Ajax library on the front end
21
- add_action( 'wp_head', 'add_ajax_library' );
22
- /**
23
- * Initialize the metabox class.
24
- */
25
- /* FUNCTION to check for posts having snippets */
26
- add_action( 'wp','aiosrs_check_snippet_existence' );
27
- function aiosrs_check_snippet_existence(){
28
- global $post;
29
-
30
- if( !isset( $post->ID ) ) {
31
- return;
32
- }
33
-
34
- $type = get_post_meta($post->ID, '_bsf_post_type', true);
35
- if($type){
36
- add_action('wp_enqueue_scripts', 'aiosrs_enque');
37
- }
38
-
39
- }
40
- function aiosrs_enque( ) {
41
- wp_enqueue_style('rating_style', plugin_dir_url(__FILE__) . 'css/jquery.rating.css');
42
- wp_enqueue_script('jquery_rating', plugin_dir_url(__FILE__) . 'js/jquery.rating.min.js', array('jquery'));
43
- wp_register_style( 'bsf_style', plugins_url('/css/style.css', __FILE__) );
44
- wp_enqueue_style('bsf_style');
45
- }
46
-
47
- function bsf_initialize_bsf_meta_boxes() {
48
- if ( ! class_exists( 'bsf_Meta_Box' ) )
49
- require_once plugin_dir_path( __FILE__ ).'init.php';
50
- }
51
- //Function to display the rich snippet output below the content
52
- function display_rich_snippet($content) {
53
- global $post;
54
-
55
- $args_color = get_option('bsf_custom');
56
- $id = $post->ID;
57
- $type = get_post_meta($id, '_bsf_post_type', true);
58
-
59
- if($type == '1')
60
- {
61
- global $post;
62
-
63
- $args_review = get_option('bsf_review');
64
-
65
- $review = '';
66
- $review .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr($args_color["snippet_box_bg"] ).'; color:'.esc_attr($args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr($args_color["snippet_border"] ).';">';
67
-
68
- if($args_review['review_title'] != "")
69
- $review .= '<div class="snippet-title" style="background:'.esc_attr($args_color["snippet_title_bg"] ).'; color:'.esc_attr($args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr($args_color["snippet_border"] ).';">'.esc_attr(stripslashes( $args_review['review_title'] ) ).'</div>';
70
- $review .= '<div class="snippet-markup" itemscope itemtype="http://schema.org/Review">';
71
- $item = get_post_meta( $post->ID, '_bsf_item_name', true );
72
- $item_review_type = get_post_meta( $post->ID, '_bsf_item_review_type', true );
73
- $item_event_name = get_post_meta( $post->ID, '_bsf_item_event_name', true );
74
- $item_event_start_date = get_post_meta( $post->ID, '_bsf_item_event_start_date', true );
75
- $item_event_org = get_post_meta( $post->ID, '_bsf_item_event_organization', true );
76
- $item_event_street = get_post_meta( $post->ID, '_bsf_item_event_street', true );
77
- $item_event_local = get_post_meta( $post->ID, '_bsf_item_event_local', true );
78
- $item_event_region = get_post_meta( $post->ID, '_bsf_item_event_region', true );
79
- $item_event_postal_code = get_post_meta( $post->ID, '_bsf_item_event_postal_code', true );
80
- $item_pro_name = get_post_meta( $post->ID, '_bsf_item_pro_name', true );
81
- $item_pro_price = get_post_meta( $post->ID, '_bsf_item_pro_price', true );
82
- $item_pro_cur = get_post_meta( $post->ID, '_bsf_item_pro_cur', true );
83
- $item_pro_status = get_post_meta( $post->ID, '_bsf_item_pro_status', true );
84
- $item_recp_name = get_post_meta( $post->ID, '_bsf_item_recipes_name', true );
85
- $item_recp_photo = get_post_meta( $post->ID, '_bsf_item_recipes_photo', true );
86
- $item_soft_name = get_post_meta( $post->ID, '_bsf_item_soft_name', true );
87
- $item_os_name = get_post_meta( $post->ID, '_bsf_item_os_name', true );
88
- $item_app_name = get_post_meta( $post->ID, '_bsf_item_app_name', true );
89
- $item_video_title = get_post_meta( $post->ID, '_bsf_item_video_title', true );
90
- $item_video_desc = get_post_meta( $post->ID, '_bsf_item_video_desc', true );
91
- $item_video_thumb = get_post_meta( $post->ID, '_bsf_item_video_thumb', true );
92
- $item_video_date = get_post_meta( $post->ID, '_bsf_item_video_date', true );
93
- $rating = get_post_meta( $post->ID, '_bsf_rating', true );
94
- $reviewer = get_post_meta( $post->ID, '_bsf_item_reviewer', true);
95
- $post_date = get_the_date('Y-m-d');
96
-
97
- if('item_recipe' == $item_review_type ){
98
- $review .= '<div class="snippet-image"><img width="180" src="'.esc_url( $item_recp_photo ).'" alt="recipe image"/></div>';
99
- $review .= '<div class="aio-info">';
100
- }
101
- if('item_video' == $item_review_type){
102
- $review .= '<div class="snippet-image"><img width="180" src="'.esc_url( $item_video_thumb ).'" alt="Video Image"/></div>';
103
- $review .= '<div class="aio-info">';
104
- }
105
- if(trim($reviewer) != "")
106
- {
107
- if($args_review['item_reviewer'] != "")
108
- $review .= '<span itemprop="author" itemscope itemtype="http://schema.org/Person">';
109
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $args_review['item_reviewer'] ) )."</div>";
110
- $review .= " <div class='snippet-data'><span itemprop='name'>".esc_attr( stripslashes( $reviewer ) )."</span></div></span>";
111
- }
112
- if(isset($args_review['review_date']))
113
- {
114
- if( $args_review['review_date'] != "")
115
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $args_review['review_date'] ) ) ."</div>";
116
- $review .= "<div class='snippet-data'> <time itemprop='datePublished' datetime='".get_the_time( 'c' )."'>".esc_attr( $post_date )."</time></div>";
117
- }
118
- if(trim($item) != "")
119
- {
120
- if( $args_review['item_name'] != "")
121
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $args_review['item_name'] ) )."</div>";
122
- $review .= "<div class='snippet-data'> <span itemprop='name'>".esc_attr($item )."</span></div>";
123
- }
124
- if(trim($rating) != "")
125
- {
126
- if( $args_review['item_rating'] != "")
127
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $args_review['item_rating'] ) )."</div>";
128
- $review .= "<div class='snippet-data'> <span itemprop='reviewRating' itemscope itemtype='http://schema.org/Rating'><span class='rating-value' itemprop='ratingValue'>".esc_attr( $rating )."</span></span><span class='star-img'>";
129
- for($i = 1; $i<=ceil($rating); $i++)
130
- {
131
- $review .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png" alt="1star">';
132
- }
133
- for($j = 0; $j<=5-ceil($rating); $j++)
134
- {
135
- if($j)
136
- $review .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png" alt="gray">';
137
- }
138
- $review .= '</span></div>';
139
- }
140
- if(trim($item_review_type) != "")
141
- {
142
- if('item_event' == $item_review_type){
143
- $item_event = get_option('bsf_event');
144
- $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Event">';
145
- if(trim($item_event_name) != ""){
146
- if( $item_event['event_title'] != "")
147
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_event['event_title'] ) )."</div>";
148
- $review .= " <div class='snippet-data'><span itemprop='name'>".esc_attr( stripslashes( $item_event_name ) )."</span></div>";
149
- }
150
- if(trim($item_event_start_date) != ""){
151
- if($item_event['start_time'] != "")
152
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_event['start_time'] ) )."</div>";
153
- $review .= " <div class='snippet-data'><span itemprop='startDate' datetime='".esc_attr( $item_event_start_date )."T00:00-00:00'>".esc_attr( $item_event_start_date )."</span></div>";
154
- }
155
- if(trim($item_event_org != "")){
156
- if( $item_event['event_location'] != "")
157
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_event['event_location'] ) )."</div>";
158
- $review .= " <div class='snippet-data'><span itemprop='location' itemscope itemtype='http://schema.org/Place'><span itemprop='name'>".esc_attr( stripslashes( $item_event_org ) )."</span>,";
159
- if(trim($item_event_street) != "")
160
- $review .= '<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
161
- <span itemprop="streetAddress">'.esc_attr( $item_event_street ).'</span>,';
162
- if(trim($item_event_local) != "")
163
- $review .= '<span itemprop="addressLocality">'.esc_attr( $item_event_local ).'</span>,';
164
- if(trim($item_event_region) != "")
165
- $review .= '<span itemprop="addressRegion">'.esc_attr( $item_event_region ).'</span>';
166
- if(trim($item_event_postal_code) != "")
167
- $review .= '-<span itemprop="postalCode">'.esc_attr( $item_event_postal_code ).'</span>';
168
- $review .= '</span>';
169
- $review .="</span></div>";
170
- }
171
- $review .= "</span>";
172
- }
173
- if('item_product' == $item_review_type){
174
- $item_product = get_option('bsf_product');
175
- if(trim($item_pro_status) == "out_of_stock"){
176
- $item_pro_status = 'OutOfStock';
177
- $availability = "Out of Stock";
178
- }
179
- else if(trim($item_pro_status) == "in_stock"){
180
- $item_pro_status = 'InStock';
181
- $availability = "Available in Stock";
182
- }
183
- else if(trim($item_pro_status) == "instore_only"){
184
- $item_pro_status = 'InStoreOnly';
185
- $availability = "Available in Store Only";
186
- }
187
- else if(trim($item_pro_status) == "preorder"){
188
- $availability = "Pre-Order Only";
189
- }
190
- $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Product">';
191
- if(trim($item_pro_name) != ""){
192
- if( $item_product['product_name'] != "")
193
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_product['product_name'] ) )."</div>";
194
- $review .= " <div class='snippet-data'><span itemprop='name'>".esc_attr( stripslashes( $item_pro_name ) )."</span></div>";
195
- }
196
- if(trim($item_pro_price) != ""){
197
-
198
- if($item_product['product_price'] != "")
199
- $review .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><div class="snippet-label">'.esc_attr( stripslashes( $item_product['product_price'] ) ).'</div>';
200
- $review .= '<div class="snippet-data">
201
- <span itemprop="priceCurrency">'.esc_attr( $item_pro_cur ).'</span><span itemprop="price">'.' '.esc_attr( $item_pro_price ).'</span></div>';
202
-
203
- if(trim($item_pro_status) != "")
204
- {
205
- if($item_product['product_avail'] != "")
206
- $review .= '<div class="snippet-label">'.esc_attr( stripslashes( $item_product['product_avail'] ) ).'</div>';
207
- $review .= ' <div class="snippet-data"> <span itemprop="availability" content="'.esc_attr( $item_pro_status ).'">'.esc_attr( $availability ).'</span></span></div>';
208
- }
209
- $review .= '</div>';
210
- }
211
- $review .= "</span>";
212
- }
213
- if('item_recipe' == $item_review_type){
214
- $item_recipe = get_option('bsf_recipe');
215
- $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Recipe">';
216
- if(trim($item_recp_name) != ""){
217
- if( $item_recipe['recipe_name'] != "")
218
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_recipe['recipe_name'] ) )."</div>";
219
- $review .= " <div class='snippet-data'><span itemprop='name'>".esc_attr( stripslashes( $item_recp_name ) )."</span></div>";
220
- }
221
- if(trim($item_recp_photo) != ""){
222
- $review .= '<meta itemprop="image" content="'.esc_attr( $item_recp_photo ).'">';
223
- }
224
- $review .= "</span></div>";
225
- }
226
- if('item_software' == $item_review_type){
227
- $item_soft = get_option('bsf_software');
228
- $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/SoftwareApplication">';
229
- if( trim( $item_soft_name ) != "" ){
230
- if( $item_soft['software_name'] != "")
231
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_soft['software_name'] ) )."</div>";
232
- $review .= " <div class='snippet-data'><span itemprop='name'>".esc_attr( stripslashes( $item_soft_name ) )."</span></div>";
233
- }
234
- if( trim( $item_os_name ) != "" ){
235
- if( $item_soft['software_name'] )
236
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_soft['software_name'] ) )."</div>";
237
- $review .= " <div class='snippet-data'><span itemprop='operatingSystem'>".esc_attr( stripslashes( $item_os_name ) )."</span></div>";
238
- }
239
- if( trim( $item_app_name ) != "" ){
240
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( 'Software Category' ) )."</div>";
241
- $review .= " <div class='snippet-data'><span itemprop='applicationCategory'>".esc_attr( stripslashes( $item_app_name ) )."</span></div>";
242
- }
243
- $review .= "</span>";
244
- }
245
- if('item_video' == $item_review_type){
246
- $item_video = get_option('bsf_video');
247
- $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/VideoObject">';
248
- if( trim ( $item_video_title ) != "" ){
249
- if( $item_video['video_title'] != "")
250
- $review .= "<div class='snippet-label'>".esc_attr(stripslashes( $item_video['video_title'] ) )."</div>";
251
- $review .= " <div class='snippet-data'><span itemprop='name'>".esc_attr( stripslashes( $item_video_title ) )."</span></div><div class='snippet-clear'></div>";
252
- }
253
- if(trim( $item_video_desc ) != "" ){
254
- if($item_video['video_desc'] != "" )
255
- $review .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $item_video['video_desc'] ) ).'</div>';
256
- $review .= '<div class="snippet-data-img"><span itemprop="description">'.esc_attr( htmlspecialchars_decode( $item_video_desc ) ).'</span></div>';
257
- }
258
- if(trim( $item_video_date ) != "" ){
259
- if($item_video['video_date'] != "" )
260
- $review .= '<div class="snippet-label">'.esc_attr( stripslashes( $item_video['video_date'] ) ).'</div>';
261
- $review .= "<div class='snippet-data'><span itemprop='uploadDate'>".esc_attr( stripslashes( $item_video_date ) )."</span></div>";
262
- }
263
- if(trim($item_video_thumb) != ""){
264
- $review .= '<meta itemprop="thumbnailUrl" content="'.esc_attr( $item_video_thumb ).'">';
265
- }
266
- $review .= "</span></div>";
267
- }
268
- }
269
- $review .= "</div>
270
- </div><div style='clear:both;'></div>";
271
-
272
- return ( is_single() || is_page() ) ? $content.$review : $content;
273
- }
274
- else if($type == '2')
275
- {
276
- global $post;
277
- $args_event = get_option('bsf_event');
278
-
279
- $event = '';
280
-
281
- $event .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
282
-
283
- if($args_event['snippet_title'] != "")
284
- $event .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_event['snippet_title'] ) ).'</div>';
285
- $event .= '<div itemscope itemtype="http://schema.org/Event">';
286
- $event_title = get_post_meta( $post->ID, '_bsf_event_title', true );
287
- $event_org = get_post_meta( $post->ID, '_bsf_event_organization', true );
288
- $event_street = get_post_meta( $post->ID, '_bsf_event_street', true );
289
- $event_local = get_post_meta( $post->ID, '_bsf_event_local', true );
290
- $event_region = get_post_meta( $post->ID, '_bsf_event_region', true );
291
- $event_postal_code = get_post_meta( $post->ID, '_bsf_event_postal_code', true );
292
- $event_image = get_post_meta($post->ID, '_bsf_event_image', true);
293
- //$event_performer = get_post_meta( $post->ID, '_bsf_event_performer', true );
294
- $event_start_date = get_post_meta( $post->ID, '_bsf_event_start_date', true );
295
- $event_end_date = get_post_meta( $post->ID, '_bsf_event_end_date', true );
296
- $event_description = get_post_meta( $post->ID, '_bsf_event_desc', true );
297
- $event_ticket_url = get_post_meta( $post->ID, '_bsf_event_ticket_url', true );
298
- $event_price = get_post_meta( $post->ID, '_bsf_event_price', true );
299
- $event_cur = get_post_meta( $post->ID, '_bsf_event_cur', true );
300
-
301
- if(trim($event_image) != "")
302
- {
303
- $event .= '<div class="snippet-image"><img width="180" src="'.esc_url( $event_image ).'" itemprop="image" alt="event" /></div>';
304
- }
305
- else
306
- {
307
- $event .= '<script type="text/javascript">
308
- jQuery(document).ready(function() {
309
- jQuery(".snippet-label-img").addClass("snippet-clear");
310
- });
311
- </script>';
312
- }
313
- $event .= '<div class="aio-info">';
314
-
315
- if(trim($event_title) != "")
316
- {
317
- if( $args_event['event_title'])
318
- $event .= '<div class="snippet-label-img">'.esc_attr(stripslashes( $args_event['event_title']) ).'</div>';
319
- $event .=' <div class="snippet-data-img">​<span itemprop="name">'.esc_attr( $event_title ).'</span></div>
320
- <meta itemprop="url" content="'.esc_attr( $event_ticket_url ).'">
321
- <div class="snippet-clear"></div>';
322
- }
323
- if(trim($event_org) != "")
324
- {
325
- if( $args_event['event_location'] != "")
326
- $event .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_event['event_location'] ) ).'</div>';
327
- $event .=' <div class="snippet-data-img">
328
- ​<span itemprop="location" itemscope itemtype="http://schema.org/Place">
329
- <span itemprop="name">'.esc_attr( $event_org ).'</span>,';
330
- }
331
- if(trim($event_street) != "")
332
- $event .= '<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
333
- <span itemprop="streetAddress">'.esc_attr( $event_street ).'</span>,';
334
- if(trim($event_local) != "")
335
- $event .= '<span itemprop="addressLocality">'.esc_attr( $event_local ).'</span>,';
336
- if(trim($event_region) != "")
337
- $event .= '<span itemprop="addressRegion">'.esc_attr( $event_region ).'</span>';
338
- if(trim($event_postal_code) != "")
339
- $event .= '-<span itemprop="postalCode">'.esc_attr( $event_postal_code ).'</span>';
340
- $event .= '</span>';
341
-
342
- $event .='</span>
343
- </div><div class="snippet-clear"></div>';
344
-
345
- if(trim($event_start_date) != "")
346
- {
347
- if( $args_event['start_time'] != "")
348
- $event .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_event['start_time'] ) ).'</div>';
349
-
350
- $event .= ' <div class="snippet-data-img"> <span itemprop="startDate" datetime="'.esc_attr( $event_start_date ).'T00:00-00:00">'.esc_attr( $event_start_date ).'</span></div><div class="snippet-clear"></div>';
351
- }
352
- if(trim($event_end_date) != "")
353
- {
354
- if( $args_event['end_time'] != "")
355
- $event .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_event['end_time'] ) ).'</div>';
356
- $event .= ' <div class="snippet-data-img"> <span itemprop="endDate" datetime="'.esc_attr( $event_end_date ).'T00:00-00:00">'.esc_attr( $event_end_date ).'</span></div><div class="snippet-clear"></div>';
357
- }
358
- if(trim($event_description) != "")
359
- {
360
- if( $args_event['event_desc'] != "")
361
- $event .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_event['event_desc'] ) ).'</div>';
362
- $event .= ' <div class="snippet-data-img"> <span itemprop="description">'.esc_attr( htmlspecialchars_decode( $event_description ) ).'</span></div><div class="snippet-clear"></div>';
363
- }
364
-
365
- if(trim($event_price) != "")
366
- {
367
- if($args_event['events_price'] != "")
368
- $event .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_event['events_price'] ) ).'</div>';
369
- $event .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
370
- <span itemprop="priceCurrency">'.esc_attr( $event_cur ).'</span><span itemprop="price">'.' '.esc_attr( $event_price ).'</span><br><a itemprop="url" href="'.esc_url( $event_ticket_url ).'">Buy Tickets</a></div><div class="snippet-clear"></div>';
371
- }
372
-
373
- $event .= '</div>
374
- </div></div>
375
- <meta itemprop="description" content="Event">
376
- <div class="snippet-clear"></div>';
377
-
378
- return ( is_single() || is_page() ) ? $content.$event : $content;
379
- }
380
- else if($type == '4')
381
- {
382
- global $post;
383
- $organization = '';
384
- $organization .= '<div class="snippet-title">Organization Brief :</div>';
385
- $organization .= '<div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Organization">';
386
- $org_name = get_post_meta( $post->ID,'_bsf_organization_name', true );
387
- $org_url = get_post_meta( $post->ID,'_bsf_organization_url', true );
388
- $org_tel = get_post_meta( $post->ID,'_bsf_organization_tel', true );
389
- $org_street = get_post_meta( $post->ID,'_bsf_organization_street', true );
390
- $org_local = get_post_meta( $post->ID,'_bsf_organization_local', true );
391
- $org_region = get_post_meta( $post->ID,'_bsf_organization_region', true );
392
- $org_zip = get_post_meta( $post->ID,'_bsf_organization_zip', true );
393
- $org_country = get_post_meta( $post->ID,'_bsf_organization_country', true );
394
- $org_latitude = get_post_meta( $post->ID,'_bsf_organization_latitude', true );
395
- $org_longitude = get_post_meta( $post->ID,'_bsf_organization_longitude', true );
396
- if(trim($org_name) != "")
397
- $organization .= 'Organization Name : <span property="v:name">'.esc_attr( $org_nam ).'</span></div>';
398
- if(trim($org_url) != "")
399
- $organization .= 'Website : <a href="'.esc_url( $org_url ).'" rel="v:url">'.esc_attr( $org_url ).'</a></div>';
400
- if(trim($org_tel) != "")
401
- $organization .= 'Telephone No. : <span property="v:tel">'.esc_attr( $org_tel ).'</span></div>';
402
- if(trim($org_street) != "")
403
- $organization .= 'Address :
404
- <span rel="v:address">
405
- <span typeof="v:Address">
406
- <span property="v:street-address">'.esc_attr( $org_street ).'</span>';
407
- if(trim($org_local) != "")
408
- $organization .= '<span property="v:locality">'.esc_attr( $org_local ).'</span>';
409
- if(trim($org_region) != "")
410
- $organization .= '<span property="v:region">'.esc_attr( $org_region ).'</span>';
411
- if(trim($org_zip) != "")
412
- $organization .= '<span property="v:postal-code">'.esc_attr( $org_zip ).'</span>';
413
- if(trim($org_country) != "")
414
- $organization .= '<span property="v:country-name">'.esc_attr( $org_country ).'</span>
415
- </span>
416
- </span>';
417
- if(trim($org_latitude) != "")
418
- $organization .= 'GEO Location :
419
- <span rel="v:geo">
420
- <span typeof="v:Geo">
421
- <span property="v:latitude" content="'.esc_attr( $org_latitude ).'">'.esc_attr( $org_latitude ).'</span> - ';
422
- if(trim($org_longitude) != "")
423
- $organization .= '<span property="v:longitude" content="'.esc_attr( $org_longitude ).'">'.esc_attr( $org_longitude ).'</span>
424
- </span>
425
- </span>';
426
- $organization .= '</div><div style="clear:both;"></div>';
427
-
428
- return ( is_single() || is_page() ) ? $content.$organization : $content;
429
- }
430
- else if($type == '5')
431
- {
432
- global $post;
433
-
434
- $args_person = get_option('bsf_person');
435
-
436
- $people = '';
437
-
438
- $people .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
439
-
440
- if($args_person['snippet_title'] != "")
441
- $people .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_person['snippet_title'] ) ).'</div>';
442
- $people .= '<div itemscope itemtype="http://schema.org/Person"">';
443
- $people_fn = get_post_meta( $post->ID, '_bsf_people_fn', true );
444
- $people_nickname = get_post_meta( $post->ID, '_bsf_people_nickname', true );
445
- $people_photo = get_post_meta( $post->ID, '_bsf_people_photo', true );
446
- $people_job_title = get_post_meta( $post->ID, '_bsf_people_job_title', true );
447
- $people_website = get_post_meta( $post->ID, '_bsf_people_website', true );
448
- $people_company = get_post_meta( $post->ID, '_bsf_people_company', true );
449
- $people_local = get_post_meta( $post->ID, '_bsf_people_local', true );
450
- $people_region = get_post_meta( $post->ID, '_bsf_people_region', true );
451
-
452
- $people_street = get_post_meta( $post->ID, '_bsf_people_street', true );
453
- $people_postal = get_post_meta( $post->ID, '_bsf_people_postal', true );
454
-
455
- if(trim($people_photo) != "")
456
- {
457
- $people .= '<div class="snippet-image"><img width="180" src="'.esc_url( $people_photo ).'" itemprop="image" alt="Photo of'.esc_attr( $people_fn ).'" /></div>';
458
- }
459
- else
460
- {
461
- $people .= '<script type="text/javascript">
462
- jQuery(document).ready(function() {
463
- jQuery(".snippet-label-img").addClass("snippet-clear");
464
- });
465
- </script>';
466
- }
467
- $people .= '<div class="aio-info">';
468
- if(trim($people_fn) != "")
469
- {
470
- if($args_person['person_name'] != "")
471
- $people .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_person['person_name'] ) ).'</div> ';
472
-
473
- $people .= '<div class="snippet-data-img"><span itemprop="name">'.esc_attr( $people_fn ).'</span></div><div class="snippet-clear"></div>';
474
- }
475
- if(trim($people_nickname) != "")
476
- {
477
- if($args_person['person_nickname'] != "")
478
- $people .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_person['person_nickname'] ) ).'</div> ';
479
- $people .= '<div class="snippet-data-img"> (<span itemprop="additionalName">'.esc_attr( $people_nickname ).'</span>)</div><div class="snippet-clear"></div>';
480
- }
481
- if(trim($people_website) != "")
482
- {
483
- if($args_person['person_website'] != "")
484
- $people .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_person['person_website'] ) ).'</div> ';
485
- $people .= '<div class="snippet-data-img"> <a href="'.esc_url( $people_website ).'" itemprop="url">'.esc_attr( $people_website ).'</a></div><div class="snippet-clear"></div>';
486
- }
487
- if(trim($people_job_title) != "")
488
- {
489
- if($args_person['person_job_title'] != "")
490
- $people .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_person['person_job_title'] ) ).'</div> ';
491
- $people .= '<div class="snippet-data-img"> <span itemprop="jobTitle">'.esc_attr( $people_job_title ).'</span></div><div class="snippet-clear"></div>';
492
- }
493
- if(trim($people_company) != "")
494
- {
495
- if($args_person['person_company'] != "")
496
- $people .= '<div itemprop="affiliation" itemscope itemtype="http://schema.org/Organization">';
497
- $people .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_person['person_company'] ) ).'</div> ';
498
- $people .= '<div class="snippet-data-img"> <span itemprop="name">'.esc_attr( $people_company ).'</span></div><div class="snippet-clear"></div>';
499
- $people .= '</div>';
500
- }
501
-
502
- if(trim($people_street) != "")
503
- {
504
- if($args_person['person_address'] != "")
505
- $people .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_person['person_address'] ) ).'</div> ';
506
- $people .= '<div class="snippet-data-img">';
507
- $people .= '<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">';
508
- $people .= '<span itemprop="streetAddress">'.esc_attr( $people_street ).'</span>,<br>';
509
- if(trim($people_local) != "")
510
- {
511
- $people .= '<span itemprop="addressLocality">'.esc_attr( $people_local ).'</span>, ';
512
- }
513
- if(trim($people_region) != "")
514
- {
515
- $people .= '<span itemprop="addressRegion">'.esc_attr( $people_region ).'</span>, ';
516
- }
517
- if(trim($people_postal) != "")
518
- {
519
- $people .= '<span itemprop="postalCode">'.esc_attr( $people_postal ).'</span>';
520
- }
521
- $people .= '</span>';
522
- $people .= '</div>';
523
- $people .= '<div class="snippet-clear"></div>';
524
- }
525
- $people .= '</div>
526
- </div></div><div class="snippet-clear"></div>';
527
- return ( is_single() || is_page() ) ? $content.$people : $content;
528
- }
529
- else if($type == '6')
530
- {
531
- global $post;
532
- $args_product = get_option('bsf_product');
533
- $product = '';
534
- $product .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
535
- if($args_product['snippet_title'] != "")
536
- $product .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_product['snippet_title'] ) );
537
- $product .= bsf_do_rating();
538
-
539
- $product .= '</div>';
540
- $product .= '<div itemscope itemtype="http://schema.org/Product">';
541
- $product_rating = get_post_meta( $post->ID, '_bsf_product_rating', true);
542
- $product_brand = get_post_meta( $post->ID, '_bsf_product_brand', true);
543
- $product_name = get_post_meta( $post->ID, '_bsf_product_name', true);
544
- $product_image = get_post_meta($post->ID, '_bsf_product_image', true);
545
- $product_cat = get_post_meta($post->ID, '_bsf_product_cat', true);
546
- $product_price = get_post_meta($post->ID, '_bsf_product_price', true);
547
- $product_cur = get_post_meta($post->ID, '_bsf_product_cur', true);
548
- $product_status = get_post_meta($post->ID, '_bsf_product_status', true);
549
- if(trim($product_status) == "out_of_stock"){
550
- $product_status = 'OutOfStock';
551
- $availability = "Out of Stock";
552
- }
553
- else if(trim($product_status) == "in_stock"){
554
- $product_status = 'InStock';
555
- $availability = "Available in Stock";
556
- }
557
- else if(trim($product_status) == "instore_only"){
558
- $product_status = 'InStoreOnly';
559
- $availability = "Available in Store Only";
560
- }
561
- else if(trim($product_status) == "preorder"){
562
- $availability = "Pre-Order Only";
563
- }
564
- if(trim($product_image) != "")
565
- {
566
- $product .= '<div class="snippet-image"><img width="180" src="'.esc_url($product_image ).'" itemprop="image" alt="product image" /></div>';
567
- }
568
- else
569
- {
570
- $product .= '<script type="text/javascript">
571
- jQuery(document).ready(function() {
572
- jQuery(".snippet-label-img").addClass("snippet-clear");
573
- });
574
- </script>';
575
- }
576
- $product .= '<div class="aio-info">';
577
- if(trim($product_rating) != "")
578
- {
579
- if($args_product['product_brand'] != "")
580
- $product .= '<div class="snippet-label-img">'.$args_product['product_rating'].'</div>';
581
- $product .= '<div class="snippet-data-img"><span class="star-img">';
582
- for($i = 1; $i<=ceil($product_rating); $i++)
583
- {
584
- $product .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png" alt="1star">';
585
- }
586
- for($j = 0; $j<=5-ceil($product_rating); $j++)
587
- {
588
- if($j)
589
- $product .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png" alt="gray">';
590
- }
591
- $product .= '</span></div><div class="snippet-clear"></div>';
592
- }
593
-
594
- $product .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
595
- if($args_product['product_agr'] != "")
596
- {
597
- $product .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_product['product_agr'] ) ).'</div>';
598
- }
599
- $product .= '<div class="snippet-data-img">';
600
- $product .= '<span itemprop="ratingValue">'.average_rating().'</span>';
601
- $product .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
602
-
603
-
604
- if(trim($product_brand) != "")
605
- {
606
- if($args_product['product_brand'] != "")
607
- $product .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_product['product_brand'] ) ).'</div>';
608
- $product .= ' <div class="snippet-data-img"> <span itemprop="brand">'.esc_attr( $product_brand ).'</span></div><div class="snippet-clear"></div>';
609
- }
610
- if(trim($product_name) != "")
611
- {
612
- if($args_product['product_name'] != "")
613
- $product .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_product['product_name'] ) ).'</div>';
614
- $product .= ' <div class="snippet-data-img"> <span itemprop="name">'.esc_attr( $product_name ).'</span></div><div class="snippet-clear"></div>';
615
- }
616
-
617
-
618
- if(trim($product_price) != "")
619
- {
620
- if($args_product['product_price'] != "")
621
- $product .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><div class="snippet-label-img">'.esc_attr( stripslashes( $args_product['product_price'] ) ).'</div>';
622
- $product .= '<div class="snippet-data-img">
623
- <span itemprop="priceCurrency">'.esc_attr( $product_cur ).'</span><span itemprop="price">'.' '.esc_attr( $product_price ).'</span></div>';
624
-
625
- if(trim($product_status) != "")
626
- {
627
- if($args_product['product_avail'] != "")
628
- $product .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_product['product_avail'] ) ).'</div>';
629
- $product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="'.esc_attr( $product_status ).'">'.esc_attr( $availability ).'</span></span></div><div class="snippet-clear"></div>';
630
- }
631
- $product .= '</div><div class="snippet-clear"></div>';
632
- }
633
- $product .= '</div>
634
- </div></div><div class="snippet-clear"></div>';
635
-
636
- return ( is_single() || is_page() ) ? $content.$product : $content;
637
- }
638
- else if($type == '7')
639
- {
640
- global $post;
641
- $recipe = '';
642
-
643
- $recipe .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
644
-
645
- $args_recipe = get_option('bsf_recipe');
646
-
647
- if($args_recipe['snippet_title'] != "" )
648
- {
649
- $recipe .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_recipe['snippet_title'] ) );
650
- $recipe .= bsf_do_rating();
651
- }
652
- $recipe .= '</div>';
653
- $recipe .= '<div itemscope itemtype="http://schema.org/Recipe">';
654
- $recipes_name = get_post_meta( $post->ID, '_bsf_recipes_name', true );
655
- $authors_name = get_post_meta( $post->ID, '_bsf_authors_name', true );
656
- $recipes_preptime = get_post_meta( $post->ID, '_bsf_recipes_preptime', true );
657
- $recipes_cooktime = get_post_meta( $post->ID, '_bsf_recipes_cooktime', true );
658
- $recipes_totaltime = get_post_meta( $post->ID, '_bsf_recipes_totaltime', true );
659
- $recipes_photo = get_post_meta( $post->ID, '_bsf_recipes_photo', true );
660
- $recipes_desc = get_post_meta( $post->ID, '_bsf_recipes_desc', true );
661
- $recipes_nutrition = get_post_meta( $post->ID, '_bsf_recipes_nutrition', true );
662
- $recipes_ingredient = get_post_meta( $post->ID, '_bsf_recipes_ingredient', true );
663
- $count = rating_count();
664
- $agregate = average_rating();
665
- if(trim($recipes_photo) != "")
666
- {
667
- $recipe .= '<div class="snippet-image"><img width="180" itemprop="image" src="'.esc_url( $recipes_photo ).'" alt="recipe image"/></div>';
668
- }
669
- else
670
- {
671
- $recipe .= '<script type="text/javascript">
672
- jQuery(document).ready(function() {
673
- jQuery(".snippet-label-img").addClass("snippet-clear");
674
- });
675
- </script>';
676
- }
677
- $recipe .= '<div class="aio-info">';
678
- if(trim($recipes_name) != "")
679
- {
680
- if($args_recipe['recipe_name'] != "")
681
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['recipe_name'] ) ).'</div>';
682
-
683
- $recipe .= '<div class="snippet-data-img"><span itemprop="name">'.esc_attr( $recipes_name ).'</span></div>
684
- <meta itemprop="description" content="'.esc_attr( htmlspecialchars_decode( $recipes_desc ) ).'" >
685
- <meta itemprop="recipeIngredient" content="'.esc_attr( $recipes_ingredient ).'" >
686
- <div itemprop="nutrition"
687
- itemscope itemtype="http://schema.org/NutritionInformation">
688
- <meta itemprop="calories" content="'.esc_attr( $recipes_nutrition ).'" ></div>
689
- <div class="snippet-clear"></div>';
690
- }
691
- if(trim($authors_name) != "")
692
- {
693
- if($args_recipe['author_name'] != "")
694
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['author_name'] ) ).'</div>';
695
-
696
- $recipe .= '<div class="snippet-data-img"><span itemprop="author">'.esc_attr( $authors_name ).'</span></div><div class="snippet-clear"></div>';
697
- }
698
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['recipe_pub'] ) ).' </div><div class="snippet-data-img"><time datetime="'.get_the_time( 'c' ).'" itemprop="datePublished">'.get_the_date('Y-m-d').'</time></div><div class="snippet-clear"></div>';
699
- if(trim($recipes_preptime) != "")
700
- {
701
- if($args_recipe['recipe_prep'] != "")
702
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['recipe_prep'] ) ).'</div>';
703
- $recipe .= '<div class="snippet-data-img"> <time datetime="PT'.esc_attr( $recipes_preptime ).'" itemprop="prepTime">'.esc_attr( $recipes_preptime ).'</time></div><div class="snippet-clear"></div>';
704
- }
705
- if(trim($recipes_cooktime) != "")
706
- {
707
- if($args_recipe['recipe_cook'] != "")
708
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['recipe_cook'] ) ).'</div>';
709
- $recipe .= '<div class="snippet-data-img"> <time datetime="PT'.esc_attr( $recipes_cooktime ).'" itemprop="cookTime">'.esc_attr( $recipes_cooktime ).'</time></div><div class="snippet-clear"></div> ';
710
- }
711
- if(trim($recipes_totaltime) != "")
712
- {
713
- if($args_recipe['recipe_time'] != "")
714
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['recipe_time'] ) ).'</div>';
715
- $recipe .= '<div class="snippet-data-img"> <time datetime="PT'.esc_attr( $recipes_totaltime ).'" itemprop="totalTime">'.esc_attr( $recipes_totaltime ).'</time></div><div class="snippet-clear"></div>';
716
- }
717
- if($args_recipe['recipe_rating'] != "" && $count > 0)
718
- {
719
- $recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['recipe_rating'] ) ).'</div>';
720
- $recipe .= ' <div class="snippet-data-img"> <span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><span itemprop="ratingValue" class="rating-value">'.esc_attr( $agregate ).'</span><span class="star-img">';
721
- for($i = 1; $i<=ceil($agregate); $i++)
722
- {
723
- $recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png" alt="1star">';
724
- }
725
- for($j = 0; $j<=5-ceil($agregate); $j++)
726
- {
727
- if($j)
728
- $recipe .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png" alt="gray">';
729
- }
730
- $recipe .= '</span> Based on <span itemprop="reviewCount"><strong>'.esc_attr( $count ).'</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';
731
- }
732
- $recipe .= '</div>
733
- </div></div><div class="snippet-clear"></div>';
734
-
735
- return ( is_single() || is_page() ) ? $content.$recipe : $content;
736
- }
737
- else if($type == '8')
738
- {
739
- global $post;
740
- $args_soft = get_option('bsf_software');
741
- $software = '';
742
-
743
- $software .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
744
- if($args_soft['snippet_title'] != "" )
745
- $software .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_soft['snippet_title'] ) );
746
-
747
- $software .= bsf_do_rating();
748
- $software .= '</div>';
749
-
750
- $software .= '<div itemscope itemtype="http://schema.org/SoftwareApplication">';
751
- $software_rating = get_post_meta( $post->ID, '_bsf_software_rating', true);
752
- $software_name = get_post_meta( $post->ID, '_bsf_software_name', true );
753
- $software_desc = get_post_meta( $post->ID, '_bsf_software_desc', true );
754
- $software_landing = get_post_meta( $post->ID, '_bsf_software_landing', true );
755
- $software_image = get_post_meta( $post->ID, '_bsf_software_image', true );
756
- $software_price = get_post_meta( $post->ID, '_bsf_software_price', true );
757
- $software_cur = get_post_meta($post->ID, '_bsf_software_cur', true);
758
- $software_os = get_post_meta( $post->ID, '_bsf_software_os', true );
759
- $software_cat = get_post_meta( $post->ID, '_bsf_software_cat', true );
760
-
761
-
762
- if(trim($software_image) != "")
763
- {
764
- $software .= '<div class="snippet-image"><img width="180" src="'.esc_url( $software_image ).'" itemprop="screenshot" alt="software image" /></div>';
765
- }
766
- else
767
- {
768
- $software .= '<script type="text/javascript">
769
- jQuery(document).ready(function() {
770
- jQuery(".snippet-label-img").addClass("snippet-clear");
771
- });
772
- </script>';
773
- }
774
- $software .= '<div class="aio-info">';
775
-
776
- if(trim($software_rating) != "")
777
- {
778
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_rating'] ) ).'</div>';
779
- $software .= '<div class="snippet-data-img"><span class="star-img">';
780
- for($i = 1; $i<=ceil($software_rating); $i++)
781
- {
782
- $software .= '<img src="'.plugin_dir_url(__FILE__) .'images/1star.png" alt="1star">';
783
- }
784
- for($j = 0; $j<=5-ceil($software_rating); $j++)
785
- {
786
- if($j)
787
- $software .= '<img src="'.plugin_dir_url(__FILE__) .'images/gray.png" alt="gray">';
788
- }
789
- $software .= '</span></div><div class="snippet-clear"></div>';
790
- }
791
-
792
-
793
- $software .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
794
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_agr'] ) ).'</div>';
795
- $software .= '<div class="snippet-data-img">';
796
- $software .= '<span itemprop="ratingValue">'.average_rating().'</span>';
797
- $software .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
798
-
799
- if(trim($software_name) != "")
800
- {
801
- if($args_soft['software_name'] != "")
802
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_name'] ) ).'</div>';
803
- $software .= ' <div class="snippet-data-img"> <span itemprop="name">'.esc_attr( $software_name ).'</span></div><div class="snippet-clear"></div>';
804
- }
805
- if(trim($software_os) != "")
806
- {
807
- if($args_soft['software_os'] != "")
808
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_os'] ) ).'</div>';
809
- $software .= ' <div class="snippet-data-img"> <span itemprop="operatingSystem">'.esc_attr( $software_os ).'</span></div><div class="snippet-clear"></div>';
810
- }
811
- if(trim($software_cat) != "")
812
- {
813
- $software .= '<div class="snippet-label-img">Software Category</div>';
814
- $software .= ' <div class="snippet-data-img"> <span itemprop="applicationCategory">'.esc_attr( $software_cat ).'</span></div><div class="snippet-clear"></div>';
815
- }
816
- if(trim($software_price) != "")
817
- {
818
- if($args_soft['software_price'] != "")
819
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_price'] ) ).'</div>';
820
- $software .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
821
- <span itemprop="priceCurrency">'.esc_attr( $software_cur ).'</span> <span itemprop="price"> '.esc_attr( $software_price ).'</span></div><div class="snippet-clear"></div>';
822
-
823
- }
824
- if(trim($software_desc) != "")
825
- {
826
- if($args_soft['software_desc'] != "")
827
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_desc'] ) ).'</div>';
828
- $software .= ' <div class="snippet-data-img"> <span itemprop="description">'.esc_attr( htmlspecialchars_decode( $software_desc ) ).'</span></div><div class="snippet-clear"></div>';
829
- }
830
- if(trim($software_landing) != "")
831
- {
832
- if($args_soft['software_website'] != "")
833
- $software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_website'] ) ).'</div>';
834
- $software .= '<div class="snippet-data-img"> <a itemprop="featureList" href="'.esc_url( $software_landing ).'">'.esc_attr( $software_landing ).'</a></div><div class="snippet-clear"></div>';
835
- }
836
- $software .= '</div>
837
- </div></div><div class="snippet-clear"></div>';
838
-
839
- return ( is_single() || is_page() ) ? $content.$software : $content;
840
- }
841
- else if($type == '9')
842
- {
843
- global $post;
844
- $args_video = get_option('bsf_video');
845
- $video = '';
846
-
847
- $video .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
848
-
849
- if($args_video['snippet_title'] != "" )
850
- $video .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_video['snippet_title'] ) ).'</div>';
851
- $video .= '<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">';
852
- $video_title = get_post_meta( $post->ID, '_bsf_video_title', true );
853
- $video_desc = get_post_meta( $post->ID, '_bsf_video_desc', true );
854
- $video_thumb = get_post_meta( $post->ID, '_bsf_video_thumb', true );
855
- $video_url = get_post_meta( $post->ID, '_bsf_video_url', true );
856
- $video_emb_url = get_post_meta( $post->ID, '_bsf_video_emb_url', true );
857
-
858
- $video_duration = get_post_meta( $post->ID, '_bsf_video_duration', true );
859
- $video_date = get_post_meta( $post->ID, '_bsf_video_date', true );
860
- if(trim($video_url) != "")
861
- {
862
- $video .= '<div class="snippet-image"><a href="'.esc_url( $video_url ).'"><img width="180" src="'.esc_url( $video_thumb ).'" alt="'.esc_attr( $video_title ).'"></a></div>';
863
- }
864
- elseif (trim($video_emb_url) != "") {
865
- $video .= '<div class="snippet-image"><a href="'.esc_url( $video_emb_url ).'"><img width="180" src="'.esc_url( $video_thumb ).'" " alt="'.esc_attr( $video_title ).'"></a></div>';
866
- }
867
- else
868
- {
869
- $video .= '<script type="text/javascript">
870
- jQuery(document).ready(function() {
871
- jQuery(".snippet-label-img").addClass("snippet-clear");
872
- });
873
- </script>';
874
- }
875
- $video .= '<div class="aio-info" style="padding-top:10px">';
876
- if(trim($video_title) != "")
877
- {
878
- if($args_video['video_title'] != "" )
879
- $video .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_video['video_title'] ) ).'</div>';
880
-
881
- $video .= '<div class="snippet-data-img"><span itemprop="name">'.esc_attr( $video_title ).'</span></div><div class="snippet-clear"></div>';
882
- }
883
- if(trim($video_desc) != "")
884
- {
885
- if($args_video['video_desc'] != "" )
886
- $video .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_video['video_desc'] ) ).'</div>';
887
- $video .= '<div class="snippet-data-img"> <p itemprop="description">'.esc_attr( htmlspecialchars_decode( $video_desc ) ).'</p></div><div class="snippet-clear"></div>';
888
- }
889
- if(trim($video_thumb) != "")
890
- $video .= '<meta itemprop="thumbnailUrl" content="'.esc_attr( $video_thumb ).'">';
891
- if(trim($video_url) != ""){
892
- $video .= '<meta itemprop="contentUrl" content="'.esc_attr( $video_url ).'">';
893
- }
894
- elseif(trim($video_emb_url) != ""){
895
- $video .= '<meta itemprop="embedURL" content="'.esc_attr( $video_emb_url ).'">';
896
- }
897
- if(trim($video_duration) != "")
898
- $video .= '<meta itemprop="duration" content="'.esc_attr( $video_duration ).'">';
899
- if(trim($video_date) != "")
900
- $video .= '<meta itemprop="uploadDate" content="'.esc_attr( $video_date ).'">';
901
- $video .= '</div>
902
- </div></div><div class="snippet-clear"></div>';
903
-
904
- return ( is_single() || is_page() ) ? $content.$video : $content;
905
- }
906
- else if($type == '10')
907
- {
908
- global $post;
909
- $article = '';
910
- $args_article = get_option('bsf_article');
911
- $article_title = get_post_meta( $post->ID, '_bsf_article_title', true );
912
- $article_name = get_post_meta( $post->ID, '_bsf_article_name', true );
913
- $article_desc = get_post_meta( $post->ID, '_bsf_article_desc', true );
914
- $article_image = get_post_meta( $post->ID, '_bsf_article_image', true );
915
- $article_author = get_post_meta( $post->ID, '_bsf_article_author', true );
916
- $article_publisher = get_post_meta( $post->ID, '_bsf_article_publisher', true );
917
- $article_publisher_logo = get_post_meta( $post->ID, '_bsf_article_publisher_logo', true );
918
-
919
-
920
- $article .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
921
- if($args_article['snippet_title'] != "" )
922
- {
923
- $article .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_article['snippet_title'] ) );
924
- $article .= '</div>';
925
- }
926
- $article .= '<div itemscope itemtype="http://schema.org/Article">';
927
- if(trim($article_image) != "")
928
- {
929
- $article .= '<div class="snippet-image" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
930
- $article .= '<img width="180" src="'.esc_url( $article_image ).'" alt="'.esc_attr( $article_name ).'"/>';
931
- $article .= '<meta itemprop="url" content="'.esc_attr( $article_image ).'">';
932
- $article .= '</div>';
933
- }
934
- else
935
- {
936
- $article .= '<script type="text/javascript">
937
- jQuery(document).ready(function() {
938
- jQuery(".snippet-label-img").addClass("snippet-clear");
939
- });
940
- </script>';
941
- }
942
- $article .= '<div class="aio-info">';
943
- if(trim($article_name) != "")
944
- {
945
- if($args_article['article_name'] != "")
946
- $article .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_article['article_name'] ) ).'</div>';
947
-
948
- $article .= '<div class="snippet-data-img"><span itemprop="headline">'.esc_attr( $article_name ).'</span></div><div class="snippet-clear"></div>';
949
- }
950
- if(trim($article_desc) != "")
951
- {
952
- if($args_article['article_desc'] != "")
953
- $article .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_article['article_desc'] ) ).'</div>';
954
-
955
- $article .= '<div class="snippet-data-img"><span itemprop="description">'.esc_attr( htmlspecialchars_decode( $article_desc ) ).'</span></div><div class="snippet-clear"></div>';
956
- }
957
- if(trim($article_author) != "")
958
- {
959
- if($args_article['article_author'] != "")
960
- $article .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_article['article_author'] ) ).'</div>';
961
-
962
- $article .= '<div class="snippet-data-img" itemprop="author" itemscope itemtype="https://schema.org/Person">
963
- <span itemprop="name">'.esc_attr( $article_author ).'</span>
964
- </div>
965
- <div class="snippet-clear"></div>';
966
-
967
-
968
- }
969
- if(trim($article_publisher) != "")
970
- {
971
- if($args_article['article_publisher'] != "")
972
-
973
- $article .= '<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
974
-
975
- $article .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_article['article_publisher'] ) ).'</div>';
976
-
977
- $article .= '<div class="snippet-data-img">
978
- <span itemprop="name">'.esc_attr( $article_publisher ).'</span>
979
- </div>
980
-
981
-
982
- <div class="snippet-clear"></div>';
983
- if(trim($article_publisher_logo) != "")
984
- {
985
- if($args_article['article_publisher_logo'] != "")
986
- $article .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_article['article_publisher_logo'] ) ).'</div>';
987
-
988
- $article .= '<div class="snippet-data-img publisher-logo" itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
989
- $article .= '<img width="180" src="'.esc_url( $article_publisher_logo ).'" alt="'.esc_attr( $article_publisher ).'" />';
990
- $article .= '<meta itemprop="url" content="'.esc_attr( $article_publisher_logo ).'">';
991
- $article .= '</div>';
992
- }
993
-
994
- $article .= '</div>';
995
- }
996
-
997
-
998
- $article .= '<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="'.get_permalink().'"/>';
999
- $article .= '<meta itemprop="datePublished" content="'.get_the_time( 'c').'"/>';
1000
- $article .= '<meta itemprop="dateModified" content="'. get_the_modified_time( 'c' ).'"/>';
1001
-
1002
-
1003
- $article .= '</div>
1004
- </div></div><div class="snippet-clear"></div>';
1005
-
1006
-
1007
- return ( is_single() || is_page() ) ? $content.$article : $content;
1008
- }else if($type == '11')
1009
- {
1010
- global $post;
1011
- $service = '';
1012
- $args_service = get_option('bsf_service');
1013
- $service_type = get_post_meta( $post->ID, '_bsf_service_type', true );
1014
- $service_area = get_post_meta( $post->ID, '_bsf_service_area', true );
1015
- $service_desc = get_post_meta( $post->ID, '_bsf_service_desc', true );
1016
- $service_image = get_post_meta( $post->ID, '_bsf_service_image', true );
1017
- $service_provider_name = get_post_meta( $post->ID, '_bsf_service_provider', true );
1018
- $service_street = get_post_meta( $post->ID, '_bsf_service_street', true );
1019
- $service_local = get_post_meta( $post->ID, '_bsf_service_local', true );
1020
- $service_region = get_post_meta( $post->ID, '_bsf_service_region', true );
1021
- $service_postal_code = get_post_meta( $post->ID, '_bsf_service_postal_code', true );
1022
- $service_provider_location_image = get_post_meta( $post->ID, '_bsf_provider_location_image', true );
1023
- $service_telephone = get_post_meta( $post->ID, '_bsf_service_telephone', true );
1024
- $service_price = get_post_meta( $post->ID, '_bsf_service_price', true );
1025
- $service_cur = get_post_meta( $post->ID, '_bsf_service_cur', true );
1026
- $service_rating = get_post_meta( $post->ID, '_bsf_service_rating', true );
1027
- $service_rating_switch = get_post_meta( $post->ID, '_bsf_service_rating_switch', true );
1028
- $service_channel = get_permalink( $post->ID );
1029
- $service_url_link = $args_service['service_url_link'] != ''? $args_service['service_url_link'] : "Click Here For More Info";
1030
-
1031
-
1032
- $service .= '<div id="snippet-box" class="snippet-type-'.esc_attr($type).'" style="background:'.esc_attr( $args_color["snippet_box_bg"] ).'; color:'.esc_attr( $args_color["snippet_box_color"] ).'; border:1px solid '.esc_attr( $args_color["snippet_border"] ).';">';
1033
- if($args_service['snippet_title'] != "" )
1034
- {
1035
- $service .= '<div class="snippet-title" style="background:'.esc_attr( $args_color["snippet_title_bg"] ).'; color:'.esc_attr( $args_color["snippet_title_color"] ).'; border-bottom:1px solid '.esc_attr( $args_color["snippet_border"] ).';">'.esc_attr( stripslashes( $args_service['snippet_title'] ) );
1036
- if ( $service_rating_switch == 'enable' ) {
1037
- $service .= bsf_do_rating();
1038
- }
1039
- $service .= '</div>';
1040
- }
1041
- $service .= '<div itemscope itemtype="http://schema.org/Service">';
1042
- if(trim($service_image) != "")
1043
- {
1044
- $service .= '<div class="snippet-image">';
1045
- $service .= '<img itemprop="image" width="180" src="'.esc_url( $service_image ).'" alt="'.esc_attr( $service_type ).'"/>';
1046
- $service .= '</div>';
1047
- }
1048
- else
1049
- {
1050
- $service .= '<script type="text/javascript">
1051
- jQuery(document).ready(function() {
1052
- jQuery(".snippet-label-img").addClass("snippet-clear");
1053
- });
1054
- </script>';
1055
- }
1056
- $service .= '<div class="aio-info">';
1057
-
1058
- if( average_rating() > 0 ){
1059
- if($args_service['service_rating'] != "")
1060
- {
1061
- $service .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
1062
- $service .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_service['service_rating'] ) ).'</div>';
1063
- $service .= '<div class="snippet-data-img">';
1064
- $service .= '<span itemprop="ratingValue">'.average_rating().'</span>';
1065
- $service .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
1066
- }
1067
- }
1068
-
1069
-
1070
- if(trim($service_type) != "")
1071
- {
1072
- if($args_service['service_type'] != "")
1073
- $service .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_service['service_type'] ) ).'</div>';
1074
-
1075
- $service .= '<div class="snippet-data-img">
1076
- <span itemprop="serviceType">'.esc_attr( $service_type ).'</span>
1077
- </div>
1078
- <div class="snippet-clear"></div>';
1079
- }
1080
-
1081
- if(trim($service_provider_name) != "")
1082
- {
1083
- if($args_service['service_provider_name'] != "")
1084
- $service .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_service['service_provider_name'] ) ).'</div>';
1085
-
1086
- $service .= '<div class="snippet-data-img" itemprop="provider" itemscope itemtype="http://schema.org/LocalBusiness">
1087
- <meta itemprop="image" content="'.esc_attr( $service_provider_location_image ).'"/>
1088
- <span itemprop="name">'.esc_attr( $service_provider_name ).'</span>,';
1089
- if(trim($service_street) != "")
1090
- $service .= '<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
1091
- <span itemprop="streetAddress">'.esc_attr( $service_street ).'</span>,';
1092
- if(trim($service_local) != "")
1093
- $service .= '<span itemprop="addressLocality">'.esc_attr( $service_local ).'</span>,';
1094
- if(trim($service_region) != "")
1095
- $service .= '<span itemprop="addressRegion">'.esc_attr( $service_region ).'</span>-';
1096
- if(trim($service_postal_code) != "")
1097
- $service .= '<span itemprop="postalCode">'.esc_attr( $service_postal_code ).'</span>,<br/>';
1098
- if(trim($service_telephone) != "")
1099
- $service .= '<span itemprop="telephone"> Telephone No.'.esc_attr( $service_telephone ).'</span>';
1100
- $service .= '</div>';
1101
- $service .= '</div>
1102
- <div class="snippet-clear"></div>';
1103
- }
1104
-
1105
- if(trim($service_area) != "")
1106
- {
1107
- if($args_service['service_area'] != "")
1108
- $service .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_service['service_area'] ) ).'</div>';
1109
-
1110
- $service .= '<div class="snippet-data-img" itemprop="areaServed" itemscope itemtype="http://schema.org/State">
1111
- <span itemprop="name">'.esc_attr( $service_area ).'</span>
1112
- </div><div class="snippet-clear"></div>';
1113
- }
1114
-
1115
- if(trim($service_desc) != "")
1116
- {
1117
- if($args_service['service_desc'] != "")
1118
- $service .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_service['service_desc'] ) ).'</div>';
1119
-
1120
- $service .= '<div class="snippet-data-img"><span itemprop="description">'.esc_attr( htmlspecialchars_decode( $service_desc ) ).'</span></div><div class="snippet-clear"></div>';
1121
- }
1122
-
1123
- if(trim($service_channel) != "")
1124
- {
1125
- if($args_service['service_channel'] != "")
1126
-
1127
- $service .= '<div class="snippet-data-img" itemprop="availableChannel" itemscope itemtype="https://schema.org/ServiceChannel">
1128
-
1129
- <meta itemprop="URL" href="'.esc_url( $service_channel ).'">
1130
- </div><div class="snippet-clear"></div>';
1131
- }
1132
-
1133
-
1134
- $service .= '</div></div></div><div class="snippet-clear"></div>';
1135
-
1136
- return ( is_single() || is_page() ) ? $content.$service : $content;
1137
- }
1138
- else {
1139
- return $content;
1140
- }
1141
- }
1142
-
1143
-
1144
- add_filter('the_content','display_rich_snippet', 90);
1145
-
1146
-
1147
- require_once(plugin_dir_path( __FILE__ ).'meta-boxes.php');
1148
- function get_the_ip() {
1149
- if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
1150
- return $_SERVER["HTTP_X_FORWARDED_FOR"];
1151
- }
1152
- elseif (isset($_SERVER["HTTP_CLIENT_IP"])) {
1153
- return $_SERVER["HTTP_CLIENT_IP"];
1154
- }
1155
- else {
1156
- return $_SERVER["REMOTE_ADDR"];
1157
- }
1158
- }
1159
- function average_rating() {
1160
- global $post;
1161
-
1162
- $data = get_post_meta($post->ID, 'post-rating', false);
1163
- $post_id = $post->ID;
1164
- if( !empty($data) )
1165
- {
1166
- $counter = 0;
1167
-
1168
- $average_rating = 0;
1169
- foreach($data as $d)
1170
- {
1171
- $rating = $d['user_rating'];
1172
-
1173
- $average_rating = $average_rating + $rating;
1174
-
1175
- $counter++;
1176
-
1177
- }
1178
- //round the average to the nearast 1/2 point
1179
- return (round(($average_rating/$counter)*2,0)/2);
1180
-
1181
- } else {
1182
- //no ratings
1183
- return 'no rating';
1184
- }
1185
- }
1186
- function rating_count()
1187
- {
1188
- global $post;
1189
-
1190
- $data = get_post_meta($post->ID, 'post-rating', false);
1191
- return count($data);
1192
- }
1193
- function bsf_do_rating()
1194
- {
1195
- global $post;
1196
- $ip = get_the_ip();
1197
-
1198
- $ip_array = array();
1199
-
1200
- $data = get_post_meta($post->ID, 'post-rating', false);
1201
- if( !empty($data))
1202
- {
1203
- foreach($data as $d)
1204
- {
1205
- array_push($ip_array,$d['user_ip']);
1206
- }
1207
- if(!in_array($ip,$ip_array) )
1208
- {
1209
- return display_rating();
1210
- }
1211
- else if(in_array($ip,$ip_array) )
1212
- {
1213
- $rating = get_previous_rating($ip, $data);
1214
-
1215
- $stars = bsf_display_rating($rating);
1216
- return $stars;
1217
- }
1218
- }
1219
- else
1220
- {
1221
- return display_rating();
1222
- }
1223
- }
1224
- function get_previous_rating($needle, $haystack, $strict = false) {
1225
- foreach ($haystack as $item) {
1226
- if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && get_previous_rating($needle, $item, $strict))) {
1227
- return !empty($item['user_rating']) ? esc_attr( $item['user_rating'] ) : '';
1228
- }
1229
- }
1230
- return false;
1231
- }
1232
- function add_ajax_library() {
1233
-
1234
- $html = '<script type="text/javascript">';
1235
- $html .= 'var ajaxurl = "' . admin_url( 'admin-ajax.php' ) . '";';
1236
- $html .= '</script>';
1237
-
1238
- echo $html;
1239
- }
1240
- function bsf_add_rating()
1241
- {
1242
- if(isset($_POST['star-review']))
1243
- $stars = esc_attr( $_POST['star-review'] );
1244
- else
1245
- $stars = '0';
1246
-
1247
- $ip = esc_attr( $_POST['ip'] );
1248
-
1249
- $postid = esc_attr( $_POST['post_id'] );
1250
-
1251
- $user_rating = array('post_id' => $postid, 'user_ip' => $ip, 'user_rating' => $stars);
1252
-
1253
- echo false == add_post_meta($postid, 'post-rating', $user_rating) ? _e('Error adding your rating') : _e('Ratings added successfully !');
1254
- die();
1255
- }
1256
- function bsf_update_rating()
1257
- {
1258
- if(isset($_POST['star-review']))
1259
- $stars = esc_attr( $_POST['star-review'] );
1260
- else
1261
- $stars = '0';
1262
-
1263
- $ip = esc_attr( $_POST['ip'] );
1264
-
1265
- $postid = esc_attr( $_POST['post_id'] );
1266
-
1267
- $prev_data = get_post_meta($postid,'post-rating',true);
1268
-
1269
- $user_rating = array('post_id' => $postid, 'user_ip' => $ip, 'user_rating' => $stars);
1270
-
1271
- echo false == update_post_meta($postid, 'post-rating', $user_rating, $prev_data) ? _e('Error updating your rating') : _e('Ratings updated successfully !');
1272
- die();
1273
- }
1274
- function display_rating() {
1275
-
1276
- global $post;
1277
- $rating = '<span class="ratings"><div class="star-blocks">';
1278
- $rating .= '<form name="rating" method="post" action="'. get_permalink() .'" id="bsf-rating" onsubmit="return false;">';
1279
- $rating .= '<input type="radio" name="star-review" class="star star-1" value="1"/>';
1280
- $rating .= '<input type="radio" name="star-review" class="star star-2" value="2"/>';
1281
- $rating .= '<input type="radio" name="star-review" class="star star-3" value="3"/>';
1282
- $rating .= '<input type="radio" name="star-review" class="star star-4" value="4"/>';
1283
- $rating .= '<input type="radio" name="star-review" class="star star-5" value="5"/>';
1284
- $rating .= '<input type="hidden" name="ip" value="'.get_the_ip().'" />';
1285
- $rating .= '<input type="hidden" name="post_id" value="'.$post->ID.'" />';
1286
- $rating .= '</form>';
1287
- $rating .= '</div></span>';
1288
- $script = '<script type="text/javascript">
1289
- jQuery("#bsf-rating").click(function()
1290
- {
1291
- var data = jQuery("#bsf-rating").serialize();
1292
- var form_data = "action=bsf_submit_rating&" + data;
1293
- // alert(form_data);
1294
- jQuery.post(ajaxurl, form_data,
1295
- function (response) {
1296
- alert(response);
1297
- window.location.href = window.location.href;
1298
- }
1299
- );
1300
- });
1301
- </script>
1302
- ';
1303
- $rating .= $script;
1304
- return $rating;
1305
- }
1306
- function bsf_display_rating($n) {
1307
-
1308
- global $post;
1309
- $rating = '<span class="ratings"><div class="star-blocks">';
1310
- $rating .= '<form name="rating" method="post" action="'. get_permalink() .'" id="bsf-rating" onsubmit="return false;">';
1311
- $rating .= '<input type="radio" name="star-review" class="star star-1" value="1" '; $n == 1 ? $rating .=' checked="checked"/>' : $rating .='/>';
1312
- $rating .= '<input type="radio" name="star-review" class="star star-2" value="2" '; $n == 2 ? $rating .=' checked="checked"/>' : $rating .='/>';
1313
- $rating .= '<input type="radio" name="star-review" class="star star-3" value="3" '; $n == 3 ? $rating .=' checked="checked"/>' : $rating .='/>';
1314
- $rating .= '<input type="radio" name="star-review" class="star star-4" value="4" '; $n == 4 ? $rating .=' checked="checked"/>' : $rating .='/>';
1315
- $rating .= '<input type="radio" name="star-review" class="star star-5" value="5" '; $n == 5 ? $rating .=' checked="checked"/>' : $rating .='/>';
1316
- $rating .= '<input type="hidden" name="ip" value="'.get_the_ip().'" />';
1317
- $rating .= '<input type="hidden" name="post_id" value="'.$post->ID.'" />';
1318
- $rating .= '</form>';
1319
- $rating .= '</div></span>';
1320
- $script = '<script type="text/javascript">
1321
- jQuery("#bsf-rating").click(function()
1322
- {
1323
- var data = jQuery("#bsf-rating").serialize();
1324
- var form_data = "action=bsf_update_rating&" + data;
1325
- // alert(form_data);
1326
- jQuery.post(ajaxurl, form_data,
1327
- function (response) {
1328
- alert(response);
1329
- window.location.href = window.location.href;
1330
- }
1331
- );
1332
- });
1333
- </script>
1334
- ';
1335
- $rating .= $script;
1336
- return $rating;
1337
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Template Name: Plugin Functions.
4
+ *
5
+ * @package AIOSRS.
6
+ */
7
+
8
+ /**
9
+ * Define the metabox and field configurations.
10
+ *
11
+ * @param array $meta_boxes
12
+ * @return array
13
+ */
14
+ add_action( 'init', 'bsf_initialize_bsf_meta_boxes', 9999 );
15
+ // Register an action for submitting rating.
16
+ add_action( 'wp_ajax_nopriv_bsf_submit_rating', 'bsf_add_rating' );
17
+ add_action( 'wp_ajax_bsf_submit_rating', 'bsf_add_rating' );
18
+ // Register an action for updating rating.
19
+ add_action( 'wp_ajax_nopriv_bsf_update_rating', 'bsf_update_rating' );
20
+ add_action( 'wp_ajax_bsf_update_rating', 'bsf_update_rating' );
21
+ // Include the Ajax library on the front end.
22
+ add_action( 'wp_head', 'add_ajax_library' );
23
+ /**
24
+ * Initialize the metabox class.
25
+ */
26
+ /* FUNCTION to check for posts having snippets */
27
+ add_action( 'wp', 'aiosrs_check_snippet_existence' );
28
+ /**
29
+ * Aiosrs_check_snippet_existence.
30
+ */
31
+ function aiosrs_check_snippet_existence() {
32
+ global $post;
33
+
34
+ if ( ! isset( $post->ID ) ) {
35
+ return;
36
+ }
37
+
38
+ $type = get_post_meta( $post->ID, '_bsf_post_type', true );
39
+ if ( $type ) {
40
+ add_action( 'wp_enqueue_scripts', 'aiosrs_enque' );
41
+ }
42
+
43
+ }
44
+ /**
45
+ * Aiosrs_enque.
46
+ */
47
+ function aiosrs_enque() {
48
+ wp_enqueue_style( 'rating_style', plugin_dir_url( __FILE__ ) . 'css/jquery.rating.css', null, '1.0' );
49
+ wp_enqueue_script( 'jquery_rating', plugin_dir_url( __FILE__ ) . 'js/jquery.rating.min.js', array( 'jquery' ), null, false ); //phpcs:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion
50
+ wp_register_style( 'bsf_style', plugins_url( '/css/style.css', __FILE__ ), null, '1.0' );
51
+ wp_enqueue_style( 'bsf_style' );
52
+ }
53
+ /**
54
+ * Bsf_initialize_bsf_meta_boxes.
55
+ */
56
+ function bsf_initialize_bsf_meta_boxes() {
57
+ if ( ! class_exists( 'Bsf_Meta_Box' ) ) {
58
+ require_once plugin_dir_path( __FILE__ ) . 'init.php';
59
+ }
60
+ }
61
+ /**
62
+ * Function to display the rich snippet output below the content.
63
+ *
64
+ * @param string $content Content.
65
+ */
66
+ function display_rich_snippet( $content ) {
67
+ global $post;
68
+
69
+ $args_color = get_option( 'bsf_custom' );
70
+ $id = $post->ID;
71
+ $type = get_post_meta( $id, '_bsf_post_type', true );
72
+
73
+ if ( '1' == $type ) {
74
+ global $post;
75
+
76
+ $args_review = get_option( 'bsf_review' );
77
+
78
+ $review = '';
79
+ $review .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
80
+
81
+ if ( '' != $args_review['review_title'] ) {
82
+ $review .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_review['review_title'] ) ) . '</div>';
83
+ }
84
+ $review .= '<div class="snippet-markup" itemscope itemtype="https://schema.org/Review">';
85
+ $item = get_post_meta( $post->ID, '_bsf_item_name', true );
86
+ $item_review_type = get_post_meta( $post->ID, '_bsf_item_review_type', true );
87
+ $item_event_name = get_post_meta( $post->ID, '_bsf_item_event_name', true );
88
+ $item_event_start_date = get_post_meta( $post->ID, '_bsf_item_event_start_date', true );
89
+ $item_event_org = get_post_meta( $post->ID, '_bsf_item_event_organization', true );
90
+ $item_event_street = get_post_meta( $post->ID, '_bsf_item_event_street', true );
91
+ $item_event_local = get_post_meta( $post->ID, '_bsf_item_event_local', true );
92
+ $item_event_region = get_post_meta( $post->ID, '_bsf_item_event_region', true );
93
+ $item_event_postal_code = get_post_meta( $post->ID, '_bsf_item_event_postal_code', true );
94
+ $item_pro_name = get_post_meta( $post->ID, '_bsf_item_pro_name', true );
95
+ $item_pro_price = get_post_meta( $post->ID, '_bsf_item_pro_price', true );
96
+ $item_pro_cur = get_post_meta( $post->ID, '_bsf_item_pro_cur', true );
97
+ $item_pro_status = get_post_meta( $post->ID, '_bsf_item_pro_status', true );
98
+ $item_recp_name = get_post_meta( $post->ID, '_bsf_item_recipes_name', true );
99
+ $item_recp_photo = get_post_meta( $post->ID, '_bsf_item_recipes_photo', true );
100
+ $item_soft_name = get_post_meta( $post->ID, '_bsf_item_soft_name', true );
101
+ $item_os_name = get_post_meta( $post->ID, '_bsf_item_os_name', true );
102
+ $item_app_name = get_post_meta( $post->ID, '_bsf_item_app_name', true );
103
+ $item_video_title = get_post_meta( $post->ID, '_bsf_item_video_title', true );
104
+ $item_video_desc = get_post_meta( $post->ID, '_bsf_item_video_desc', true );
105
+ $item_video_thumb = get_post_meta( $post->ID, '_bsf_item_video_thumb', true );
106
+ $item_video_date = get_post_meta( $post->ID, '_bsf_item_video_date', true );
107
+ $rating = get_post_meta( $post->ID, '_bsf_rating', true );
108
+ $reviewer = get_post_meta( $post->ID, '_bsf_item_reviewer', true );
109
+ $post_date = get_the_date( 'Y-m-d' );
110
+
111
+ if ( 'item_recipe' == $item_review_type ) {
112
+ $review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_recp_photo ) . '" alt="recipe image"/></div>';
113
+ $review .= '<div class="aio-info">';
114
+ }
115
+ if ( 'item_video' == $item_review_type ) {
116
+ $review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_video_thumb ) . '" alt="Video Image"/></div>';
117
+ $review .= '<div class="aio-info">';
118
+ }
119
+ if ( '' != trim( $reviewer ) ) {
120
+ if ( '' != $args_review['item_reviewer'] ) {
121
+ $review .= '<span itemprop="author" itemscope itemtype="https://schema.org/Person">';
122
+ }
123
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['item_reviewer'] ) ) . '</div>';
124
+ $review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $reviewer ) ) . '</span></div></span>';
125
+ }
126
+ if ( isset( $args_review['review_date'] ) ) {
127
+ if ( '' != $args_review['review_date'] ) {
128
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['review_date'] ) ) . '</div>';
129
+ }
130
+ $review .= "<div class='snippet-data'> <time itemprop='datePublished' datetime='" . get_the_time( 'c' ) . "'>" . esc_attr( $post_date ) . '</time></div>';
131
+ }
132
+ if ( '' != trim( $item ) ) {
133
+ if ( '' != $args_review['item_name'] ) {
134
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['item_name'] ) ) . '</div>';
135
+ }
136
+ $review .= "<div class='snippet-data'> <span itemprop='name'>" . esc_attr( $item ) . '</span></div>';
137
+ }
138
+ if ( '' != trim( $rating ) ) {
139
+ if ( '' != $args_review['item_rating'] ) {
140
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['item_rating'] ) ) . '</div>';
141
+ }
142
+ $review .= "<div class='snippet-data'> <span itemprop='reviewRating' itemscope itemtype='https://schema.org/Rating'><span class='rating-value' itemprop='ratingValue'>" . esc_attr( $rating ) . "</span></span><span class='star-img'>";
143
+ $ceil_rating = ceil( $rating );
144
+ for ( $i = 1; $i <= $ceil_rating; $i++ ) {
145
+ $review .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
146
+ }
147
+ for ( $j = 0; $j <= 5 - $ceil_rating; $j++ ) {
148
+ if ( $j ) {
149
+ $review .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
150
+ }
151
+ }
152
+ $review .= '</span></div>';
153
+ }
154
+ if ( '' != trim( $item_review_type ) ) {
155
+ if ( 'item_event' == $item_review_type ) {
156
+ $item_event = get_option( 'bsf_event' );
157
+ $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Event">';
158
+ if ( '' != trim( $item_event_name ) ) {
159
+ if ( '' != $item_event['event_title'] ) {
160
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_event['event_title'] ) ) . '</div>';
161
+ }
162
+ $review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_event_name ) ) . '</span></div>';
163
+ }
164
+ if ( '' != trim( $item_event_start_date ) ) {
165
+ if ( '' != $item_event['start_time'] ) {
166
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_event['start_time'] ) ) . '</div>';
167
+ }
168
+ $review .= " <div class='snippet-data'><span itemprop='startDate' datetime='" . esc_attr( $item_event_start_date ) . "T00:00-00:00'>" . esc_attr( $item_event_start_date ) . '</span></div>';
169
+ }
170
+ if ( '' != trim( $item_event_org ) ) {
171
+ if ( '' != $item_event['event_location'] ) {
172
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_event['event_location'] ) ) . '</div>';
173
+ }
174
+ $review .= " <div class='snippet-data'><span itemprop='location' itemscope itemtype='https://schema.org/Place'><span itemprop='name'>" . esc_attr( stripslashes( $item_event_org ) ) . '</span>,';
175
+ if ( '' != trim( $item_event_street ) ) {
176
+ $review .= '<span itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
177
+ <span itemprop="streetAddress">' . esc_attr( $item_event_street ) . '</span>,';
178
+ }
179
+ if ( '' != trim( $item_event_local ) ) {
180
+ $review .= '<span itemprop="addressLocality">' . esc_attr( $item_event_local ) . '</span>,';
181
+ }
182
+ if ( '' != trim( $item_event_region ) ) {
183
+ $review .= '<span itemprop="addressRegion">' . esc_attr( $item_event_region ) . '</span>';
184
+ }
185
+ if ( '' != trim( $item_event_postal_code ) ) {
186
+ $review .= '-<span itemprop="postalCode">' . esc_attr( $item_event_postal_code ) . '</span>';
187
+ }
188
+ $review .= '</span>';
189
+ $review .= '</span></div>';
190
+ }
191
+ $review .= '</span>';
192
+ }
193
+ if ( 'item_product' == $item_review_type ) {
194
+ $item_product = get_option( 'bsf_product' );
195
+ if ( 'out_of_stock' == trim( $item_pro_status ) ) {
196
+ $item_pro_status = 'OutOfStock';
197
+ $availability = 'Out of Stock';
198
+ } elseif ( 'in_stock' == trim( $item_pro_status ) ) {
199
+ $item_pro_status = 'InStock';
200
+ $availability = 'Available in Stock';
201
+ } elseif ( 'instore_only' == trim( $item_pro_status ) ) {
202
+ $item_pro_status = 'InStoreOnly';
203
+ $availability = 'Available in Store Only';
204
+ } elseif ( 'preorder' == trim( $item_pro_status ) ) {
205
+ $availability = 'Pre-Order Only';
206
+ }
207
+ $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Product">';
208
+ if ( '' != trim( $item_pro_name ) ) {
209
+ if ( '' != $item_product['product_name'] ) {
210
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_product['product_name'] ) ) . '</div>';
211
+ }
212
+ $review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_pro_name ) ) . '</span></div>';
213
+ }
214
+ if ( '' != trim( $item_pro_price ) ) {
215
+
216
+ if ( '' != $item_product['product_price'] ) {
217
+ $review .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="https://schema.org/Offer"><div class="snippet-label">' . esc_attr( stripslashes( $item_product['product_price'] ) ) . '</div>';
218
+ }
219
+ $review .= '<div class="snippet-data">
220
+ <span itemprop="priceCurrency">' . esc_attr( $item_pro_cur ) . '</span><span itemprop="price"> ' . esc_attr( $item_pro_price ) . '</span></div>';
221
+
222
+ if ( '' != trim( $item_pro_status ) ) {
223
+ if ( '' != $item_product['product_avail'] ) {
224
+ $review .= '<div class="snippet-label">' . esc_attr( stripslashes( $item_product['product_avail'] ) ) . '</div>';
225
+ }
226
+ $review .= ' <div class="snippet-data"> <span itemprop="availability" content="' . esc_attr( $item_pro_status ) . '">' . esc_attr( $availability ) . '</span></span></div>';
227
+ }
228
+ $review .= '</div>';
229
+ }
230
+ $review .= '</span>';
231
+ }
232
+ if ( 'item_recipe' == $item_review_type ) {
233
+ $item_recipe = get_option( 'bsf_recipe' );
234
+ $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Recipe">';
235
+ if ( '' != trim( $item_recp_name ) ) {
236
+ if ( '' != $item_recipe['recipe_name'] ) {
237
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_recipe['recipe_name'] ) ) . '</div>';
238
+ }
239
+ $review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_recp_name ) ) . '</span></div>';
240
+ }
241
+ if ( '' != trim( $item_recp_photo ) ) {
242
+ $review .= '<meta itemprop="image" content="' . esc_attr( $item_recp_photo ) . '">';
243
+ }
244
+ $review .= '</span></div>';
245
+ }
246
+ if ( 'item_software' == $item_review_type ) {
247
+ $item_soft = get_option( 'bsf_software' );
248
+ $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/SoftwareApplication">';
249
+ if ( '' != trim( $item_soft_name ) ) {
250
+ if ( '' != $item_soft['software_name'] ) {
251
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_soft['software_name'] ) ) . '</div>';
252
+ }
253
+ $review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_soft_name ) ) . '</span></div>';
254
+ }
255
+ if ( '' != trim( $item_os_name ) ) {
256
+ if ( $item_soft['software_name'] ) {
257
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_soft['software_name'] ) ) . '</div>';
258
+ }
259
+ $review .= " <div class='snippet-data'><span itemprop='operatingSystem'>" . esc_attr( stripslashes( $item_os_name ) ) . '</span></div>';
260
+ }
261
+ if ( '' != trim( $item_app_name ) ) {
262
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( 'Software Category' ) ) . '</div>';
263
+ $review .= " <div class='snippet-data'><span itemprop='applicationCategory'>" . esc_attr( stripslashes( $item_app_name ) ) . '</span></div>';
264
+ }
265
+ $review .= '</span>';
266
+ }
267
+ if ( 'item_video' == $item_review_type ) {
268
+ $item_video = get_option( 'bsf_video' );
269
+ $review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/VideoObject">';
270
+ if ( '' != trim( $item_video_title ) ) {
271
+ if ( '' != $item_video['video_title'] ) {
272
+ $review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_video['video_title'] ) ) . '</div>';
273
+ }
274
+ $review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_video_title ) ) . "</span></div><div class='snippet-clear'></div>";
275
+ }
276
+ if ( '' != trim( $item_video_desc ) ) {
277
+ if ( '' != $item_video['video_desc'] ) {
278
+ $review .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $item_video['video_desc'] ) ) . '</div>';
279
+ }
280
+ $review .= '<div class="snippet-data-img"><span itemprop="description">' . esc_attr( htmlspecialchars_decode( $item_video_desc ) ) . '</span></div>';
281
+ }
282
+ if ( '' != trim( $item_video_date ) ) {
283
+ if ( '' != $item_video['video_date'] ) {
284
+ $review .= '<div class="snippet-label">' . esc_attr( stripslashes( $item_video['video_date'] ) ) . '</div>';
285
+ }
286
+ $review .= "<div class='snippet-data'><span itemprop='uploadDate'>" . esc_attr( stripslashes( $item_video_date ) ) . '</span></div>';
287
+ }
288
+ if ( '' != trim( $item_video_thumb ) ) {
289
+ $review .= '<meta itemprop="thumbnailUrl" content="' . esc_attr( $item_video_thumb ) . '">';
290
+ }
291
+ $review .= '</span></div>';
292
+ }
293
+ }
294
+ $review .= "</div>
295
+ </div><div style='clear:both;'></div>";
296
+
297
+ return ( is_single() || is_page() ) ? $content . $review : $content;
298
+ } elseif ( '2' == $type ) {
299
+ global $post;
300
+ $args_event = get_option( 'bsf_event' );
301
+
302
+ $event = '';
303
+
304
+ $event .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
305
+
306
+ if ( '' != $args_event['snippet_title'] ) {
307
+ $event .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_event['snippet_title'] ) ) . '</div>';
308
+ }
309
+ $event .= '<div itemscope itemtype="https://schema.org/Event">';
310
+ $event_title = get_post_meta( $post->ID, '_bsf_event_title', true );
311
+ $event_org = get_post_meta( $post->ID, '_bsf_event_organization', true );
312
+ $event_street = get_post_meta( $post->ID, '_bsf_event_street', true );
313
+ $event_local = get_post_meta( $post->ID, '_bsf_event_local', true );
314
+ $event_region = get_post_meta( $post->ID, '_bsf_event_region', true );
315
+ $event_postal_code = get_post_meta( $post->ID, '_bsf_event_postal_code', true );
316
+ $event_image = get_post_meta( $post->ID, '_bsf_event_image', true );
317
+ $event_start_date = get_post_meta( $post->ID, '_bsf_event_start_date', true );
318
+ $event_end_date = get_post_meta( $post->ID, '_bsf_event_end_date', true );
319
+ $event_description = get_post_meta( $post->ID, '_bsf_event_desc', true );
320
+ $event_ticket_url = get_post_meta( $post->ID, '_bsf_event_ticket_url', true );
321
+ $event_price = get_post_meta( $post->ID, '_bsf_event_price', true );
322
+ $event_cur = get_post_meta( $post->ID, '_bsf_event_cur', true );
323
+
324
+ if ( '' != trim( $event_image ) ) {
325
+ $event .= '<div class="snippet-image"><img width="180" src="' . esc_url( $event_image ) . '" itemprop="image" alt="event" /></div>';
326
+ } else {
327
+ $event .= '<script type="text/javascript">
328
+ jQuery(document).ready(function() {
329
+ jQuery(".snippet-label-img").addClass("snippet-clear");
330
+ });
331
+ </script>';
332
+ }
333
+ $event .= '<div class="aio-info">';
334
+
335
+ if ( '' != trim( $event_title ) ) {
336
+ if ( $args_event['event_title'] ) {
337
+ $event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['event_title'] ) ) . '</div>';
338
+ }
339
+ $event .= ' <div class="snippet-data-img">​<span itemprop="name">' . esc_attr( $event_title ) . '</span></div>
340
+ <meta itemprop="url" content="' . esc_attr( $event_ticket_url ) . '">
341
+ <div class="snippet-clear"></div>';
342
+ }
343
+ if ( '' != trim( $event_org ) ) {
344
+ if ( '' != $args_event['event_location'] ) {
345
+ $event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['event_location'] ) ) . '</div>';
346
+ }
347
+ $event .= ' <div class="snippet-data-img">
348
+ ​<span itemprop="location" itemscope itemtype="https://schema.org/Place">
349
+ <span itemprop="name">' . esc_attr( $event_org ) . '</span>,';
350
+ }
351
+ if ( '' != trim( $event_street ) ) {
352
+ $event .= '<span itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
353
+ <span itemprop="streetAddress">' . esc_attr( $event_street ) . '</span>,';
354
+ }
355
+ if ( '' != trim( $event_local ) ) {
356
+ $event .= '<span itemprop="addressLocality">' . esc_attr( $event_local ) . '</span>,';
357
+ }
358
+ if ( '' != trim( $event_region ) ) {
359
+ $event .= '<span itemprop="addressRegion">' . esc_attr( $event_region ) . '</span>';
360
+ }
361
+ if ( '' != trim( $event_postal_code ) ) {
362
+ $event .= '-<span itemprop="postalCode">' . esc_attr( $event_postal_code ) . '</span>';
363
+ }
364
+ $event .= '</span>';
365
+
366
+ $event .= '</span>
367
+ </div><div class="snippet-clear"></div>';
368
+
369
+ if ( '' != trim( $event_start_date ) ) {
370
+ if ( '' != $args_event['start_time'] ) {
371
+ $event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['start_time'] ) ) . '</div>';
372
+ }
373
+
374
+ $event .= ' <div class="snippet-data-img"> <span itemprop="startDate" datetime="' . esc_attr( $event_start_date ) . 'T00:00-00:00">' . esc_attr( $event_start_date ) . '</span></div><div class="snippet-clear"></div>';
375
+ }
376
+ if ( '' != trim( $event_end_date ) ) {
377
+ if ( '' != $args_event['end_time'] ) {
378
+ $event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['end_time'] ) ) . '</div>';
379
+ }
380
+ $event .= ' <div class="snippet-data-img"> <span itemprop="endDate" datetime="' . esc_attr( $event_end_date ) . 'T00:00-00:00">' . esc_attr( $event_end_date ) . '</span></div><div class="snippet-clear"></div>';
381
+ }
382
+ if ( '' != trim( $event_description ) ) {
383
+ if ( '' != $args_event['event_desc'] ) {
384
+ $event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['event_desc'] ) ) . '</div>';
385
+ }
386
+ $event .= ' <div class="snippet-data-img"> <span itemprop="description">' . esc_attr( htmlspecialchars_decode( $event_description ) ) . '</span></div><div class="snippet-clear"></div>';
387
+ }
388
+
389
+ if ( '' != trim( $event_price ) ) {
390
+ if ( '' != $args_event['events_price'] ) {
391
+ $event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['events_price'] ) ) . '</div>';
392
+ }
393
+ $event .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
394
+ <span itemprop="priceCurrency">' . esc_attr( $event_cur ) . '</span><span itemprop="price"> ' . esc_attr( $event_price ) . '</span><br><a itemprop="url" href="' . esc_url( $event_ticket_url ) . '">Buy Tickets</a></div><div class="snippet-clear"></div>';
395
+ }
396
+
397
+ $event .= '</div>
398
+ </div></div>
399
+ <meta itemprop="description" content="Event">
400
+ <div class="snippet-clear"></div>';
401
+
402
+ return ( is_single() || is_page() ) ? $content . $event : $content;
403
+ } elseif ( '4' == $type ) {
404
+ global $post;
405
+ $organization = '';
406
+ $organization .= '<div class="snippet-title">Organization Brief :</div>';
407
+ $organization .= '<div xmlns:v="https://rdf.data-vocabulary.org/#" typeof="v:Organization">';
408
+ $org_name = get_post_meta( $post->ID, '_bsf_organization_name', true );
409
+ $org_url = get_post_meta( $post->ID, '_bsf_organization_url', true );
410
+ $org_tel = get_post_meta( $post->ID, '_bsf_organization_tel', true );
411
+ $org_street = get_post_meta( $post->ID, '_bsf_organization_street', true );
412
+ $org_local = get_post_meta( $post->ID, '_bsf_organization_local', true );
413
+ $org_region = get_post_meta( $post->ID, '_bsf_organization_region', true );
414
+ $org_zip = get_post_meta( $post->ID, '_bsf_organization_zip', true );
415
+ $org_country = get_post_meta( $post->ID, '_bsf_organization_country', true );
416
+ $org_latitude = get_post_meta( $post->ID, '_bsf_organization_latitude', true );
417
+ $org_longitude = get_post_meta( $post->ID, '_bsf_organization_longitude', true );
418
+ if ( '' != trim( $org_name ) ) {
419
+ $organization .= 'Organization Name : <span property="v:name">' . esc_attr( $org_nam ) . '</span></div>';
420
+ }
421
+ if ( '' != trim( $org_url ) ) {
422
+ $organization .= 'Website : <a href="' . esc_url( $org_url ) . '" rel="v:url">' . esc_attr( $org_url ) . '</a></div>';
423
+ }
424
+ if ( '' != trim( $org_tel ) ) {
425
+ $organization .= 'Telephone No. : <span property="v:tel">' . esc_attr( $org_tel ) . '</span></div>';
426
+ }
427
+ if ( '' != trim( $org_street ) ) {
428
+ $organization .= 'Address :
429
+ <span rel="v:address">
430
+ <span typeof="v:Address">
431
+ <span property="v:street-address">' . esc_attr( $org_street ) . '</span>';
432
+ }
433
+ if ( '' != trim( $org_local ) ) {
434
+ $organization .= '<span property="v:locality">' . esc_attr( $org_local ) . '</span>';
435
+ }
436
+ if ( '' != trim( $org_region ) ) {
437
+ $organization .= '<span property="v:region">' . esc_attr( $org_region ) . '</span>';
438
+ }
439
+ if ( '' != trim( $org_zip ) ) {
440
+ $organization .= '<span property="v:postal-code">' . esc_attr( $org_zip ) . '</span>';
441
+ }
442
+ if ( '' != trim( $org_country ) ) {
443
+ $organization .= '<span property="v:country-name">' . esc_attr( $org_country ) . '</span>
444
+ </span>
445
+ </span>';
446
+ }
447
+ if ( '' != trim( $org_latitude ) ) {
448
+ $organization .= 'GEO Location :
449
+ <span rel="v:geo">
450
+ <span typeof="v:Geo">
451
+ <span property="v:latitude" content="' . esc_attr( $org_latitude ) . '">' . esc_attr( $org_latitude ) . '</span> - ';
452
+ }
453
+ if ( '' != trim( $org_longitude ) ) {
454
+ $organization .= '<span property="v:longitude" content="' . esc_attr( $org_longitude ) . '">' . esc_attr( $org_longitude ) . '</span>
455
+ </span>
456
+ </span>';
457
+ }
458
+ $organization .= '</div><div style="clear:both;"></div>';
459
+
460
+ return ( is_single() || is_page() ) ? $content . $organization : $content;
461
+ } elseif ( '5' == $type ) {
462
+ global $post;
463
+
464
+ $args_person = get_option( 'bsf_person' );
465
+
466
+ $people = '';
467
+
468
+ $people .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
469
+
470
+ if ( '' != $args_person['snippet_title'] ) {
471
+ $people .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_person['snippet_title'] ) ) . '</div>';
472
+ }
473
+ $people .= '<div itemscope itemtype="https://schema.org/Person"">';
474
+ $people_fn = get_post_meta( $post->ID, '_bsf_people_fn', true );
475
+ $people_nickname = get_post_meta( $post->ID, '_bsf_people_nickname', true );
476
+ $people_photo = get_post_meta( $post->ID, '_bsf_people_photo', true );
477
+ $people_job_title = get_post_meta( $post->ID, '_bsf_people_job_title', true );
478
+ $people_website = get_post_meta( $post->ID, '_bsf_people_website', true );
479
+ $people_company = get_post_meta( $post->ID, '_bsf_people_company', true );
480
+ $people_local = get_post_meta( $post->ID, '_bsf_people_local', true );
481
+ $people_region = get_post_meta( $post->ID, '_bsf_people_region', true );
482
+
483
+ $people_street = get_post_meta( $post->ID, '_bsf_people_street', true );
484
+ $people_postal = get_post_meta( $post->ID, '_bsf_people_postal', true );
485
+
486
+ if ( '' != trim( $people_photo ) ) {
487
+ $people .= '<div class="snippet-image"><img width="180" src="' . esc_url( $people_photo ) . '" itemprop="image" alt="Photo of' . esc_attr( $people_fn ) . '" /></div>';
488
+ } else {
489
+ $people .= '<script type="text/javascript">
490
+ jQuery(document).ready(function() {
491
+ jQuery(".snippet-label-img").addClass("snippet-clear");
492
+ });
493
+ </script>';
494
+ }
495
+ $people .= '<div class="aio-info">';
496
+ if ( '' != trim( $people_fn ) ) {
497
+ if ( '' != $args_person['person_name'] ) {
498
+ $people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_name'] ) ) . '</div> ';
499
+ }
500
+
501
+ $people .= '<div class="snippet-data-img"><span itemprop="name">' . esc_attr( $people_fn ) . '</span></div><div class="snippet-clear"></div>';
502
+ }
503
+ if ( '' != trim( $people_nickname ) ) {
504
+ if ( '' != $args_person['person_nickname'] ) {
505
+ $people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_nickname'] ) ) . '</div> ';
506
+ }
507
+ $people .= '<div class="snippet-data-img"> (<span itemprop="additionalName">' . esc_attr( $people_nickname ) . '</span>)</div><div class="snippet-clear"></div>';
508
+ }
509
+ if ( '' != trim( $people_website ) ) {
510
+ if ( '' != $args_person['person_website'] ) {
511
+ $people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_website'] ) ) . '</div> ';
512
+ }
513
+ $people .= '<div class="snippet-data-img"> <a href="' . esc_url( $people_website ) . '" itemprop="url">' . esc_attr( $people_website ) . '</a></div><div class="snippet-clear"></div>';
514
+ }
515
+ if ( '' != trim( $people_job_title ) ) {
516
+ if ( '' != $args_person['person_job_title'] ) {
517
+ $people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_job_title'] ) ) . '</div> ';
518
+ }
519
+ $people .= '<div class="snippet-data-img"> <span itemprop="jobTitle">' . esc_attr( $people_job_title ) . '</span></div><div class="snippet-clear"></div>';
520
+ }
521
+ if ( '' != trim( $people_company ) ) {
522
+ if ( '' != $args_person['person_company'] ) {
523
+ $people .= '<div itemprop="affiliation" itemscope itemtype="https://schema.org/Organization">';
524
+ }
525
+ $people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_company'] ) ) . '</div> ';
526
+ $people .= '<div class="snippet-data-img"> <span itemprop="name">' . esc_attr( $people_company ) . '</span></div><div class="snippet-clear"></div>';
527
+ $people .= '</div>';
528
+ }
529
+
530
+ if ( '' != trim( $people_street ) ) {
531
+ if ( '' != $args_person['person_address'] ) {
532
+ $people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_address'] ) ) . '</div> ';
533
+ }
534
+ $people .= '<div class="snippet-data-img">';
535
+ $people .= '<span itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">';
536
+ $people .= '<span itemprop="streetAddress">' . esc_attr( $people_street ) . '</span>,<br>';
537
+ if ( '' != trim( $people_local ) ) {
538
+ $people .= '<span itemprop="addressLocality">' . esc_attr( $people_local ) . '</span>, ';
539
+ }
540
+ if ( '' != trim( $people_region ) ) {
541
+ $people .= '<span itemprop="addressRegion">' . esc_attr( $people_region ) . '</span>, ';
542
+ }
543
+ if ( '' != trim( $people_postal ) ) {
544
+ $people .= '<span itemprop="postalCode">' . esc_attr( $people_postal ) . '</span>';
545
+ }
546
+ $people .= '</span>';
547
+ $people .= '</div>';
548
+ $people .= '<div class="snippet-clear"></div>';
549
+ }
550
+ $people .= '</div>
551
+ </div></div><div class="snippet-clear"></div>';
552
+ return ( is_single() || is_page() ) ? $content . $people : $content;
553
+ } elseif ( '6' == $type ) {
554
+ global $post;
555
+ $args_product = get_option( 'bsf_product' );
556
+ $product = '';
557
+ $product .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
558
+ if ( '' != $args_product['snippet_title'] ) {
559
+ $product .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_product['snippet_title'] ) );
560
+ }
561
+ $product .= bsf_do_rating();
562
+
563
+ $product .= '</div>';
564
+ $product .= '<div itemscope itemtype="https://schema.org/Product">';
565
+ $product_rating = get_post_meta( $post->ID, '_bsf_product_rating', true );
566
+ $product_brand = get_post_meta( $post->ID, '_bsf_product_brand', true );
567
+ $product_name = get_post_meta( $post->ID, '_bsf_product_name', true );
568
+ $product_image = get_post_meta( $post->ID, '_bsf_product_image', true );
569
+ $product_cat = get_post_meta( $post->ID, '_bsf_product_cat', true );
570
+ $product_price = get_post_meta( $post->ID, '_bsf_product_price', true );
571
+ $product_cur = get_post_meta( $post->ID, '_bsf_product_cur', true );
572
+ $product_status = get_post_meta( $post->ID, '_bsf_product_status', true );
573
+ if ( 'out_of_stock' == trim( $product_status ) ) {
574
+ $product_status = 'OutOfStock';
575
+ $availability = 'Out of Stock';
576
+ } elseif ( 'in_stock' == trim( $product_status ) ) {
577
+ $product_status = 'InStock';
578
+ $availability = 'Available in Stock';
579
+ } elseif ( 'instore_only' == trim( $product_status ) ) {
580
+ $product_status = 'InStoreOnly';
581
+ $availability = 'Available in Store Only';
582
+ } elseif ( 'preorder' == trim( $product_status ) ) {
583
+ $availability = 'Pre-Order Only';
584
+ }
585
+ if ( '' != trim( $product_image ) ) {
586
+ $product .= '<div class="snippet-image"><img width="180" src="' . esc_url( $product_image ) . '" itemprop="image" alt="product image" /></div>';
587
+ } else {
588
+ $product .= '<script type="text/javascript">
589
+ jQuery(document).ready(function() {
590
+ jQuery(".snippet-label-img").addClass("snippet-clear");
591
+ });
592
+ </script>';
593
+ }
594
+ $product .= '<div class="aio-info">';
595
+ if ( '' != trim( $product_rating ) ) {
596
+ if ( '' != $args_product['product_brand'] ) {
597
+ $product .= '<div class="snippet-label-img">' . $args_product['product_rating'] . '</div>';
598
+ }
599
+ $product .= '<div class="snippet-data-img"><span class="star-img">';
600
+ $ceil_product_rating = ceil( $product_rating );
601
+ for ( $i = 1; $i <= $ceil_product_rating; $i++ ) {
602
+ $product .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
603
+ }
604
+ for ( $j = 0; $j <= 5 - $ceil_product_rating; $j++ ) {
605
+ if ( $j ) {
606
+ $product .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
607
+ }
608
+ }
609
+ $product .= '</span></div><div class="snippet-clear"></div>';
610
+ }
611
+
612
+ $product .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">';
613
+ if ( '' != $args_product['product_agr'] ) {
614
+ $product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_agr'] ) ) . '</div>';
615
+ }
616
+ $product .= '<div class="snippet-data-img">';
617
+ $product .= '<span itemprop="ratingValue">' . average_rating() . '</span>';
618
+ $product .= ' based on <span class="rating-count" itemprop="reviewCount">' . rating_count() . '</span> votes </span></div></div><div class="snippet-clear"></div>';
619
+
620
+ if ( '' != trim( $product_brand ) ) {
621
+ if ( '' != $args_product['product_brand'] ) {
622
+ $product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_brand'] ) ) . '</div>';
623
+ }
624
+ $product .= ' <div class="snippet-data-img"> <span itemprop="brand">' . esc_attr( $product_brand ) . '</span></div><div class="snippet-clear"></div>';
625
+ }
626
+ if ( '' != trim( $product_name ) ) {
627
+ if ( '' != $args_product['product_name'] ) {
628
+ $product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_name'] ) ) . '</div>';
629
+ }
630
+ $product .= ' <div class="snippet-data-img"> <span itemprop="name">' . esc_attr( $product_name ) . '</span></div><div class="snippet-clear"></div>';
631
+ }
632
+
633
+ if ( '' != trim( $product_price ) ) {
634
+ if ( '' != $args_product['product_price'] ) {
635
+ $product .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="https://schema.org/Offer"><div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_price'] ) ) . '</div>';
636
+ }
637
+ $product .= '<div class="snippet-data-img">
638
+ <span itemprop="priceCurrency">' . esc_attr( $product_cur ) . '</span><span itemprop="price"> ' . esc_attr( $product_price ) . '</span></div>';
639
+
640
+ if ( '' != trim( $product_status ) ) {
641
+ if ( '' != $args_product['product_avail'] ) {
642
+ $product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_avail'] ) ) . '</div>';
643
+ }
644
+ $product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="' . esc_attr( $product_status ) . '">' . esc_attr( $availability ) . '</span></span></div><div class="snippet-clear"></div>';
645
+ }
646
+ $product .= '</div><div class="snippet-clear"></div>';
647
+ }
648
+ $product .= '</div>
649
+ </div></div><div class="snippet-clear"></div>';
650
+
651
+ return ( is_single() || is_page() ) ? $content . $product : $content;
652
+ } elseif ( '7' == $type ) {
653
+ global $post;
654
+ $recipe = '';
655
+
656
+ $recipe .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
657
+
658
+ $args_recipe = get_option( 'bsf_recipe' );
659
+
660
+ if ( '' != $args_recipe['snippet_title'] ) {
661
+ $recipe .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_recipe['snippet_title'] ) );
662
+ $recipe .= bsf_do_rating();
663
+ }
664
+ $recipe .= '</div>';
665
+ $recipe .= '<div itemscope itemtype="https://schema.org/Recipe">';
666
+ $recipes_name = get_post_meta( $post->ID, '_bsf_recipes_name', true );
667
+ $authors_name = get_post_meta( $post->ID, '_bsf_authors_name', true );
668
+ $recipes_preptime = get_post_meta( $post->ID, '_bsf_recipes_preptime', true );
669
+ $recipes_cooktime = get_post_meta( $post->ID, '_bsf_recipes_cooktime', true );
670
+ $recipes_totaltime = get_post_meta( $post->ID, '_bsf_recipes_totaltime', true );
671
+ $recipes_photo = get_post_meta( $post->ID, '_bsf_recipes_photo', true );
672
+ $recipes_desc = get_post_meta( $post->ID, '_bsf_recipes_desc', true );
673
+ $recipes_nutrition = get_post_meta( $post->ID, '_bsf_recipes_nutrition', true );
674
+ $recipes_ingredient = get_post_meta( $post->ID, '_bsf_recipes_ingredient', true );
675
+ $count = rating_count();
676
+ $agregate = average_rating();
677
+ if ( '' != trim( $recipes_photo ) ) {
678
+ $recipe .= '<div class="snippet-image"><img width="180" itemprop="image" src="' . esc_url( $recipes_photo ) . '" alt="recipe image"/><meta itemprop="image" content="' . esc_url( $recipes_photo ) . '"></div>';
679
+ } else {
680
+ $recipe .= '<script type="text/javascript">
681
+ jQuery(document).ready(function() {
682
+ jQuery(".snippet-label-img").addClass("snippet-clear");
683
+ });
684
+ </script>';
685
+ }
686
+ $recipe .= '<div class="aio-info">';
687
+ if ( '' != trim( $recipes_name ) ) {
688
+ if ( '' != $args_recipe['recipe_name'] ) {
689
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_name'] ) ) . '</div>';
690
+ }
691
+
692
+ $recipe .= '<div class="snippet-data-img"><span itemprop="name">' . esc_attr( $recipes_name ) . '</span></div>
693
+ <meta itemprop="description" content="' . esc_attr( htmlspecialchars_decode( $recipes_desc ) ) . '" >
694
+ <meta itemprop="recipeIngredient" content="' . esc_attr( $recipes_ingredient ) . '" >
695
+ <div itemprop="nutrition"
696
+ itemscope itemtype="https://schema.org/NutritionInformation">
697
+ <meta itemprop="calories" content="' . esc_attr( $recipes_nutrition ) . '" ></div>
698
+ <div class="snippet-clear"></div>';
699
+ }
700
+ if ( '' != trim( $authors_name ) ) {
701
+ if ( '' != $args_recipe['author_name'] ) {
702
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['author_name'] ) ) . '</div>';
703
+ }
704
+
705
+ $recipe .= '<div class="snippet-data-img"><span itemprop="author">' . esc_attr( $authors_name ) . '</span></div><div class="snippet-clear"></div>';
706
+ }
707
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_pub'] ) ) . ' </div><div class="snippet-data-img"><time datetime="' . get_the_time( 'c' ) . '" itemprop="datePublished">' . get_the_date( 'Y-m-d' ) . '</time></div><div class="snippet-clear"></div>';
708
+ if ( '' != trim( $recipes_preptime ) ) {
709
+ if ( '' != $args_recipe['recipe_prep'] ) {
710
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_prep'] ) ) . '</div>';
711
+ }
712
+ $recipe .= '<div class="snippet-data-img"> <time datetime="PT' . esc_attr( $recipes_preptime ) . '" itemprop="prepTime">' . esc_attr( $recipes_preptime ) . '</time></div><div class="snippet-clear"></div>';
713
+ }
714
+ if ( '' != trim( $recipes_cooktime ) ) {
715
+ if ( '' != $args_recipe['recipe_cook'] ) {
716
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_cook'] ) ) . '</div>';
717
+ }
718
+ $recipe .= '<div class="snippet-data-img"> <time datetime="PT' . esc_attr( $recipes_cooktime ) . '" itemprop="cookTime">' . esc_attr( $recipes_cooktime ) . '</time></div><div class="snippet-clear"></div> ';
719
+ }
720
+ if ( '' != trim( $recipes_totaltime ) ) {
721
+ if ( '' != $args_recipe['recipe_time'] ) {
722
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_time'] ) ) . '</div>';
723
+ }
724
+ $recipe .= '<div class="snippet-data-img"> <time datetime="PT' . esc_attr( $recipes_totaltime ) . '" itemprop="totalTime">' . esc_attr( $recipes_totaltime ) . '</time></div><div class="snippet-clear"></div>';
725
+ }
726
+ if ( '' != $args_recipe['recipe_rating'] && $count > 0 ) {
727
+ $recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_rating'] ) ) . '</div>';
728
+ $recipe .= ' <div class="snippet-data-img"> <span itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"><span itemprop="ratingValue" class="rating-value">' . esc_attr( $agregate ) . '</span><span class="star-img">';
729
+ $ceil_agregate = ceil( $agregate );
730
+ for ( $i = 1; $i <= $ceil_agregate; $i++ ) {
731
+ $recipe .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
732
+ }
733
+ for ( $j = 0; $j <= 5 - $ceil_agregate; $j++ ) {
734
+ if ( $j ) {
735
+ $recipe .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
736
+ }
737
+ }
738
+ $recipe .= '</span> Based on <span itemprop="reviewCount"><strong>' . esc_attr( $count ) . '</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';
739
+ }
740
+ $recipe .= '</div>
741
+ </div></div><div class="snippet-clear"></div>';
742
+
743
+ return ( is_single() || is_page() ) ? $content . $recipe : $content;
744
+ } elseif ( '8' == $type ) {
745
+ global $post;
746
+ $args_soft = get_option( 'bsf_software' );
747
+ $software = '';
748
+
749
+ $software .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
750
+ if ( '' != $args_soft['snippet_title'] ) {
751
+ $software .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_soft['snippet_title'] ) );
752
+ }
753
+
754
+ $software .= bsf_do_rating();
755
+ $software .= '</div>';
756
+
757
+ $software .= '<div itemscope itemtype="https://schema.org/SoftwareApplication">';
758
+ $software_rating = get_post_meta( $post->ID, '_bsf_software_rating', true );
759
+ $software_name = get_post_meta( $post->ID, '_bsf_software_name', true );
760
+ $software_desc = get_post_meta( $post->ID, '_bsf_software_desc', true );
761
+ $software_landing = get_post_meta( $post->ID, '_bsf_software_landing', true );
762
+ $software_image = get_post_meta( $post->ID, '_bsf_software_image', true );
763
+ $software_price = get_post_meta( $post->ID, '_bsf_software_price', true );
764
+ $software_cur = get_post_meta( $post->ID, '_bsf_software_cur', true );
765
+ $software_os = get_post_meta( $post->ID, '_bsf_software_os', true );
766
+ $software_cat = get_post_meta( $post->ID, '_bsf_software_cat', true );
767
+
768
+ if ( '' != trim( $software_image ) ) {
769
+ $software .= '<div class="snippet-image"><img width="180" src="' . esc_url( $software_image ) . '" itemprop="screenshot" alt="software image" /></div>';
770
+ } else {
771
+ $software .= '<script type="text/javascript">
772
+ jQuery(document).ready(function() {
773
+ jQuery(".snippet-label-img").addClass("snippet-clear");
774
+ });
775
+ </script>';
776
+ }
777
+ $software .= '<div class="aio-info">';
778
+
779
+ if ( '' != trim( $software_rating ) ) {
780
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_rating'] ) ) . '</div>';
781
+ $software .= '<div class="snippet-data-img"><span class="star-img">';
782
+ $ceil_software_rating = ceil( $software_rating );
783
+ for ( $i = 1; $i <= $ceil_software_rating; $i++ ) {
784
+ $software .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
785
+ }
786
+ for ( $j = 0; $j <= 5 - $ceil_software_rating; $j++ ) {
787
+ if ( $j ) {
788
+ $software .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
789
+ }
790
+ }
791
+ $software .= '</span></div><div class="snippet-clear"></div>';
792
+ }
793
+
794
+ $software .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">';
795
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_agr'] ) ) . '</div>';
796
+ $software .= '<div class="snippet-data-img">';
797
+ $software .= '<span itemprop="ratingValue">' . average_rating() . '</span>';
798
+ $software .= ' based on <span class="rating-count" itemprop="reviewCount">' . rating_count() . '</span> votes </span></div></div><div class="snippet-clear"></div>';
799
+
800
+ if ( '' != trim( $software_name ) ) {
801
+ if ( '' != $args_soft['software_name'] ) {
802
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_name'] ) ) . '</div>';
803
+ }
804
+ $software .= ' <div class="snippet-data-img"> <span itemprop="name">' . esc_attr( $software_name ) . '</span></div><div class="snippet-clear"></div>';
805
+ }
806
+ if ( '' != trim( $software_os ) ) {
807
+ if ( '' != $args_soft['software_os'] ) {
808
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_os'] ) ) . '</div>';
809
+ }
810
+ $software .= ' <div class="snippet-data-img"> <span itemprop="operatingSystem">' . esc_attr( $software_os ) . '</span></div><div class="snippet-clear"></div>';
811
+ }
812
+ if ( '' != trim( $software_cat ) ) {
813
+ $software .= '<div class="snippet-label-img">Software Category</div>';
814
+ $software .= ' <div class="snippet-data-img"> <span itemprop="applicationCategory">' . esc_attr( $software_cat ) . '</span></div><div class="snippet-clear"></div>';
815
+ }
816
+ if ( '' != trim( $software_price ) ) {
817
+ if ( '' != $args_soft['software_price'] ) {
818
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_price'] ) ) . '</div>';
819
+ }
820
+ $software .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
821
+ <span itemprop="priceCurrency">' . esc_attr( $software_cur ) . '</span> <span itemprop="price"> ' . esc_attr( $software_price ) . '</span></div><div class="snippet-clear"></div>';
822
+
823
+ }
824
+ if ( '' != trim( $software_desc ) ) {
825
+ if ( '' != $args_soft['software_desc'] ) {
826
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_desc'] ) ) . '</div>';
827
+ }
828
+ $software .= ' <div class="snippet-data-img"> <span itemprop="description">' . esc_attr( htmlspecialchars_decode( $software_desc ) ) . '</span></div><div class="snippet-clear"></div>';
829
+ }
830
+ if ( '' != trim( $software_landing ) ) {
831
+ if ( '' != $args_soft['software_website'] ) {
832
+ $software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_website'] ) ) . '</div>';
833
+ }
834
+ $software .= '<div class="snippet-data-img"> <a itemprop="featureList" href="' . esc_url( $software_landing ) . '">' . esc_attr( $software_landing ) . '</a></div><div class="snippet-clear"></div>';
835
+ }
836
+ $software .= '</div>
837
+ </div></div><div class="snippet-clear"></div>';
838
+
839
+ return ( is_single() || is_page() ) ? $content . $software : $content;
840
+ } elseif ( '9' == $type ) {
841
+ global $post;
842
+ $args_video = get_option( 'bsf_video' );
843
+ $video = '';
844
+
845
+ $video .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
846
+
847
+ if ( '' != $args_video['snippet_title'] ) {
848
+ $video .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_video['snippet_title'] ) ) . '</div>';
849
+ }
850
+ $video .= '<div itemprop="video" itemscope itemtype="https://schema.org/VideoObject">';
851
+ $video_title = get_post_meta( $post->ID, '_bsf_video_title', true );
852
+ $video_desc = get_post_meta( $post->ID, '_bsf_video_desc', true );
853
+ $video_thumb = get_post_meta( $post->ID, '_bsf_video_thumb', true );
854
+ $video_url = get_post_meta( $post->ID, '_bsf_video_url', true );
855
+ $video_emb_url = get_post_meta( $post->ID, '_bsf_video_emb_url', true );
856
+
857
+ $video_duration = get_post_meta( $post->ID, '_bsf_video_duration', true );
858
+ $video_date = get_post_meta( $post->ID, '_bsf_video_date', true );
859
+ if ( '' != trim( $video_url ) ) {
860
+ $video .= '<div class="snippet-image"><a href="' . esc_url( $video_url ) . '"><img width="180" src="' . esc_url( $video_thumb ) . '" alt="' . esc_attr( $video_title ) . '"></a></div>';
861
+ } elseif ( '' != trim( $video_emb_url ) ) {
862
+ $video .= '<div class="snippet-image"><a href="' . esc_url( $video_emb_url ) . '"><img width="180" src="' . esc_url( $video_thumb ) . '" " alt="' . esc_attr( $video_title ) . '"></a></div>';
863
+ } else {
864
+ $video .= '<script type="text/javascript">
865
+ jQuery(document).ready(function() {
866
+ jQuery(".snippet-label-img").addClass("snippet-clear");
867
+ });
868
+ </script>';
869
+ }
870
+ $video .= '<div class="aio-info" style="padding-top:10px">';
871
+ if ( '' != trim( $video_title ) ) {
872
+ if ( '' != $args_video['video_title'] ) {
873
+ $video .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_video['video_title'] ) ) . '</div>';
874
+ }
875
+
876
+ $video .= '<div class="snippet-data-img"><span itemprop="name">' . esc_attr( $video_title ) . '</span></div><div class="snippet-clear"></div>';
877
+ }
878
+ if ( '' != trim( $video_desc ) ) {
879
+ if ( '' != $args_video['video_desc'] ) {
880
+ $video .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_video['video_desc'] ) ) . '</div>';
881
+ }
882
+ $video .= '<div class="snippet-data-img"> <p itemprop="description">' . esc_attr( htmlspecialchars_decode( $video_desc ) ) . '</p></div><div class="snippet-clear"></div>';
883
+ }
884
+ if ( '' != trim( $video_thumb ) ) {
885
+ $video .= '<meta itemprop="thumbnailUrl" content="' . esc_attr( $video_thumb ) . '">';
886
+ }
887
+ if ( '' != trim( $video_url ) ) {
888
+ $video .= '<meta itemprop="contentUrl" content="' . esc_attr( $video_url ) . '">';
889
+ } elseif ( '' != trim( $video_emb_url ) ) {
890
+ $video .= '<meta itemprop="embedURL" content="' . esc_attr( $video_emb_url ) . '">';
891
+ }
892
+ if ( '' != trim( $video_duration ) ) {
893
+ $video .= '<meta itemprop="duration" content="' . esc_attr( $video_duration ) . '">';
894
+ }
895
+ if ( '' != trim( $video_date ) ) {
896
+ $video .= '<meta itemprop="uploadDate" content="' . esc_attr( $video_date ) . '">';
897
+ }
898
+ $video .= '</div>
899
+ </div></div><div class="snippet-clear"></div>';
900
+
901
+ return ( is_single() || is_page() ) ? $content . $video : $content;
902
+ } elseif ( '10' == $type ) {
903
+ global $post;
904
+ $article = '';
905
+ $args_article = get_option( 'bsf_article' );
906
+ $article_title = get_post_meta( $post->ID, '_bsf_article_title', true );
907
+ $article_name = get_post_meta( $post->ID, '_bsf_article_name', true );
908
+ $article_desc = get_post_meta( $post->ID, '_bsf_article_desc', true );
909
+ $article_image = get_post_meta( $post->ID, '_bsf_article_image', true );
910
+ $article_author = get_post_meta( $post->ID, '_bsf_article_author', true );
911
+ $article_publisher = get_post_meta( $post->ID, '_bsf_article_publisher', true );
912
+ $article_publisher_logo = get_post_meta( $post->ID, '_bsf_article_publisher_logo', true );
913
+
914
+ $article .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
915
+ if ( '' != $args_article['snippet_title'] ) {
916
+ $article .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_article['snippet_title'] ) );
917
+ $article .= '</div>';
918
+ }
919
+ $article .= '<div itemscope itemtype="https://schema.org/Article">';
920
+ if ( '' != trim( $article_image ) ) {
921
+ $article .= '<div class="snippet-image" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
922
+ $article .= '<img width="180" src="' . esc_url( $article_image ) . '" alt="' . esc_attr( $article_name ) . '"/>';
923
+ $article .= '<meta itemprop="url" content="' . esc_attr( $article_image ) . '">';
924
+ $article .= '</div>';
925
+ } else {
926
+ $article .= '<script type="text/javascript">
927
+ jQuery(document).ready(function() {
928
+ jQuery(".snippet-label-img").addClass("snippet-clear");
929
+ });
930
+ </script>';
931
+ }
932
+ $article .= '<div class="aio-info">';
933
+ if ( '' != trim( $article_name ) ) {
934
+ if ( '' != $args_article['article_name'] ) {
935
+ $article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_name'] ) ) . '</div>';
936
+ }
937
+
938
+ $article .= '<div class="snippet-data-img"><span itemprop="headline">' . esc_attr( $article_name ) . '</span></div><div class="snippet-clear"></div>';
939
+ }
940
+ if ( '' != trim( $article_desc ) ) {
941
+ if ( '' != $args_article['article_desc'] ) {
942
+ $article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_desc'] ) ) . '</div>';
943
+ }
944
+
945
+ $article .= '<div class="snippet-data-img"><span itemprop="description">' . esc_attr( htmlspecialchars_decode( $article_desc ) ) . '</span></div><div class="snippet-clear"></div>';
946
+ }
947
+ if ( '' != trim( $article_author ) ) {
948
+ if ( '' != $args_article['article_author'] ) {
949
+ $article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_author'] ) ) . '</div>';
950
+ }
951
+
952
+ $article .= '<div class="snippet-data-img" itemprop="author" itemscope itemtype="https://schema.org/Person">
953
+ <span itemprop="name">' . esc_attr( $article_author ) . '</span>
954
+ </div>
955
+ <div class="snippet-clear"></div>';
956
+
957
+ }
958
+ if ( '' != trim( $article_publisher ) ) {
959
+ if ( '' != $args_article['article_publisher'] ) {
960
+
961
+ $article .= '<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
962
+ }
963
+
964
+ $article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_publisher'] ) ) . '</div>';
965
+
966
+ $article .= '<div class="snippet-data-img">
967
+ <span itemprop="name">' . esc_attr( $article_publisher ) . '</span>
968
+ </div>
969
+
970
+
971
+ <div class="snippet-clear"></div>';
972
+ if ( '' != trim( $article_publisher_logo ) ) {
973
+ if ( '' != $args_article['article_publisher_logo'] ) {
974
+ $article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_publisher_logo'] ) ) . '</div>';
975
+ }
976
+
977
+ $article .= '<div class="snippet-data-img publisher-logo" itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
978
+ $article .= '<img width="180" src="' . esc_url( $article_publisher_logo ) . '" alt="' . esc_attr( $article_publisher ) . '" />';
979
+ $article .= '<meta itemprop="url" content="' . esc_attr( $article_publisher_logo ) . '">';
980
+ $article .= '</div>';
981
+ }
982
+
983
+ $article .= '</div>';
984
+ }
985
+
986
+ $article .= '<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="' . get_permalink() . '"/>';
987
+ $article .= '<meta itemprop="datePublished" content="' . get_the_time( 'c' ) . '"/>';
988
+ $article .= '<meta itemprop="dateModified" content="' . get_the_modified_time( 'c' ) . '"/>';
989
+
990
+ $article .= '</div>
991
+ </div></div><div class="snippet-clear"></div>';
992
+
993
+ return ( is_single() || is_page() ) ? $content . $article : $content;
994
+ } elseif ( '11' == $type ) {
995
+ global $post;
996
+ $service = '';
997
+ $args_service = get_option( 'bsf_service' );
998
+ $service_type = get_post_meta( $post->ID, '_bsf_service_type', true );
999
+ $service_area = get_post_meta( $post->ID, '_bsf_service_area', true );
1000
+ $service_desc = get_post_meta( $post->ID, '_bsf_service_desc', true );
1001
+ $service_image = get_post_meta( $post->ID, '_bsf_service_image', true );
1002
+ $service_provider_name = get_post_meta( $post->ID, '_bsf_service_provider', true );
1003
+ $service_street = get_post_meta( $post->ID, '_bsf_service_street', true );
1004
+ $service_local = get_post_meta( $post->ID, '_bsf_service_local', true );
1005
+ $service_region = get_post_meta( $post->ID, '_bsf_service_region', true );
1006
+ $service_postal_code = get_post_meta( $post->ID, '_bsf_service_postal_code', true );
1007
+ $service_provider_location_image = get_post_meta( $post->ID, '_bsf_provider_location_image', true );
1008
+ $service_telephone = get_post_meta( $post->ID, '_bsf_service_telephone', true );
1009
+ $service_price = get_post_meta( $post->ID, '_bsf_service_price', true );
1010
+ $service_cur = get_post_meta( $post->ID, '_bsf_service_cur', true );
1011
+ $service_channel = get_permalink( $post->ID );
1012
+ $service_url_link = '' != $args_service['service_url_link'] ? $args_service['service_url_link'] : 'Click Here For More Info';
1013
+
1014
+ $service .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
1015
+ if ( '' != $args_service['snippet_title'] ) {
1016
+ $service .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_service['snippet_title'] ) );
1017
+ $service .= '</div>';
1018
+ }
1019
+ $service .= '<div itemscope itemtype="https://schema.org/Service">';
1020
+ if ( '' != trim( $service_image ) ) {
1021
+ $service .= '<div class="snippet-image">';
1022
+ $service .= '<img itemprop="image" width="180" src="' . esc_url( $service_image ) . '" alt="' . esc_attr( $service_type ) . '"/>';
1023
+ $service .= '</div>';
1024
+ } else {
1025
+ $service .= '<script type="text/javascript">
1026
+ jQuery(document).ready(function() {
1027
+ jQuery(".snippet-label-img").addClass("snippet-clear");
1028
+ });
1029
+ </script>';
1030
+ }
1031
+ $service .= '<div class="aio-info">';
1032
+
1033
+ if ( '' != trim( $service_type ) ) {
1034
+ if ( '' != $args_service['service_type'] ) {
1035
+ $service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_type'] ) ) . '</div>';
1036
+ }
1037
+
1038
+ $service .= '<div class="snippet-data-img">
1039
+ <span itemprop="serviceType">' . esc_attr( $service_type ) . '</span>
1040
+ </div>
1041
+ <div class="snippet-clear"></div>';
1042
+ }
1043
+
1044
+ if ( '' != trim( $service_provider_name ) ) {
1045
+ if ( '' != $args_service['service_provider_name'] ) {
1046
+ $service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_provider_name'] ) ) . '</div>';
1047
+ }
1048
+
1049
+ $service .= '<div class="snippet-data-img" itemprop="provider" itemscope itemtype="https://schema.org/LocalBusiness">
1050
+ <meta itemprop="image" content="' . esc_attr( $service_provider_location_image ) . '"/>
1051
+ <span itemprop="name">' . esc_attr( $service_provider_name ) . '</span>,';
1052
+ if ( '' != trim( $service_street ) ) {
1053
+ $service .= '<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
1054
+ <span itemprop="streetAddress">' . esc_attr( $service_street ) . '</span>,';
1055
+ }
1056
+ if ( '' != trim( $service_local ) ) {
1057
+ $service .= '<span itemprop="addressLocality">' . esc_attr( $service_local ) . '</span>,';
1058
+ }
1059
+ if ( '' != trim( $service_region ) ) {
1060
+ $service .= '<span itemprop="addressRegion">' . esc_attr( $service_region ) . '</span>-';
1061
+ }
1062
+ if ( '' != trim( $service_postal_code ) ) {
1063
+ $service .= '<span itemprop="postalCode">' . esc_attr( $service_postal_code ) . '</span>,<br/>';
1064
+ }
1065
+ if ( '' != trim( $service_telephone ) ) {
1066
+ $service .= '<span itemprop="telephone"> Telephone No.' . esc_attr( $service_telephone ) . '</span>';
1067
+ }
1068
+ $service .= '</div>';
1069
+ $service .= '</div>
1070
+ <div class="snippet-clear"></div>';
1071
+ }
1072
+
1073
+ if ( '' != trim( $service_area ) ) {
1074
+ if ( '' != $args_service['service_area'] ) {
1075
+ $service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_area'] ) ) . '</div>';
1076
+ }
1077
+
1078
+ $service .= '<div class="snippet-data-img" itemprop="areaServed" itemscope itemtype="https://schema.org/State">
1079
+ <span itemprop="name">' . esc_attr( $service_area ) . '</span>
1080
+ </div><div class="snippet-clear"></div>';
1081
+ }
1082
+
1083
+ if ( '' != trim( $service_desc ) ) {
1084
+ if ( '' != $args_service['service_desc'] ) {
1085
+ $service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_desc'] ) ) . '</div>';
1086
+ }
1087
+
1088
+ $service .= '<div class="snippet-data-img"><span itemprop="description">' . esc_attr( htmlspecialchars_decode( $service_desc ) ) . '</span></div><div class="snippet-clear"></div>';
1089
+ }
1090
+
1091
+ if ( '' != trim( $service_channel ) ) {
1092
+ if ( '' != $args_service['service_channel'] ) {
1093
+
1094
+ $service .= '<div class="snippet-data-img" itemprop="availableChannel" itemscope itemtype="https://schema.org/ServiceChannel">
1095
+
1096
+ <meta itemprop="URL" href="' . esc_url( $service_channel ) . '">
1097
+ </div><div class="snippet-clear"></div>';
1098
+ }
1099
+ }
1100
+
1101
+ $service .= '</div></div></div><div class="snippet-clear"></div>';
1102
+
1103
+ return ( is_single() || is_page() ) ? $content . $service : $content;
1104
+ } else {
1105
+ return $content;
1106
+ }
1107
+ }
1108
+
1109
+
1110
+ add_filter( 'the_content', 'display_rich_snippet', 90 );
1111
+
1112
+
1113
+ require_once plugin_dir_path( __FILE__ ) . 'meta-boxes.php';
1114
+ /**
1115
+ * Get_the_ip.
1116
+ */
1117
+ function get_the_ip() {
1118
+ if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
1119
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
1120
+ } elseif ( isset( $_SERVER['HTTP_CLIENT_IP'] ) ) {
1121
+ return $_SERVER['HTTP_CLIENT_IP'];
1122
+ } else {
1123
+ return $_SERVER['REMOTE_ADDR'];
1124
+ }
1125
+ }
1126
+ /**
1127
+ * Average_rating.
1128
+ */
1129
+ function average_rating() {
1130
+ global $post;
1131
+
1132
+ $data = get_post_meta( $post->ID, 'post-rating', false );
1133
+ $post_id = $post->ID;
1134
+ if ( ! empty( $data ) ) {
1135
+ $counter = 0;
1136
+
1137
+ $average_rating = 0;
1138
+ foreach ( $data as $d ) {
1139
+ $rating = $d['user_rating'];
1140
+
1141
+ $average_rating = $average_rating + $rating;
1142
+
1143
+ $counter++;
1144
+
1145
+ }
1146
+ // round the average to the nearast 1/2 point.
1147
+ return ( round( ( $average_rating / $counter ) * 2, 0 ) / 2 );
1148
+
1149
+ } else {
1150
+ // no ratings.
1151
+ return 'no rating';
1152
+ }
1153
+ }
1154
+ /**
1155
+ * Rating_count.
1156
+ */
1157
+ function rating_count() {
1158
+ global $post;
1159
+
1160
+ $data = get_post_meta( $post->ID, 'post-rating', false );
1161
+ return count( $data );
1162
+ }
1163
+ /**
1164
+ * Bsf_do_rating.
1165
+ */
1166
+ function bsf_do_rating() {
1167
+ global $post;
1168
+ $ip = get_the_ip();
1169
+
1170
+ $ip_array = array();
1171
+
1172
+ $data = get_post_meta( $post->ID, 'post-rating', false );
1173
+ if ( ! empty( $data ) ) {
1174
+ foreach ( $data as $d ) {
1175
+ array_push( $ip_array, $d['user_ip'] );
1176
+ }
1177
+ if ( ! in_array( $ip, $ip_array ) ) {
1178
+ return display_rating();
1179
+ } elseif ( in_array( $ip, $ip_array ) ) {
1180
+ $rating = get_previous_rating( $ip, $data );
1181
+
1182
+ $stars = bsf_display_rating( $rating );
1183
+ return $stars;
1184
+ }
1185
+ } else {
1186
+ return display_rating();
1187
+ }
1188
+ }
1189
+ /**
1190
+ * Get_previous_rating.
1191
+ *
1192
+ * @param string $needle Needle.
1193
+ * @param array $haystack Haystack.
1194
+ * @param bool $strict Strict.
1195
+ */
1196
+ function get_previous_rating( $needle, $haystack, $strict = false ) {
1197
+ foreach ( $haystack as $item ) {
1198
+ if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && get_previous_rating( $needle, $item, $strict ) ) ) {
1199
+ return ! empty( $item['user_rating'] ) ? esc_attr( $item['user_rating'] ) : '';
1200
+ }
1201
+ }
1202
+ return false;
1203
+ }
1204
+ /**
1205
+ * Add_ajax_library.
1206
+ */
1207
+ function add_ajax_library() {
1208
+
1209
+ $html = '<script type="text/javascript">';
1210
+ $html .= 'var ajaxurl = "' . esc_url( admin_url( 'admin-ajax.php' ) ) . '";';
1211
+ $html .= '</script>';
1212
+
1213
+ echo $html; //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
1214
+ }
1215
+ /**
1216
+ * Bsf_add_rating.
1217
+ */
1218
+ function bsf_add_rating() {
1219
+
1220
+ if ( ! isset( $_POST['bsf_rating_nonce'] ) || ! wp_verify_nonce( $_POST['bsf_rating_nonce'], 'bsf_rating' ) ) {
1221
+
1222
+ return;
1223
+ }
1224
+
1225
+ if ( isset( $_POST['star-review'] ) ) {
1226
+ $stars = esc_attr( $_POST['star-review'] );
1227
+ } else {
1228
+ $stars = '0';
1229
+ }
1230
+
1231
+ $ip = esc_attr( $_POST['ip'] );
1232
+
1233
+ $postid = esc_attr( $_POST['post_id'] );
1234
+
1235
+ $user_rating = array(
1236
+ 'post_id' => $postid,
1237
+ 'user_ip' => $ip,
1238
+ 'user_rating' => $stars,
1239
+ );
1240
+
1241
+ echo false == add_post_meta( $postid, 'post-rating', $user_rating ) ? esc_html_e( 'Error adding your rating', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Ratings added successfully !', 'all-in-one-schemaorg-rich-snippets' );
1242
+ die();
1243
+ }
1244
+ /**
1245
+ * Bsf_update_rating.
1246
+ */
1247
+ function bsf_update_rating() {
1248
+
1249
+ if ( ! isset( $_POST['bsf_rating_nonce'] ) || ! wp_verify_nonce( $_POST['bsf_rating_nonce'], 'bsf_rating' ) ) {
1250
+
1251
+ return;
1252
+ }
1253
+ if ( isset( $_POST['star-review'] ) ) {
1254
+ $stars = esc_attr( $_POST['star-review'] );
1255
+ } else {
1256
+ $stars = '0';
1257
+ }
1258
+
1259
+ $ip = esc_attr( $_POST['ip'] );
1260
+
1261
+ $postid = esc_attr( $_POST['post_id'] );
1262
+
1263
+ $prev_data = get_post_meta( $postid, 'post-rating', true );
1264
+
1265
+ $user_rating = array(
1266
+ 'post_id' => $postid,
1267
+ 'user_ip' => $ip,
1268
+ 'user_rating' => $stars,
1269
+ );
1270
+
1271
+ echo false == update_post_meta( $postid, 'post-rating', $user_rating, $prev_data ) ? esc_html_e( 'Error updating your rating', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Ratings updated successfully !', 'all-in-one-schemaorg-rich-snippets' );
1272
+ die();
1273
+ }
1274
+ /**
1275
+ * Display_rating.
1276
+ */
1277
+ function display_rating() {
1278
+
1279
+ global $post;
1280
+ $rating = '<span class="ratings"><div class="star-blocks">';
1281
+ $rating .= '<form name="rating" method="post" action="' . get_permalink() . '" id="bsf-rating" onsubmit="return false;">';
1282
+ $rating .= wp_nonce_field( 'bsf_rating', 'bsf_rating_nonce', true, false );
1283
+ $rating .= '<input type="radio" name="star-review" class="star star-1" value="1"/>';
1284
+ $rating .= '<input type="radio" name="star-review" class="star star-2" value="2"/>';
1285
+ $rating .= '<input type="radio" name="star-review" class="star star-3" value="3"/>';
1286
+ $rating .= '<input type="radio" name="star-review" class="star star-4" value="4"/>';
1287
+ $rating .= '<input type="radio" name="star-review" class="star star-5" value="5"/>';
1288
+ $rating .= '<input type="hidden" name="ip" value="' . get_the_ip() . '" />';
1289
+ $rating .= '<input type="hidden" name="post_id" value="' . $post->ID . '" />';
1290
+ $rating .= '</form>';
1291
+ $rating .= '</div></span>';
1292
+ $script = '<script type="text/javascript">
1293
+ jQuery("#bsf-rating").click(function()
1294
+ {
1295
+ var data = jQuery("#bsf-rating").serialize();
1296
+ var form_data = "action=bsf_submit_rating&" + data;
1297
+ // alert(form_data);
1298
+ jQuery.post(ajaxurl, form_data,
1299
+ function (response) {
1300
+ alert(response);
1301
+ window.location.href = window.location.href;
1302
+ }
1303
+ );
1304
+ });
1305
+ </script>
1306
+ ';
1307
+ $rating .= $script;
1308
+ return $rating;
1309
+ }
1310
+ /**
1311
+ * Bsf_display_rating.
1312
+ *
1313
+ * @param string $n N.
1314
+ */
1315
+ function bsf_display_rating( $n ) {
1316
+
1317
+ global $post;
1318
+ $rating = '<span class="ratings"><div class="star-blocks">';
1319
+ $rating .= '<form name="rating" method="post" action="' . get_permalink() . '" id="bsf-rating" onsubmit="return false;">';
1320
+ $rating .= wp_nonce_field( 'bsf_rating', 'bsf_rating_nonce', true, false );
1321
+ $rating .= '<input type="radio" name="star-review" class="star star-1" value="1" ';
1322
+ 1 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
1323
+ $rating .= '<input type="radio" name="star-review" class="star star-2" value="2" ';
1324
+ 2 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
1325
+ $rating .= '<input type="radio" name="star-review" class="star star-3" value="3" ';
1326
+ 3 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
1327
+ $rating .= '<input type="radio" name="star-review" class="star star-4" value="4" ';
1328
+ 4 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
1329
+ $rating .= '<input type="radio" name="star-review" class="star star-5" value="5" ';
1330
+ 5 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
1331
+ $rating .= '<input type="hidden" name="ip" value="' . get_the_ip() . '" />';
1332
+ $rating .= '<input type="hidden" name="post_id" value="' . $post->ID . '" />';
1333
+ $rating .= '</form>';
1334
+ $rating .= '</div></span>';
1335
+ $script = '<script type="text/javascript">
1336
+ jQuery("#bsf-rating").click(function()
1337
+ {
1338
+ var data = jQuery("#bsf-rating").serialize();
1339
+ var form_data = "action=bsf_update_rating&" + data;
1340
+ // alert(form_data);
1341
+ jQuery.post(ajaxurl, form_data,
1342
+ function (response) {
1343
+ alert(response);
1344
+ window.location.href = window.location.href;
1345
+ }
1346
+ );
1347
+ });
1348
+ </script>
1349
+ ';
1350
+ $rating .= $script;
1351
+ return $rating;
1352
+ }
index.php CHANGED
@@ -1,316 +1,378 @@
1
- <?php
2
- /*
3
- Plugin Name: Schema - All In One Schema Rich Snippets
4
- Plugin URI: https://www.brainstormforce.com
5
- Author: Brainstorm Force
6
- Author URI: https://www.brainstormforce.com
7
- Description: Welcome to the Schema - All In One Schema Rich Snippets! You can now easily add schema markup on various pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services etc.
8
- Version: 1.6.0
9
- Text Domain: rich-snippets
10
- License: GPL2
11
- */
12
- /* Copyright 2013 Schema - All In One Schema Rich Snippets (email : info@bsf.io)
13
- This program is free software; you can redistribute it and/or modify
14
- it under the terms of the GNU General Public License, version 2, as
15
- published by the Free Software Foundation.
16
- This program is distributed in the hope that it will be useful,
17
- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- GNU General Public License for more details.
20
- You should have received a copy of the GNU General Public License
21
- along with this program; if not, write to the Free Software
22
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
- */
24
- if ( !class_exists( "RichSnippets" ) )
25
- {
26
- class RichSnippets
27
- {
28
- function __construct() // Constructor
29
- {
30
- register_activation_hook(__FILE__, array($this, 'register_bsf_settings'));
31
- add_action('admin_init', array( $this, 'aiosrs_admin_redirect') );
32
- add_action( 'admin_head', array( $this, 'star_icons') );
33
- // Add Admin Menu
34
- add_action('admin_menu', array( $this, 'register_custom_menu_page') );
35
- add_action( 'admin_init', array( $this, 'set_styles' ));
36
-
37
- add_action( 'admin_init', array( $this, 'bsf_color_scripts' ));
38
-
39
- add_filter('plugins_loaded', array( $this, 'rich_snippet_translation'));
40
- add_action( 'admin_enqueue_scripts', array( $this, 'post_enqueue') );
41
- add_action( 'admin_enqueue_scripts', array( $this, 'post_new_enqueue') );
42
- $plugin = plugin_basename(__FILE__);
43
- add_filter("plugin_action_links_$plugin", array( $this,'bsf_settings_link') );
44
- add_action( 'wp_ajax_bsf_submit_request', array( $this, 'submit_request') );
45
-
46
- add_action( 'wp_ajax_bsf_submit_color', array( $this, 'submit_color') );
47
- // Admin bar menu
48
- add_action( 'admin_bar_menu', array( $this, "aiosrs_admin_bar" ),100 );
49
- }
50
-
51
- // admin bar menu
52
- function aiosrs_admin_bar()
53
- {
54
- global $wp_admin_bar;
55
- $actual_link = esc_url( "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" );
56
- if ( ! is_super_admin() || ! is_admin_bar_showing() )
57
- return;
58
- if(!is_admin())
59
- {
60
- $wp_admin_bar->add_menu( array(
61
- 'id' => 'aiosrs',
62
- 'title' => 'Test Rich Snippets',
63
- 'href' => 'https://search.google.com/structured-data/testing-tool#url='. $actual_link,
64
- 'meta' => array('target' => '_blank'),
65
- ) );
66
- }
67
- }
68
- function register_custom_menu_page()
69
- {
70
- require_once(plugin_dir_path( __FILE__ ).'admin/index.php');
71
- $page = add_menu_page('All in One Rich Snippets Dashboard', 'Rich Snippets', 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div');
72
- //Call the function to print the stylesheets and javascripts in only this plugins admin area
73
- add_action( 'admin_print_styles-' . $page, 'bsf_admin_styles' );
74
- add_action('admin_print_scripts-' . $page, array( $this, 'iris_enqueue_scripts' ) );
75
- }
76
- // Add settings link on plugin page
77
- function bsf_settings_link($links) {
78
- $settings_link = '<a href="admin.php?page=rich_snippet_dashboard">Settings</a>';
79
- array_unshift($links, $settings_link);
80
- return $links;
81
- }
82
- //print the star rating style on post edit page
83
- function post_enqueue($hook) {
84
- if( 'post.php' != $hook )
85
- return;
86
- $current_admin_screen = get_current_screen();
87
- $exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
88
- if ( in_array( $current_admin_screen->post_type, $exclude_custom_post_type ) )
89
- return;
90
- wp_enqueue_script( 'jquery' );
91
- wp_enqueue_script( 'bsf_jquery_star' );
92
- wp_enqueue_script( 'bsf_toggle' );
93
- wp_enqueue_style( 'star_style' );
94
- wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js','', '0.9.1' );
95
- wp_enqueue_script( 'bsf-scripts' );
96
- wp_enqueue_media();
97
- wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
98
- wp_enqueue_script( 'bsf-scripts-media' );
99
- wp_enqueue_script('jquery-ui-datepicker');
100
- if(!function_exists('vc_map'))
101
- wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
102
- }
103
- function post_new_enqueue($hook) {
104
- if('post-new.php' != $hook )
105
- return;
106
- $current_admin_screen = get_current_screen();
107
- $exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
108
- if ( in_array( $current_admin_screen->post_type, $exclude_custom_post_type ) )
109
- return;
110
- wp_enqueue_script( 'jquery' );
111
- wp_enqueue_script( 'bsf_jquery_star' );
112
- wp_enqueue_script( 'bsf_toggle' );
113
- wp_enqueue_style( 'star_style' );
114
- wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
115
- wp_enqueue_script( 'bsf-scripts' );
116
- wp_enqueue_media();
117
- wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
118
- wp_enqueue_script( 'bsf-scripts-media' );
119
- wp_enqueue_script('jquery-ui-datepicker');
120
- if(!function_exists('vc_map'))
121
- wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
122
- }
123
- //Initialize the metabox class
124
- function wp_initialize_bsf_meta_boxes() {
125
- if ( ! class_exists( 'bsf_Meta_Box' ) )
126
- require_once(plugin_dir_path( __FILE__ ) . 'init.php');
127
- }
128
- function set_styles() {
129
- wp_register_style( 'star_style', plugins_url('/css/jquery.rating.css', __FILE__) );
130
- wp_register_style( 'meta_style', plugins_url('admin/css/style.css', __FILE__) );
131
-
132
- wp_register_style( 'admin_style', plugins_url('admin/css/admin.css', __FILE__) );
133
- wp_register_script( 'bsf_jquery_star', plugins_url('/js/jquery.rating.min.js', __FILE__) );
134
- wp_register_script( 'bsf_toggle', plugins_url('/js/toggle.js', __FILE__) );
135
- }
136
- // Define icon styles for the custom post type
137
- function star_icons() {
138
- ?>
139
- <style>
140
- #toplevel_page_rich_snippet_dashboard .wp-menu-image {
141
- background: url(<?php echo plugins_url('/images/star.png',__FILE__); ?>) no-repeat !important;
142
- }
143
- #toplevel_page_rich_snippet_dashboard:hover .wp-menu-image, #toplevel_page_rich_snippet_dashboard.wp-has-current-submenu .wp-menu-image {
144
- background: url(<?php echo plugins_url('/images/star.png',__FILE__); ?>) no-repeat 0 -32px !important;
145
- }
146
- #toplevel_page_rich_snippet_dashboard .current .wp-menu-image, #toplevel_page_rich_snippet_dashboard.wp-has-current-submenu .wp-menu-image {
147
- background: url(<?php echo plugins_url('/images/star.png',__FILE__); ?>) no-repeat 0 -32px !important;
148
- }
149
- #star-icons-32.icon32 {background: url(<?php echo plugins_url('/images/gray-32.png',__FILE__); ?>) no-repeat;}
150
- </style>
151
- <?php }
152
- /* Translation */
153
- function rich_snippet_translation()
154
- {
155
-
156
- // Load Translation File
157
- load_plugin_textdomain('rich-snippets', false, basename( dirname( __FILE__ ) ) . '/lang/' );
158
- }
159
- function register_bsf_settings() {
160
- require_once(plugin_dir_path( __FILE__ ).'settings.php');
161
- add_woo_commerce_option();
162
- add_review_option();
163
- add_event_option();
164
- add_person_option();
165
- add_product_option();
166
- add_recipe_option();
167
- add_software_option();
168
- add_video_option();
169
- add_article_option();
170
- add_service_option();
171
- add_color_option();
172
- add_option('aisrs_do_activation_redirect', true);
173
-
174
- }
175
- function aiosrs_admin_redirect() {
176
- $main_url = esc_url(admin_url());
177
- if (get_option('aisrs_do_activation_redirect', false)) {
178
- delete_option('aisrs_do_activation_redirect');
179
- wp_redirect($main_url.'/admin.php?page=rich_snippet_dashboard#tab-5');
180
- }
181
- }
182
- function submit_request()
183
- {
184
- $to = "Brainstorm Force <support@bsf.io>";
185
- $from = sanitize_email( $_POST['email'] );
186
- $site = esc_url( $_POST['site_url'] );
187
- $sub = sanitize_text_field( $_POST['subject'] );
188
- $message = esc_html( $_POST['message'] );
189
- $name = sanitize_text_field( $_POST['name'] );
190
- $post_url = esc_url( $_POST['post_url'] );
191
-
192
- if($sub == "question")
193
- $subject = "[AIOSRS] New question received from ".$name;
194
- else if($sub == "bug")
195
- $subject = "[AIOSRS] New bug found by ".$name;
196
- else if($sub == "help")
197
- $subject = "[AIOSRS] New help request received from ".$name;
198
- else if($sub == "professional")
199
- $subject = "[AIOSRS] New service quote request received from ".$name;
200
- else if($sub == "contribute")
201
- $subject = "[AIOSRS] New development contribution request by ".$name;
202
- else if($sub == "other")
203
- $subject = "[AIOSRS] New contact request received from ".$name;
204
-
205
- $html = '
206
- <html>
207
- <head>
208
- <title>All in One Schema.org Rich Snippets</title>
209
- </head>
210
- <body>
211
- <table width="100%" cellpadding="10" cellspacing="10">
212
- <tr>
213
- <th colspan="2"> All in One Schema.org Rich Snippets Support</th>
214
- </tr>
215
- <tr>
216
- <td width="22%"> Name : </td>
217
- <td width="78%"> <strong>'.$name.' </strong></td>
218
- </tr>
219
- <tr>
220
- <td> Email : </td>
221
- <td> <strong>'.$from.' </strong></td>
222
- </tr>
223
- <tr>
224
- <td> Website : </td>
225
- <td> <strong>'.$site.' </strong></td>
226
- </tr>
227
- <tr>
228
- <td> Ref. Post URL : </td>
229
- <td> <strong>'.$post_url.' </strong></td>
230
- </tr>
231
- <tr>
232
- <td colspan="2"> Message : </td>
233
- </tr>
234
- <tr>
235
- <td colspan="2"> '.$message.' </td>
236
- </tr>
237
- </table>
238
- </body>
239
- </html>
240
- ';
241
- $headers = 'MIME-Version: 1.0' . "\r\n";
242
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
243
- $headers .= 'From:'.$name.'<'.$from.'>' . "\r\n";
244
- echo mail($to,$subject,$html,$headers) ? _e( "Thank you!", 'rich-snippets') : _e( "Something went wrong!", 'rich-snippets');
245
-
246
- die();
247
- }
248
- function submit_color()
249
- {
250
- if ( ! current_user_can( 'manage_options' ) ) {
251
- // return if current user is not allowed to manage options.
252
- return;
253
- }
254
- else {
255
- if ( ! isset( $_POST['snippet_color_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_color_nonce_field'], 'snippet_color_form_action' )
256
- ) {
257
- print 'Sorry, your nonce did not verify.';
258
- exit;
259
- }
260
- else {
261
- $snippet_box_bg = esc_attr( $_POST['snippet_box_bg'] );
262
- $snippet_title_bg = esc_attr( $_POST['snippet_title_bg'] );
263
- $border_color = esc_attr( $_POST['snippet_border'] );
264
- $title_color = esc_attr( $_POST['snippet_title_color'] );
265
- $box_color = esc_attr( $_POST['snippet_box_color'] );
266
- $color_opt = array(
267
- 'snippet_box_bg' => $snippet_box_bg,
268
- 'snippet_title_bg' => $snippet_title_bg,
269
- 'snippet_border' => $border_color,
270
- 'snippet_title_color' => $title_color,
271
- 'snippet_box_color' => $box_color,
272
- );
273
- echo update_option('bsf_custom',$color_opt) ? _e( 'Settings saved !', 'rich-snippets') : _e( 'Error occured. Satings were not saved !', 'rich-snippets' );
274
-
275
- die();
276
- }
277
- }
278
- }
279
- function iris_enqueue_scripts()
280
- {
281
- wp_enqueue_script( 'wp-color-picker' );
282
- // load the minified version of custom script
283
- wp_enqueue_script( 'cp_custom', plugins_url( 'js/cp-script.min.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), '1.1', true );
284
- wp_enqueue_style( 'wp-color-picker' );
285
- }
286
- function bsf_color_scripts()
287
- {
288
- global $wp_version;
289
- $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
290
-
291
- // styles required for cmb
292
- $bsf_style_array = array( 'thickbox' );
293
-
294
- // if we're 3.5 or later, user wp-color-picker
295
- if ( 3.5 <= $wp_version ) {
296
-
297
- $bsf_script_array[] = 'wp-color-picker';
298
- $bsf_style_array[] = 'wp-color-picker';
299
-
300
- } else {
301
-
302
- // otherwise use the older 'farbtastic'
303
- $bsf_script_array[] = 'farbtastic';
304
- $bsf_style_array[] = 'farbtastic';
305
-
306
- }
307
- }
308
- }
309
- }
310
- require_once(plugin_dir_path( __FILE__ ).'functions.php');
311
- add_filter( 'bsf_meta_boxes', 'bsf_metaboxes' );
312
- // Instantiating the Class
313
- if (class_exists("RichSnippets")) {
314
- $RichSnippets= new RichSnippets();
315
- }
316
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Schema - All In One Schema Rich Snippets
4
+ * Plugin URI: https://www.brainstormforce.com
5
+ * Author: Brainstorm Force
6
+ * Author URI: https://www.brainstormforce.com
7
+ * Description: Welcome to the Schema - All In One Schema Rich Snippets! You can now easily add schema markup on various * pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services * *etc.
8
+ * Version: 1.6.1
9
+ * Text Domain: rich-snippets
10
+ * License: GPL2
11
+ *
12
+ * @package AIOSRS.
13
+ * */
14
+
15
+ /*
16
+ Copyright 2013 Schema - All In One Schema Rich Snippets (email : info@bsf.io)
17
+ This program is free software; you can redistribute it and/or modify
18
+ it under the terms of the GNU General Public License, version 2, as
19
+ published by the Free Software Foundation.
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
+ */
28
+ if ( ! class_exists( 'RichSnippets' ) ) {
29
+ /**
30
+ * RichSnippets
31
+ */
32
+ class RichSnippets {
33
+ /**
34
+ * Initiator
35
+ */
36
+ public function __construct() {
37
+ // Constructor.
38
+ register_activation_hook( __FILE__, array( $this, 'register_bsf_settings' ) );
39
+ add_action( 'admin_init', array( $this, 'aiosrs_admin_redirect' ) );
40
+ add_action( 'admin_head', array( $this, 'star_icons' ) );
41
+ // Add Admin Menu.
42
+ add_action( 'admin_menu', array( $this, 'register_custom_menu_page' ) );
43
+ add_action( 'admin_init', array( $this, 'set_styles' ) );
44
+
45
+ add_action( 'admin_init', array( $this, 'bsf_color_scripts' ) );
46
+
47
+ add_filter( 'plugins_loaded', array( $this, 'rich_snippet_translation' ) );
48
+ add_action( 'admin_enqueue_scripts', array( $this, 'post_enqueue' ) );
49
+ add_action( 'admin_enqueue_scripts', array( $this, 'post_new_enqueue' ) );
50
+ $plugin = plugin_basename( __FILE__ );
51
+ add_filter( "plugin_action_links_$plugin", array( $this, 'bsf_settings_link' ) );
52
+ add_action( 'wp_ajax_bsf_submit_request', array( $this, 'submit_request' ) );
53
+
54
+ add_action( 'wp_ajax_bsf_submit_color', array( $this, 'submit_color' ) );
55
+ // Admin bar menu.
56
+ add_action( 'admin_bar_menu', array( $this, 'aiosrs_admin_bar' ), 100 );
57
+ }
58
+
59
+ /**
60
+ * Admin bar menu.
61
+ */
62
+ public function aiosrs_admin_bar() {
63
+ global $wp_admin_bar;
64
+ $actual_link = esc_url( "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" );
65
+ if ( ! is_super_admin() || ! is_admin_bar_showing() ) {
66
+ return;
67
+ }
68
+ if ( ! is_admin() ) {
69
+ $wp_admin_bar->add_menu(
70
+ array(
71
+ 'id' => 'aiosrs',
72
+ 'title' => 'Test Rich Snippets',
73
+ 'href' => 'https://search.google.com/structured-data/testing-tool#url=' . $actual_link,
74
+ 'meta' => array( 'target' => '_blank' ),
75
+ )
76
+ );
77
+ }
78
+ }
79
+ /**
80
+ * Register_custom_menu_page.
81
+ */
82
+ public function register_custom_menu_page() {
83
+ require_once plugin_dir_path( __FILE__ ) . 'admin/index.php';
84
+ $page = add_menu_page( 'All in One Rich Snippets Dashboard', 'Rich Snippets', 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div' );
85
+ // Call the function to print the stylesheets and javascripts in only this plugins admin area.
86
+ add_action( 'admin_print_styles-' . $page, 'bsf_admin_styles' );
87
+ add_action( 'admin_print_scripts-' . $page, array( $this, 'iris_enqueue_scripts' ) );
88
+ }
89
+ /**
90
+ * Add settings link on plugin page.
91
+ *
92
+ * @param string $links Links.
93
+ */
94
+ public function bsf_settings_link( $links ) {
95
+ $settings_link = '<a href="admin.php?page=rich_snippet_dashboard">Settings</a>';
96
+ array_unshift( $links, $settings_link );
97
+ return $links;
98
+ }
99
+ /**
100
+ * Print the star rating style on post edit page.
101
+ *
102
+ * @param string $hook Hook.
103
+ */
104
+ public function post_enqueue( $hook ) {
105
+ if ( 'post.php' != $hook ) {
106
+ return;
107
+ }
108
+ $current_admin_screen = get_current_screen();
109
+ $exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
110
+ if ( in_array( $current_admin_screen->post_type, $exclude_custom_post_type ) ) {
111
+ return;
112
+ }
113
+ wp_enqueue_script( 'jquery' );
114
+ wp_enqueue_script( 'bsf_jquery_star' );
115
+ wp_enqueue_script( 'bsf_toggle' );
116
+ wp_enqueue_style( 'star_style' );
117
+ wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
118
+ wp_enqueue_script( 'bsf-scripts' );
119
+ wp_enqueue_media();
120
+ wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
121
+ wp_enqueue_script( 'bsf-scripts-media' );
122
+ wp_enqueue_script( 'jquery-ui-datepicker' );
123
+ if ( ! function_exists( 'vc_map' ) ) {
124
+ wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css', null, '1.0' );
125
+ }
126
+ }
127
+ /**
128
+ * Post_new_enqueue.
129
+ *
130
+ * @param string $hook Hook.
131
+ */
132
+ public function post_new_enqueue( $hook ) {
133
+ if ( 'post-new.php' != $hook ) {
134
+ return;
135
+ }
136
+ $current_admin_screen = get_current_screen();
137
+ $exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
138
+ if ( in_array( $current_admin_screen->post_type, $exclude_custom_post_type ) ) {
139
+ return;
140
+ }
141
+ wp_enqueue_script( 'jquery' );
142
+ wp_enqueue_script( 'bsf_jquery_star' );
143
+ wp_enqueue_script( 'bsf_toggle' );
144
+ wp_enqueue_style( 'star_style' );
145
+ wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
146
+ wp_enqueue_script( 'bsf-scripts' );
147
+ wp_enqueue_media();
148
+ wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
149
+ wp_enqueue_script( 'bsf-scripts-media' );
150
+ wp_enqueue_script( 'jquery-ui-datepicker' );
151
+ if ( ! function_exists( 'vc_map' ) ) {
152
+ wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css', null, 1.0 );
153
+ }
154
+ }
155
+ /**
156
+ * Initialize the metabox class.
157
+ */
158
+ public function wp_initialize_bsf_meta_boxes() {
159
+ if ( ! class_exists( 'Bsf_Meta_Box' ) ) {
160
+ require_once plugin_dir_path( __FILE__ ) . 'init.php';
161
+ }
162
+ }
163
+ /**
164
+ * Set_styles.
165
+ */
166
+ public function set_styles() {
167
+ wp_register_style( 'star_style', plugins_url( '/css/jquery.rating.css', __FILE__ ), null, '1.0' );
168
+ wp_register_style( 'meta_style', plugins_url( 'admin/css/style.css', __FILE__ ), null, '1.0' );
169
+
170
+ wp_register_style( 'admin_style', plugins_url( 'admin/css/admin.css', __FILE__ ), null, '1.0' );
171
+ wp_register_script( 'bsf_jquery_star', plugins_url( '/js/jquery.rating.min.js', __FILE__ ), null, '1.0' );
172
+ wp_register_script( 'bsf_toggle', plugins_url( '/js/toggle.js', __FILE__ ), null, '1.0' );
173
+ }
174
+ /**
175
+ * Define icon styles for the custom post type.
176
+ */
177
+ public function star_icons() {
178
+ ?>
179
+ <style>
180
+ #toplevel_page_rich_snippet_dashboard .wp-menu-image {
181
+ background: url(<?php echo esc_url( plugins_url( '/images/star.png', __FILE__ ) ); ?>) no-repeat !important;
182
+ }
183
+ #toplevel_page_rich_snippet_dashboard:hover .wp-menu-image, #toplevel_page_rich_snippet_dashboard.wp-has-current-submenu .wp-menu-image {
184
+ background: url(<?php echo esc_url( plugins_url( '/images/star.png', __FILE__ ) ); ?>) no-repeat 0 -32px !important;
185
+ }
186
+ #toplevel_page_rich_snippet_dashboard .current .wp-menu-image, #toplevel_page_rich_snippet_dashboard.wp-has-current-submenu .wp-menu-image {
187
+ background: url(<?php echo esc_url( plugins_url( '/images/star.png', __FILE__ ) ); ?>) no-repeat 0 -32px !important;
188
+ }
189
+ #star-icons-32.icon32 {background: url(<?php echo esc_url( plugins_url( '/images/gray-32.png', __FILE__ ) ); ?>) no-repeat;}
190
+ </style>
191
+ <?php }
192
+ /**
193
+ * Translation.
194
+ */
195
+ public function rich_snippet_translation() {
196
+ // Load Translation File.
197
+ load_plugin_textdomain( 'rich-snippets', false, basename( dirname( __FILE__ ) ) . '/lang/' );
198
+ }
199
+ /**
200
+ * Register_bsf_settings.
201
+ */
202
+ public function register_bsf_settings() {
203
+ require_once plugin_dir_path( __FILE__ ) . 'settings.php';
204
+ add_woo_commerce_option();
205
+ add_review_option();
206
+ add_event_option();
207
+ add_person_option();
208
+ add_product_option();
209
+ add_recipe_option();
210
+ add_software_option();
211
+ add_video_option();
212
+ add_article_option();
213
+ add_service_option();
214
+ add_color_option();
215
+ add_option( 'aisrs_do_activation_redirect', true );
216
+
217
+ }
218
+ /**
219
+ * Aiosrs_admin_redirect.
220
+ */
221
+ public function aiosrs_admin_redirect() {
222
+ $main_url = esc_url( admin_url() );
223
+ if ( get_option( 'aisrs_do_activation_redirect', false ) ) {
224
+ delete_option( 'aisrs_do_activation_redirect' );
225
+ wp_safe_redirect( $main_url . '/admin.php?page=rich_snippet_dashboard#tab-5' );
226
+ }
227
+ }
228
+ /**
229
+ * Submit_request.
230
+ */
231
+ public function submit_request() {
232
+ $to = 'Brainstorm Force <support@bsf.io>';
233
+ $from = '';
234
+ $site = '';
235
+ $sub = '';
236
+ $message = '';
237
+ $post_url = '';
238
+ $name = '';
239
+ if ( isset( $_POST['aiosrs_support_form_nonce'] ) && wp_verify_nonce( $_POST['aiosrs_support_form_nonce'], 'aiosrs_support_form' ) ) {
240
+
241
+ $from = sanitize_email( $_POST['email'] );
242
+ $site = esc_url( $_POST['site_url'] );
243
+ $sub = sanitize_text_field( $_POST['subject'] );
244
+ $message = esc_html( $_POST['message'] );
245
+ $name = sanitize_text_field( $_POST['name'] );
246
+ $post_url = esc_url( $_POST['post_url'] );
247
+ }
248
+
249
+ if ( 'question' == $sub ) {
250
+ $subject = '[AIOSRS] New question received from ' . $name;
251
+ } elseif ( 'bug' == $sub ) {
252
+ $subject = '[AIOSRS] New bug found by ' . $name;
253
+ } elseif ( 'help' == $sub ) {
254
+ $subject = '[AIOSRS] New help request received from ' . $name;
255
+ } elseif ( 'professional' == $sub ) {
256
+ $subject = '[AIOSRS] New service quote request received from ' . $name;
257
+ } elseif ( 'contribute' == $sub ) {
258
+ $subject = '[AIOSRS] New development contribution request by ' . $name;
259
+ } elseif ( 'other' == $sub ) {
260
+ $subject = '[AIOSRS] New contact request received from ' . $name;
261
+ }
262
+
263
+ $html = '
264
+ <html>
265
+ <head>
266
+ <title>All in One Schema.org Rich Snippets</title>
267
+ </head>
268
+ <body>
269
+ <table width="100%" cellpadding="10" cellspacing="10">
270
+ <tr>
271
+ <th colspan="2"> All in One Schema.org Rich Snippets Support</th>
272
+ </tr>
273
+ <tr>
274
+ <td width="22%"> Name : </td>
275
+ <td width="78%"> <strong>' . $name . ' </strong></td>
276
+ </tr>
277
+ <tr>
278
+ <td> Email : </td>
279
+ <td> <strong>' . $from . ' </strong></td>
280
+ </tr>
281
+ <tr>
282
+ <td> Website : </td>
283
+ <td> <strong>' . $site . ' </strong></td>
284
+ </tr>
285
+ <tr>
286
+ <td> Ref. Post URL : </td>
287
+ <td> <strong>' . $post_url . ' </strong></td>
288
+ </tr>
289
+ <tr>
290
+ <td colspan="2"> Message : </td>
291
+ </tr>
292
+ <tr>
293
+ <td colspan="2"> ' . $message . ' </td>
294
+ </tr>
295
+ </table>
296
+ </body>
297
+ </html>
298
+ ';
299
+ $headers = 'MIME-Version: 1.0' . "\r\n";
300
+ $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
301
+ $headers .= 'From:' . $name . '<' . $from . '>' . "\r\n";
302
+ echo mail( $to, $subject, $html, $headers ) ? esc_html_e( 'Thank you!', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Something went wrong!', 'all-in-one-schemaorg-rich-snippets' );
303
+
304
+ die();
305
+ }
306
+ /**
307
+ * Submit_color.
308
+ */
309
+ public function submit_color() {
310
+ if ( ! current_user_can( 'manage_options' ) ) {
311
+ // return if current user is not allowed to manage options.
312
+ return;
313
+ } else {
314
+ if ( ! isset( $_POST['snippet_color_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_color_nonce_field'], 'snippet_color_form_action' )
315
+ ) {
316
+ print esc_attr( 'Sorry, your nonce did not verify.' );
317
+ exit;
318
+ } else {
319
+ $snippet_box_bg = esc_attr( $_POST['snippet_box_bg'] );
320
+ $snippet_title_bg = esc_attr( $_POST['snippet_title_bg'] );
321
+ $border_color = esc_attr( $_POST['snippet_border'] );
322
+ $title_color = esc_attr( $_POST['snippet_title_color'] );
323
+ $box_color = esc_attr( $_POST['snippet_box_color'] );
324
+ $color_opt = array(
325
+ 'snippet_box_bg' => $snippet_box_bg,
326
+ 'snippet_title_bg' => $snippet_title_bg,
327
+ 'snippet_border' => $border_color,
328
+ 'snippet_title_color' => $title_color,
329
+ 'snippet_box_color' => $box_color,
330
+ );
331
+ echo update_option( 'bsf_custom', $color_opt ) ? esc_html_e( 'Settings saved !', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Error occured. Settings were not saved !', 'all-in-one-schemaorg-rich-snippets' );
332
+
333
+ die();
334
+ }
335
+ }
336
+ }
337
+ /**
338
+ * Iris_enqueue_scripts.
339
+ */
340
+ public function iris_enqueue_scripts() {
341
+ wp_enqueue_script( 'wp-color-picker' );
342
+ // load the minified version of custom script.
343
+ wp_enqueue_script( 'cp_custom', plugins_url( 'js/cp-script.min.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), '1.1', true );
344
+ wp_enqueue_style( 'wp-color-picker' );
345
+ }
346
+ /**
347
+ * Bsf_color_scripts.
348
+ */
349
+ public function bsf_color_scripts() {
350
+ global $wp_version;
351
+ $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
352
+
353
+ // styles required for cmb.
354
+ $bsf_style_array = array( 'thickbox' );
355
+
356
+ // if we're 3.5 or later, user wp-color-picker.
357
+ if ( 3.5 <= $wp_version ) {
358
+
359
+ $bsf_script_array[] = 'wp-color-picker';
360
+ $bsf_style_array[] = 'wp-color-picker';
361
+
362
+ } else {
363
+
364
+ // otherwise use the older 'farbtastic'.
365
+ $bsf_script_array[] = 'farbtastic';
366
+ $bsf_style_array[] = 'farbtastic';
367
+
368
+ }
369
+ }
370
+ }
371
+ }
372
+ require_once plugin_dir_path( __FILE__ ) . 'functions.php';
373
+ add_filter( 'bsf_meta_boxes', 'bsf_metaboxes' );
374
+ // Instantiating the Class.
375
+ if ( class_exists( 'RichSnippets' ) ) {
376
+ $richsnippets = new RichSnippets();
377
+ }
378
+ ?>
init.php CHANGED
@@ -1,561 +1,681 @@
1
- <?php
2
- $meta_boxes = array();
3
- $meta_boxes = apply_filters ( 'bsf_meta_boxes' , $meta_boxes );
4
- foreach ( $meta_boxes as $meta_box ) {
5
- $my_box = new bsf_Meta_Box( $meta_box );
6
- }
7
- /**
8
- * Validate value of meta fields
9
- * Define ALL validation methods inside this class and use the names of these
10
- * methods in the definition of meta boxes (key 'validate_func' of each field)
11
- */
12
- class bsf_Meta_Box_Validate {
13
- function check_text( $text ) {
14
- if ($text != 'hello') {
15
- return false;
16
- }
17
- return true;
18
- }
19
- }
20
- /**
21
- * Defines the url to which is used to load local resources.
22
- * This may need to be filtered for local Window installations.
23
- * If resources do not load, please check the wiki for details.
24
- */
25
- if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
26
- //winblows
27
- define( 'BSF_META_BOX_URL', trailingslashit( str_replace( DIRECTORY_SEPARATOR, '/', str_replace( str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR ), WP_CONTENT_URL, dirname(__FILE__) ) ) ) );
28
- } else {
29
- define( 'BSF_META_BOX_URL', apply_filters( 'bsf_meta_box_url', trailingslashit( str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
30
- }
31
- /**
32
- * Create meta boxes
33
- */
34
- class bsf_Meta_Box {
35
- protected $_meta_box;
36
- function __construct( $meta_box ) {
37
- if ( !is_admin() ) return;
38
- $this->_meta_box = $meta_box;
39
- $upload = false;
40
- foreach ( $meta_box['fields'] as $field ) {
41
- if ( $field['type'] == 'file' || $field['type'] == 'file_list' ) {
42
- $upload = true;
43
- break;
44
- }
45
- }
46
- global $pagenow;
47
- if ( $upload && in_array( $pagenow, array( 'page.php', 'page-new.php', 'post.php', 'post-new.php' ) ) ) {
48
- add_action( 'admin_head', array( &$this, 'add_post_enctype' ) );
49
- }
50
- add_action( 'admin_menu', array( &$this, 'add' ) );
51
- add_action( 'save_post', array( &$this, 'save' ) );
52
- add_filter( 'bsf_show_on', array( &$this, 'add_for_id' ), 10, 2 );
53
- add_filter( 'bsf_show_on', array( &$this, 'add_for_page_template' ), 10, 2 );
54
- }
55
- function add_post_enctype() {
56
- echo '
57
- <script type="text/javascript">
58
- jQuery(document).ready(function(){
59
- jQuery("#post").attr("enctype", "multipart/form-data");
60
- jQuery("#post").attr("encoding", "multipart/form-data");
61
- });
62
- </script>';
63
- }
64
- // Add metaboxes
65
- function add() {
66
- $this->_meta_box['context'] = empty($this->_meta_box['context']) ? 'normal' : $this->_meta_box['context'];
67
- $this->_meta_box['priority'] = empty($this->_meta_box['priority']) ? 'high' : $this->_meta_box['priority'];
68
- $this->_meta_box['show_on'] = empty( $this->_meta_box['show_on'] ) ? array('key' => false, 'value' => false) : $this->_meta_box['show_on'];
69
- foreach ( $this->_meta_box['pages'] as $page ) {
70
- if( apply_filters( 'bsf_show_on', true, $this->_meta_box ) )
71
- add_meta_box( $this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']) ;
72
- }
73
- }
74
- /**
75
- * Show On Filters
76
- * Use the 'bsf_show_on' filter to further refine the conditions under which a metabox is displayed.
77
- * Below you can limit it by ID and page template
78
- */
79
- // Add for ID
80
- function add_for_id( $display, $meta_box ) {
81
- if ( 'id' !== $meta_box['show_on']['key'] )
82
- return $display;
83
- // If we're showing it based on ID, get the current ID
84
- if( isset( $_GET['post'] ) ) $post_id = esc_attr( $_GET['post'] );
85
- elseif( isset( $_POST['post_ID'] ) ) $post_id = esc_attr( $_POST['post_ID'] );
86
- if( !isset( $post_id ) )
87
- return false;
88
- // If value isn't an array, turn it into one
89
- $meta_box['show_on']['value'] = !is_array( $meta_box['show_on']['value'] ) ? array( $meta_box['show_on']['value'] ) : $meta_box['show_on']['value'];
90
- // If current page id is in the included array, display the metabox
91
- if ( in_array( $post_id, $meta_box['show_on']['value'] ) )
92
- return true;
93
- else
94
- return false;
95
- }
96
- // Add for Page Template
97
- function add_for_page_template( $display, $meta_box ) {
98
- if( 'page-template' !== $meta_box['show_on']['key'] )
99
- return $display;
100
- // Get the current ID
101
- if( isset( $_GET['post'] ) ) $post_id = esc_attr( $_GET['post'] );
102
- elseif( isset( $_POST['post_ID'] ) ) $post_id = esc_attr( $_POST['post_ID'] );
103
- if( !( isset( $post_id ) || is_page() ) ) return false;
104
- // Get current template
105
- $current_template = get_post_meta( $post_id, '_wp_page_template', true );
106
- // If value isn't an array, turn it into one
107
- $meta_box['show_on']['value'] = !is_array( $meta_box['show_on']['value'] ) ? array( $meta_box['show_on']['value'] ) : $meta_box['show_on']['value'];
108
- // See if there's a match
109
- if( in_array( $current_template, $meta_box['show_on']['value'] ) )
110
- return true;
111
- else
112
- return false;
113
- }
114
- // Show fields
115
- function show() {
116
- global $post;
117
- // Use nonce for verification
118
- echo '<input type="hidden" name="wp_meta_box_nonce" value="', wp_create_nonce( basename(__FILE__) ), '" />';
119
- echo '<table class="form-table bsf_metabox">';
120
- foreach ( $this->_meta_box['fields'] as $field ) {
121
- // Set up blank or default values for empty ones
122
- if ( !isset( $field['name'] ) ) $field['name'] = '';
123
- if ( !isset( $field['desc'] ) ) $field['desc'] = '';
124
- if ( !isset( $field['std'] ) ) $field['std'] = '';
125
- if ( 'file' == $field['type'] && !isset( $field['allow'] ) ) $field['allow'] = array( 'url', 'attachment' );
126
- if ( 'file' == $field['type'] && !isset( $field['save_id'] ) ) $field['save_id'] = false;
127
- if ( 'multicheck' == $field['type'] ) $field['multiple'] = true;
128
- $meta = get_post_meta( $post->ID, $field['id'], 'multicheck' != $field['type'] /* If multicheck this can be multiple values */ );
129
- echo '<tr class="', $field['class'],'">';
130
- if ( $field['type'] == "title" || ( $field['type'] == "select" && $field['name'] == '' ) ) {
131
- echo '<td colspan="2">';
132
- } else {
133
- if( $this->_meta_box['show_names'] == true ) {
134
- echo '<th style="width:18%"><label class="', $field['class'],'" for="', $field['id'], '">', $field['name'], '</label></th>';
135
- }
136
- echo '<td>';
137
- }
138
-
139
- switch ( $field['type'] ) {
140
- case 'text':
141
- echo '<input class="', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" />','<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
142
- break;
143
- case 'text_small':
144
- echo '<input class="bsf_text_small ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
145
- break;
146
- case 'text_medium':
147
- echo '<input class="bsf_text_medium ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
148
- break;
149
- case 'text_date':
150
- echo '<input class="bsf_text_small bsf_datepicker ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
151
- break;
152
- case 'text_date_timestamp':
153
- echo '<input class="bsf_text_small bsf_datepicker ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? date( 'm\/d\/Y', $meta ) : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
154
- break;
155
- case 'text_datetime_timestamp':
156
- echo '<input class="bsf_text_small bsf_datepicker ', $field['class'],'" type="text" name="', $field['id'], '[date]" id="', $field['id'], '_date" value="', '' !== $meta ? date( 'm\/d\/Y', $meta ) : $field['std'], '" />';
157
- echo '<input class="bsf_timepicker text_time ', $field['class'],'" type="text" name="', $field['id'], '[time]" id="', $field['id'], '_time" value="', '' !== $meta ? date( 'h:i A', $meta ) : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'" >', $field['desc'], '</span>';
158
- break;
159
- case 'text_time':
160
- echo '<input class="bsf_timepicker text_time ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
161
- break;
162
- case 'text_money':
163
- echo '$ <input class="bsf_text_money ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
164
- break;
165
- case 'colorpicker':
166
- $meta = '' !== $meta ? $meta : $field['std'];
167
- $hex_color = '(([a-fA-F0-9]){3}){1,2}$';
168
- if ( preg_match( '/^' . $hex_color . '/i', $meta ) ) // Value is just 123abc, so prepend #.
169
- $meta = '#' . $meta;
170
- elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta ) ) // Value doesn't match #123abc, so sanitize to just #.
171
- $meta = "#";
172
- echo '<input class="bsf_colorpicker bsf_text_small ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta, '" /><span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
173
- break;
174
- case 'textarea':
175
- echo '<textarea class="', $field['class'],'" name="', $field['id'], '" id="', $field['id'], '" cols="60" rows="10">', '' !== $meta ? htmlspecialchars_decode( $meta ) : htmlspecialchars_decode( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
176
- break;
177
- case 'textarea_small':
178
- echo '<textarea class="', $field['class'],'" name="', $field['id'], '" id="', $field['id'], '" cols="60" rows="4">', '' !== $meta ? htmlspecialchars_decode( $meta ) : htmlspecialchars_decode( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
179
- break;
180
- case 'textarea_code':
181
- echo '<textarea class="', $field['class'],'" name="', $field['id'], '" id="', $field['id'], '" cols="60" rows="10" class="bsf_textarea_code">', '' !== $meta ? htmlspecialchars_decode( $meta ) : htmlspecialchars_decode( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
182
- break;
183
- case 'select':
184
- if( empty( $meta ) && !empty( $field['std'] ) ) $meta = $field['std'];
185
- echo '<select class="', $field['class'],'" name="', $field['id'], '" id="', $field['id'], '">';
186
- foreach ($field['options'] as $option) {
187
- echo '<option class="', $field['class'],'" value="', $option['value'], '"', $meta == $option['value'] ? ' selected="selected"' : '', '>', $option['name'], '</option>';
188
- }
189
- echo '</select>';
190
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
191
- break;
192
- case 'radio_inline':
193
- if( empty( $meta ) && !empty( $field['std'] ) ) $meta = $field['std'];
194
- echo '<div class="bsf_radio_inline ', $field['class'],'">';
195
- $i = 1;
196
- foreach ($field['options'] as $option) {
197
- echo '<div class="bsf_radio_inline_option ', $field['class'],'"><input class="', $field['class'],'" type="radio" name="', $field['id'], '" id="', $field['id'], $i, '" value="', $option['value'], '"', $meta == $option['value'] ? ' checked="checked"' : '', ' /><label class="', $field['class'],'" for="', $field['id'], $i, '">', $option['name'], '</label></div>';
198
- $i++;
199
- }
200
- echo '</div>';
201
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
202
- break;
203
- case 'radio':
204
- if( empty( $meta ) && !empty( $field['std'] ) ) $meta = $field['std'];
205
- echo '<div class="', $field['class'],'"><ul>';
206
- $i = 1;
207
- foreach ($field['options'] as $option) {
208
- if( $field['class'] == "star review" || $field['class'] == "star product" || $field['class'] == "star software" || $field['class'] == "star service" )
209
- $class = "star";
210
- else
211
- $class = $field['class'];
212
- echo '<li class="', $field['class'],'">
213
- <input class="', $class,'" type="radio" name="', $field['id'], '" id="', $field['id'], $i,'" value="', $option['value'], '"', $meta == $option['value'] ? ' checked="checked"' : '', ' /><label class="', $field['class'],'" for="', $field['id'], $i, '">', $option['name'].'</label> </li>';
214
- $i++;
215
- }
216
- echo '</ul></div>';
217
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
218
- break;
219
- case 'checkbox':
220
- echo '<input type="checkbox" class="', $field['class'],'" name="', $field['id'], '" id="', $field['id'], '"', $meta ? ' checked="checked"' : '', ' />';
221
- echo '<span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
222
- break;
223
- case 'multicheck':
224
- echo '<ul class="', $field['class'],'">';
225
- $i = 1;
226
- foreach ( $field['options'] as $value => $name ) {
227
- // Append `[]` to the name to get multiple values
228
- // Use in_array() to check whether the current option should be checked
229
- echo '<li class="', $field['class'],'"><input type="checkbox" class="', $field['class'],'" name="', $field['id'], '[]" id="', $field['id'], $i, '" value="', $value, '"', in_array( $value, $meta ) ? ' checked="checked"' : '', ' /><label class="', $field['class'],'" for="', $field['id'], $i, '">', $name, '</label></li>';
230
- $i++;
231
- }
232
- echo '</ul>';
233
- echo '<span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
234
- break;
235
- case 'title':
236
- echo '<h5 class="bsf_metabox_title ', $field['class'],'">', $field['name'], '</h5>';
237
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
238
- break;
239
- case 'wysiwyg':
240
- wp_editor( $meta ? $meta : $field['std'], $field['id'], isset( $field['options'] ) ? $field['options'] : array() );
241
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
242
- break;
243
- case 'taxonomy_select':
244
- echo '<select class="', $field['class'],'" name="', $field['id'], '" id="', $field['id'], '">';
245
- $names= wp_get_object_terms( $post->ID, $field['taxonomy'] );
246
- $terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
247
- foreach ( $terms as $term ) {
248
- if (!is_wp_error( $names ) && !empty( $names ) && !strcmp( $term->slug, $names[0]->slug ) ) {
249
- echo '<option value="' . $term->slug . '" selected>' . $term->name . '</option>';
250
- } else {
251
- echo '<option value="' . $term->slug . ' ' , $meta == $term->slug ? $meta : ' ' ,' ">' . $term->name . '</option>';
252
- }
253
- }
254
- echo '</select>';
255
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
256
- break;
257
- case 'taxonomy_radio':
258
- $names= wp_get_object_terms( $post->ID, $field['taxonomy'] );
259
- $terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
260
- echo '<ul class="', $field['class'],'">';
261
- foreach ( $terms as $term ) {
262
- if ( !is_wp_error( $names ) && !empty( $names ) && !strcmp( $term->slug, $names[0]->slug ) ) {
263
- echo '<li class="', $field['class'],'"><input class="', $field['class'],'" type="radio" name="', $field['id'], '" value="'. $term->slug . '" checked>' . $term->name . '</li>';
264
- } else {
265
- echo '<li class="', $field['class'],'"><input class="', $field['class'],'" type="radio" name="', $field['id'], '" value="' . $term->slug . ' ' , $meta == $term->slug ? $meta : ' ' ,' ">' . $term->name .'</li>';
266
- }
267
- }
268
- echo '</ul>';
269
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
270
- break;
271
- case 'taxonomy_multicheck':
272
- echo '<ul>';
273
- $names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
274
- $terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
275
- foreach ($terms as $term) {
276
- echo '<li><input class="', $field['class'],'" type="checkbox" name="', $field['id'], '[]" id="', $field['id'], '" value="', $term->name , '"';
277
- foreach ($names as $name) {
278
- if ( $term->slug == $name->slug ){ echo ' checked="checked" ';};
279
- }
280
- echo' /><label>', $term->name , '</label></li>';
281
- }
282
- echo '</ul>';
283
- echo '<span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
284
- break;
285
- case 'file_list':
286
- echo '<input class="bsf_upload_file ', $field['class'],'" type="text" size="36" name="', $field['id'], '" value="" />';
287
- echo '<input class="bsf_upload_button button ', $field['class'],'" type="button" value="Upload File" />';
288
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
289
- $args = array(
290
- 'post_type' => 'attachment',
291
- 'numberposts' => null,
292
- 'post_status' => null,
293
- 'post_parent' => $post->ID
294
- );
295
- $attachments = get_posts($args);
296
- if ($attachments) {
297
- echo '<ul class="attach_list">';
298
- foreach ($attachments as $attachment) {
299
- echo '<li>'.wp_get_attachment_link($attachment->ID, 'thumbnail', 0, 0, 'Download');
300
- echo '<span>';
301
- echo apply_filters('the_title', '&nbsp;'.$attachment->post_title);
302
- echo '</span></li>';
303
- }
304
- echo '</ul>';
305
- }
306
- break;
307
- case 'file':
308
- $input_type_url = "hidden";
309
- if ( 'url' == $field['allow'] || ( is_array( $field['allow'] ) && in_array( 'url', $field['allow'] ) ) )
310
- $input_type_url="text";
311
- echo '<input class="bsf_upload_file ', $field['class'],' '.$field['id'].'" type="' . $input_type_url . '" size="45" id="', $field['id'], '" name="', $field['id'], '" value="', $meta, '" />';
312
- echo '<input class="bsf_upload_button button ', $field['class'],'" id="', $field['id'], '_id" type="button" value="Upload File" />';
313
- echo '<input class="bsf_upload_file_id ', $field['class'],'" type="hidden" id="', $field['id'], '" name="', $field['id'], '_id" value="', get_post_meta( $post->ID, $field['id'] . "_id",true), '" />';
314
- echo '<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
315
- echo '<div id="', $field['id'], '_status" class="bsf_media_status ', $field['class'],'">';
316
- if ( $meta != '' ) {
317
- $check_image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $meta );
318
- if ( $check_image ) {
319
- echo '<div class="img_status">';
320
- echo '<img src="', $meta, '" alt="" />';
321
- echo '<a href="#" class="bsf_remove_file_button ', $field['class'],'" rel="', $field['id'], '">Remove Image</a>';
322
- echo '</div>';
323
- } else {
324
- $parts = explode( '/', $meta );
325
- for( $i = 0; $i < count( $parts ); ++$i ) {
326
- $title = $parts[$i];
327
- }
328
- echo 'File: <strong>', $title, '</strong>&nbsp;&nbsp;&nbsp; (<a href="', $meta, '" target="_blank" rel="external">Download</a> / <a href="#" class="bsf_remove_file_button" rel="', $field['id'], '">Remove</a>)';
329
- }
330
- }
331
- echo '</div>';
332
- break;
333
- case 'oembed':
334
- echo '<input class="bsf_oembed ', $field['class'],'" type="text" name="', $field['id'], '" id="', $field['id'], '" value="', '' !== $meta ? $meta : $field['std'], '" />','<p class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</p>';
335
- echo '<p class="bsf-spinner spinner ', $field['class'],'"></p>';
336
- echo '<div id="', $field['id'], '_status" class="bsf_media_status ui-helper-clearfix embed_wrap ', $field['class'],'">';
337
- if ( $meta != '' ) {
338
- $check_embed = $GLOBALS['wp_embed']->run_shortcode( '[embed]'. esc_url( $meta ) .'[/embed]' );
339
- if ( $check_embed ) {
340
- echo '<div class="embed_status ', $field['class'],'">';
341
- echo $check_embed;
342
- echo '<a href="#" class="bsf_remove_file_button ', $field['class'],'" rel="', $field['id'], '">Remove Embed</a>';
343
- echo '</div>';
344
- } else {
345
- echo 'URL is not a valid oEmbed URL.';
346
- }
347
- }
348
- echo '</div>';
349
- break;
350
- default:
351
- do_action('bsf_render_' . $field['type'] , $field, $meta);
352
- }
353
- echo '</td>','</tr>';
354
- }
355
- echo '<td></td>','<td class="bsf-table-data"><div class="bsf-tooltip"><span class="dashicons dashicons-info"></span><span class="bsf-tooltiptext">Don&#39;t want Schema data to be visible on your site&#39;s frontend? <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=editpage" target="_blank">Use Schema Pro</span></a></div></td>';
356
- echo '</table>';
357
- }
358
- // Save data from metabox
359
- function save( $post_id) {
360
- // verify nonce
361
- if ( ! isset( $_POST['wp_meta_box_nonce'] ) || !wp_verify_nonce( esc_attr( $_POST['wp_meta_box_nonce'] ), basename(__FILE__) ) ) {
362
- return $post_id;
363
- }
364
- // check autosave
365
- if ( defined('DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
366
- return $post_id;
367
- }
368
- // check permissions
369
- if ( 'page' == esc_attr( $_POST['post_type'] ) ) {
370
- if ( !current_user_can( 'edit_page', $post_id ) ) {
371
- return $post_id;
372
- }
373
- } elseif ( !current_user_can( 'edit_post', $post_id ) ) {
374
- return $post_id;
375
- }
376
- foreach ( $this->_meta_box['fields'] as $field ) {
377
- $name = $field['id'];
378
- if ( ! isset( $field['multiple'] ) )
379
- $field['multiple'] = ( 'multicheck' == $field['type'] ) ? true : false;
380
- $old = get_post_meta( $post_id, $name, !$field['multiple'] /* If multicheck this can be multiple values */ );
381
- $new = isset( $_POST[$field['id']] ) ? esc_attr( $_POST[$field['id']] ) : null;
382
- if ( in_array( $field['type'], array( 'taxonomy_select', 'taxonomy_radio', 'taxonomy_multicheck' ) ) ) {
383
- $new = wp_set_object_terms( $post_id, $new, $field['taxonomy'] );
384
- }
385
- if ( ($field['type'] == 'textarea') || ($field['type'] == 'textarea_small') ) {
386
- $new = htmlspecialchars( $new );
387
- }
388
- if ( ($field['type'] == 'textarea_code') ) {
389
- $new = htmlspecialchars_decode( $new );
390
- }
391
- if ( $field['type'] == 'text_date_timestamp' ) {
392
- $new = strtotime( $new );
393
- }
394
- if ( $field['type'] == 'text_datetime_timestamp' ) {
395
- $string = $new['date'] . ' ' . $new['time'];
396
- $new = strtotime( $string );
397
- }
398
- $new = apply_filters('bsf_validate_' . $field['type'], $new, $post_id, $field);
399
- // validate meta value
400
- if ( isset( $field['validate_func']) ) {
401
- $ok = call_user_func( array( 'bsf_Meta_Box_Validate', $field['validate_func']), $new );
402
- if ( $ok === false ) { // pass away when meta value is invalid
403
- continue;
404
- }
405
- } elseif ( $field['multiple'] ) {
406
- delete_post_meta( $post_id, $name );
407
- if ( !empty( $new ) ) {
408
- foreach ( $new as $add_new ) {
409
- add_post_meta( $post_id, $name, $add_new, false );
410
- }
411
- }
412
- } elseif ( '' !== $new && $new != $old ) {
413
- update_post_meta( $post_id, $name, $new );
414
- } elseif ( '' == $new ) {
415
- delete_post_meta( $post_id, $name );
416
- }
417
- if ( 'file' == $field['type'] ) {
418
- $name = $field['id'] . "_id";
419
- $old = get_post_meta( $post_id, $name, !$field['multiple'] /* If multicheck this can be multiple values */ );
420
- if ( isset( $field['save_id'] ) && $field['save_id'] ) {
421
- $new = isset( $_POST[$name] ) ? esc_attr( $_POST[$name] ) : null;
422
- } else {
423
- $new = "";
424
- }
425
- if ( $new && $new != $old ) {
426
- update_post_meta( $post_id, $name, $new );
427
- } elseif ( '' == $new && $old ) {
428
- delete_post_meta( $post_id, $name, $old );
429
- }
430
- }
431
- }
432
- }
433
- }
434
- /**
435
- * Adding scripts and styles
436
- */
437
- function bsf_scripts( $hook ) {
438
- global $wp_version;
439
- // only enqueue our scripts/styles on the proper pages
440
- if ( $hook == 'post.php' || $hook == 'post-new.php' || $hook == 'page-new.php' || $hook == 'page.php') {
441
- // scripts required for cmb
442
- $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
443
- // styles required for cmb
444
- $bsf_style_array = array( 'thickbox' );
445
- // if we're 3.5 or later, user wp-color-picker
446
- if ( 3.5 <= $wp_version ) {
447
- $bsf_script_array[] = 'wp-color-picker';
448
- $bsf_style_array[] = 'wp-color-picker';
449
- } else {
450
- // otherwise use the older 'farbtastic'
451
- $bsf_script_array[] = 'farbtastic';
452
- $bsf_style_array[] = 'farbtastic';
453
- }
454
- wp_register_script( 'bsf-timepicker', BSF_META_BOX_URL . 'js/jquery.timePicker.min.js' );
455
- wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', $bsf_script_array, '0.9.1' );
456
- wp_localize_script( 'bsf-scripts', 'bsf_ajax_data', array( 'ajax_nonce' => wp_create_nonce( 'ajax_nonce' ), 'post_id' => get_the_ID() ) );
457
- wp_enqueue_script( 'bsf-timepicker' );
458
- wp_enqueue_script( 'bsf-scripts' );
459
- wp_register_style( 'bsf-styles', BSF_META_BOX_URL . 'admin/css/style.css', $bsf_style_array );
460
- wp_enqueue_style( 'bsf-styles' );
461
- }
462
- }
463
- add_action( 'admin_enqueue_scripts', 'bsf_scripts', 10 );
464
- function bsf_editor_footer_scripts() { ?>
465
- <?php
466
- if ( isset( $_GET['bsf_force_send'] ) && 'true' == esc_attr( $_GET['bsf_force_send'] ) ) {
467
- $label = esc_attr( $_GET['bsf_send_label'] );
468
- if ( empty( $label ) ) $label="Select File";
469
- ?>
470
- <script type="text/javascript">
471
- jQuery(function($) {
472
- $('td.savesend input').val('<?php echo $label; ?>');
473
- });
474
- </script>
475
- <?php
476
- }
477
- }
478
- add_action( 'admin_print_footer_scripts', 'bsf_editor_footer_scripts', 99 );
479
- // Force 'Insert into Post' button from Media Library
480
- add_filter( 'get_media_item_args', 'bsf_force_send' );
481
- function bsf_force_send( $args ) {
482
- // if the Gallery tab is opened from a custom meta box field, add Insert Into Post button
483
- if ( isset( $_GET['bsf_force_send'] ) && 'true' == esc_attr( $_GET['bsf_force_send'] ) )
484
- $args['send'] = true;
485
- // if the From Computer tab is opened AT ALL, add Insert Into Post button after an image is uploaded
486
- if ( isset( $_POST['attachment_id'] ) && '' != esc_attr( $_POST["attachment_id"] ) ) {
487
- $args['send'] = true;
488
- // TO DO: Are there any conditions in which we don't want the Insert Into Post
489
- // button added? For example, if a post type supports thumbnails, does not support
490
- // the editor, and does not have any cmb file inputs? If so, here's the first
491
- // bits of code needed to check all that.
492
- // $attachment_ancestors = get_post_ancestors( $_POST["attachment_id"] );
493
- // $attachment_parent_post_type = get_post_type( $attachment_ancestors[0] );
494
- // $post_type_object = get_post_type_object( $attachment_parent_post_type );
495
- }
496
- // change the label of the button on the From Computer tab
497
- if ( isset( $_POST['attachment_id'] ) && '' != esc_attr( $_POST["attachment_id"] ) ) {
498
- echo '
499
- <script type="text/javascript">
500
- function cmbGetParameterByNameInline(name) {
501
- name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
502
- var regexS = "[\\?&]" + name + "=([^&#]*)";
503
- var regex = new RegExp(regexS);
504
- var results = regex.exec(window.location.href);
505
- if(results == null)
506
- return "";
507
- else
508
- return decodeURIComponent(results[1].replace(/\+/g, " "));
509
- }
510
- jQuery(function($) {
511
- if (cmbGetParameterByNameInline("bsf_force_send")=="true") {
512
- var bsf_send_label = cmbGetParameterByNameInline("bsf_send_label");
513
- $("td.savesend input").val(bsf_send_label);
514
- }
515
- });
516
- </script>
517
- ';
518
- }
519
- return $args;
520
- }
521
- add_action( 'wp_ajax_bsf_oembed_handler', 'bsf_oembed_ajax_results' );
522
- /**
523
- * Handles our oEmbed ajax request
524
- */
525
- function bsf_oembed_ajax_results() {
526
- // verify our nonce
527
- if ( ! ( isset( $_REQUEST['bsf_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['bsf_ajax_nonce'], 'ajax_nonce' ) ) )
528
- die();
529
- // sanitize our search string
530
- $oembed_string = sanitize_text_field( $_REQUEST['oembed_url'] );
531
- if ( empty( $oembed_string ) ) {
532
- $return = '<p class="ui-state-error-text">'. __( 'Please Try Again', 'cmb' ) .'</p>';
533
- $found = 'not found';
534
- } else {
535
- global $wp_embed;
536
- $oembed_url = esc_url( $oembed_string );
537
- // Post ID is needed to check for embeds
538
- if ( isset( $_REQUEST['post_id'] ) )
539
- $GLOBALS['post'] = get_post( esc_attr( $_REQUEST['post_id'] ) );
540
- // ping WordPress for an embed
541
- $check_embed = $wp_embed->run_shortcode( '[embed]'. $oembed_url .'[/embed]' );
542
- // fallback that WordPress creates when no oEmbed was found
543
- $fallback = $wp_embed->maybe_make_link( $oembed_url );
544
- if ( $check_embed && $check_embed != $fallback ) {
545
- // Embed data
546
- $return = '<div class="embed_status">'. $check_embed .'<a href="#" class="bsf_remove_file_button" rel="'. esc_attr( $_REQUEST['field_id'] ) .'">'. __( 'Remove Embed', 'cmb' ) .'</a></div>';
547
- // set our response id
548
- $found = 'found';
549
- } else {
550
- // error info when no oEmbeds were found
551
- $return = '<p class="ui-state-error-text">'.sprintf( __( 'No oEmbed Results Found for %s. View more info at', 'cmb' ), $fallback ) .' <a href="http://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>.</p>';
552
- // set our response id
553
- $found = 'not found';
554
- }
555
- }
556
- // send back our encoded data
557
- echo json_encode( array( 'result' => $return, 'id' => $found ) );
558
- die();
559
- }
560
- // End. That's it, folks! //
561
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Init.
4
+ *
5
+ * @package Init.
6
+ */
7
+
8
+ $meta_boxes = array();
9
+ $meta_boxes = apply_filters( 'bsf_meta_boxes', $meta_boxes );
10
+ foreach ( $meta_boxes as $meta_box ) {
11
+ $my_box = new Bsf_Meta_Box( $meta_box );
12
+ }
13
+ /**
14
+ * Validate value of meta fields.
15
+ * Define ALL validation methods inside this class and use the names of these.
16
+ * methods in the definition of meta boxes (key 'validate_func' of each field).
17
+ */
18
+ /**
19
+ * Bsf_Meta_Box_Validate
20
+ */
21
+ class Bsf_Meta_Box_Validate {
22
+ /**
23
+ * Check_text.
24
+ *
25
+ * @param string $text Text.
26
+ */
27
+ public function check_text( $text ) {
28
+ if ( 'hello' != $text ) {
29
+ return false;
30
+ }
31
+ return true;
32
+ }
33
+ }
34
+ /**
35
+ * Defines the url to which is used to load local resources.
36
+ * This may need to be filtered for local Window installations.
37
+ * If resources do not load, please check the wiki for details.
38
+ */
39
+ if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) {
40
+ // winblows.
41
+ define( 'BSF_META_BOX_URL', trailingslashit( str_replace( DIRECTORY_SEPARATOR, '/', str_replace( str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR ), WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
42
+ } else {
43
+ define( 'BSF_META_BOX_URL', apply_filters( 'bsf_meta_box_url', trailingslashit( str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
44
+ }
45
+ /**
46
+ * Create meta boxes.
47
+ */
48
+ class Bsf_Meta_Box {
49
+ //phpcs:ignore:Generic.Files.OneObjectStructurePerFile.MultipleFound
50
+ /**
51
+ * Meta Box.
52
+ *
53
+ * @var $_meta_box.
54
+ */
55
+ protected $_meta_box; //phpcs:ignore:PSR2.Classes.PropertyDeclaration.Underscore
56
+ /**
57
+ * Initiator.
58
+ *
59
+ * @param string $meta_box Meta Box.
60
+ */
61
+ public function __construct( $meta_box ) {
62
+ if ( ! is_admin() ) {
63
+ return;
64
+ }
65
+ $this->_meta_box = $meta_box;
66
+ $upload = false;
67
+ foreach ( $meta_box['fields'] as $field ) {
68
+ if ( 'file' == $field['type'] || 'file_list' == $field['type'] ) {
69
+ $upload = true;
70
+ break;
71
+ }
72
+ }
73
+ global $pagenow;
74
+ if ( $upload && in_array( $pagenow, array( 'page.php', 'page-new.php', 'post.php', 'post-new.php' ), true ) ) {
75
+ add_action( 'admin_head', array( &$this, 'add_post_enctype' ) );
76
+ }
77
+ add_action( 'admin_menu', array( &$this, 'add' ) );
78
+ add_action( 'save_post', array( &$this, 'save' ) );
79
+ add_filter( 'bsf_show_on', array( &$this, 'add_for_id' ), 10, 2 );
80
+ add_filter( 'bsf_show_on', array( &$this, 'add_for_page_template' ), 10, 2 );
81
+ }
82
+ /**
83
+ * Add_post_enctype.
84
+ */
85
+ public function add_post_enctype() {
86
+ echo '
87
+ <script type="text/javascript">
88
+ jQuery(document).ready(function(){
89
+ jQuery("#post").attr("enctype", "multipart/form-data");
90
+ jQuery("#post").attr("encoding", "multipart/form-data");
91
+ });
92
+ </script>';
93
+ }
94
+ /**
95
+ * Add metaboxes.
96
+ */
97
+ public function add() {
98
+ $this->_meta_box['context'] = empty( $this->_meta_box['context'] ) ? 'normal' : $this->_meta_box['context'];
99
+ $this->_meta_box['priority'] = empty( $this->_meta_box['priority'] ) ? 'high' : $this->_meta_box['priority'];
100
+ $this->_meta_box['show_on'] = empty( $this->_meta_box['show_on'] ) ? array(
101
+ 'key' => false,
102
+ 'value' => false,
103
+ ) : $this->_meta_box['show_on'];
104
+ foreach ( $this->_meta_box['pages'] as $page ) {
105
+ if ( apply_filters( 'bsf_show_on', true, $this->_meta_box ) ) {
106
+ add_meta_box( $this->_meta_box['id'], $this->_meta_box['title'], array( &$this, 'show' ), $page, $this->_meta_box['context'], $this->_meta_box['priority'] );
107
+ }
108
+ }
109
+ }
110
+ /**
111
+ * Show On Filters
112
+ * Use the 'bsf_show_on' filter to further refine the conditions under which a metabox is displayed.
113
+ * Below you can limit it by ID and page template.
114
+ *
115
+ * @param string $display Display.
116
+ * @param string $meta_box Meta Box.
117
+ */
118
+ public function add_for_id( $display, $meta_box ) {
119
+ if ( 'id' !== $meta_box['show_on']['key'] ) {
120
+ return $display;
121
+ }
122
+ // If we're showing it based on ID, get the current ID.
123
+ if ( isset( $_GET['post'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
124
+ $post_id = sanitize_text_field( $_GET['post'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
125
+ } elseif ( isset( $_POST['post_ID'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Missing
126
+ $post_id = sanitize_text_field( $_POST['post_ID'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Missing
127
+ }
128
+ if ( ! isset( $post_id ) ) {
129
+ return false;
130
+ }
131
+ // If value isn't an array, turn it into one.
132
+ $meta_box['show_on']['value'] = ! is_array( $meta_box['show_on']['value'] ) ? array( $meta_box['show_on']['value'] ) : $meta_box['show_on']['value'];
133
+ // If current page id is in the included array, display the metabox.
134
+ if ( in_array( $post_id, $meta_box['show_on']['value'] ) ) {
135
+ return true;
136
+ } else {
137
+ return false;
138
+ }
139
+ }
140
+
141
+ /**
142
+ * Add for Page Template.
143
+ *
144
+ * @param string $display Display.
145
+ * @param string $meta_box Meta Box.
146
+ */
147
+ public function add_for_page_template( $display, $meta_box ) {
148
+ if ( 'page-template' !== $meta_box['show_on']['key'] ) {
149
+ return $display;
150
+ }
151
+ // Get the current ID.
152
+ if ( isset( $_GET['post'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
153
+ $post_id = esc_attr( $_GET['post'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
154
+ } elseif ( isset( $_POST['post_ID'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Missing
155
+ $post_id = esc_attr( $_POST['post_ID'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Missing
156
+ }
157
+ if ( ! ( isset( $post_id ) || is_page() ) ) {
158
+ return false;
159
+ }
160
+ // Get current template.
161
+ $current_template = get_post_meta( $post_id, '_wp_page_template', true );
162
+ // If value isn't an array, turn it into one.
163
+ $meta_box['show_on']['value'] = ! is_array( $meta_box['show_on']['value'] ) ? array( $meta_box['show_on']['value'] ) : $meta_box['show_on']['value'];
164
+ // See if there's a match.
165
+ if ( in_array( $current_template, $meta_box['show_on']['value'] ) ) {
166
+ return true;
167
+ } else {
168
+ return false;
169
+ }
170
+ }
171
+ /**
172
+ * Show fields.
173
+ */
174
+ public function show() {
175
+ global $post;
176
+ // Use nonce for verification.
177
+ echo '<input type="hidden" name="wp_meta_box_nonce" value="', esc_attr( wp_create_nonce( basename( __FILE__ ) ) ), '" />';
178
+ echo '<table class="form-table bsf_metabox">';
179
+ foreach ( $this->_meta_box['fields'] as $field ) {
180
+ // Set up blank or default values for empty ones.
181
+ if ( ! isset( $field['name'] ) ) {
182
+ $field['name'] = '';
183
+ }
184
+ if ( ! isset( $field['desc'] ) ) {
185
+ $field['desc'] = '';
186
+ }
187
+ if ( ! isset( $field['std'] ) ) {
188
+ $field['std'] = '';
189
+ }
190
+ if ( 'file' == $field['type'] && ! isset( $field['allow'] ) ) {
191
+ $field['allow'] = array( 'url', 'attachment' );
192
+ }
193
+ if ( 'file' == $field['type'] && ! isset( $field['save_id'] ) ) {
194
+ $field['save_id'] = false;
195
+ }
196
+ if ( 'multicheck' == $field['type'] ) {
197
+ $field['multiple'] = true;
198
+ }
199
+ $meta = get_post_meta( $post->ID, esc_attr( $field['id'] ), 'multicheck' != $field['type'] /* If multicheck this can be multiple values */ );
200
+ echo '<tr class="', esc_attr( $field['class'] ),'">';
201
+ if ( 'title' == $field['type'] || ( 'select' == $field['type'] && '' == esc_html( $field['name'] ) ) ) {
202
+ echo '<td colspan="2">';
203
+ } else {
204
+ if ( true == $this->_meta_box['show_names'] ) {
205
+ echo '<th style="width:18%"><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), '">', esc_html( $field['name'] ), '</label></th>';
206
+ }
207
+ echo '<td>';
208
+ }
209
+
210
+ switch ( $field['type'] ) {
211
+ case 'text':
212
+ echo '<input class="', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" />','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', wp_kses_post( $field['desc'] ) , '</p>';
213
+ break;
214
+ case 'text_small':
215
+ echo '<input class="bsf_text_small ', esc_attr( $field['class'] ),'" type="text" name="',esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', wp_kses_post( $field['desc'] ), '</span>';
216
+ break;
217
+ case 'text_medium':
218
+ echo '<input class="bsf_text_medium ', esc_attr( $field['class'] ),'" type="text" name="',esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
219
+ break;
220
+ case 'text_date':
221
+ echo '<input class="bsf_text_small bsf_datepicker ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
222
+ break;
223
+ case 'text_date_timestamp':
224
+ echo '<input class="bsf_text_small bsf_datepicker ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( gmdate( 'm\/d\/Y', $meta ) ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
225
+ break;
226
+ case 'text_datetime_timestamp':
227
+ echo '<input class="bsf_text_small bsf_datepicker ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '[date]" id="', esc_attr( $field['id'] ), '_date" value="', '' !== $meta ? esc_attr( gmdate( 'm\/d\/Y', $meta ) ) : esc_attr( $field['std'] ), '" />';
228
+ echo '<input class="bsf_timepicker text_time ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '[time]" id="', esc_attr( $field['id'] ), '_time" value="', '' !== $meta ? esc_attr( gmdate( 'h:i A', $meta ) ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'" >', esc_attr( $field['desc'] ), '</span>';
229
+ break;
230
+ case 'text_time':
231
+ echo '<input class="bsf_timepicker text_time ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
232
+ break;
233
+ case 'text_money':
234
+ echo '$ <input class="bsf_text_money ', esc_attr( $field['class'] ),'" type="text" name="',esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
235
+ break;
236
+ case 'colorpicker':
237
+ $meta = '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] );
238
+ $hex_color = '(([a-fA-F0-9]){3}){1,2}$';
239
+ if ( preg_match( '/^' . $hex_color . '/i', $meta ) ) { // Value is just 123abc, so prepend #.
240
+ $meta = '#' . $meta;
241
+ } elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta ) ) { // Value doesn't match #123abc, so sanitize to just #.
242
+ $meta = '#';
243
+ }
244
+ echo '<input class="bsf_colorpicker bsf_text_small ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', esc_attr( $meta ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
245
+ break;
246
+ case 'textarea':
247
+ echo '<textarea class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '" cols="60" rows="10">', '' !== $meta ? esc_attr( htmlspecialchars_decode( $meta ) ) : esc_attr( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
248
+ break;
249
+ case 'textarea_small':
250
+ echo '<textarea class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '" cols="60" rows="4">', '' !== $meta ? esc_attr( htmlspecialchars_decode( $meta ) ) : esc_attr( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
251
+ break;
252
+ case 'textarea_code':
253
+ echo '<textarea class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '" cols="60" rows="10" class="bsf_textarea_code">', '' !== $meta ? esc_attr( htmlspecialchars_decode( $meta ) ) : esc_attr( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
254
+ break;
255
+ case 'select':
256
+ if ( empty( $meta ) && ! empty( $field['std'] ) ) {
257
+ $meta = esc_attr( $field['std'] );
258
+ }
259
+ echo '<select class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '">';
260
+ foreach ( $field['options'] as $option ) {
261
+ echo '<option class="', esc_attr( $field['class'] ),'" value="', esc_attr( $option['value'] ), '"', $meta == $option['value'] ? ' selected="selected"' : '', '>', esc_attr( $option['name'] ) , '</option>';
262
+ }
263
+ echo '</select>';
264
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
265
+ break;
266
+ case 'radio_inline':
267
+ if ( empty( $meta ) && ! empty( $field['std'] ) ) {
268
+ $meta = esc_attr( $field['std'] );
269
+ }
270
+ echo '<div class="bsf_radio_inline ', esc_attr( $field['class'] ),'">';
271
+ $i = 1;
272
+ foreach ( $field['options'] as $option ) {
273
+ echo '<div class="bsf_radio_inline_option ', esc_attr( $field['class'] ),'"><input class="', esc_attr( $field['class'] ),'" type="radio" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), esc_attr( $i ), '" value="', esc_attr( $option['value'] ), '"', $meta == $option['value'] ? ' checked="checked"' : '', ' /><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), esc_attr( $i ), '">', esc_attr( $option['name'] ) , '</label></div>';
274
+ $i++;
275
+ }
276
+ echo '</div>';
277
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
278
+ break;
279
+ case 'radio':
280
+ if ( empty( $meta ) && ! empty( $field['std'] ) ) {
281
+ $meta = esc_attr( $field['std'] );
282
+ }
283
+ echo '<div class="', esc_attr( $field['class'] ),'"><ul>';
284
+ $i = 1;
285
+ foreach ( $field['options'] as $option ) {
286
+ if ( esc_attr( $field['class'] ) == 'star review' || esc_attr( $field['class'] ) == 'star product' || esc_attr( $field['class'] ) == 'star software' || esc_attr( $field['class'] ) == 'star service' ) {
287
+ $class = 'star';
288
+ } else {
289
+ $class = esc_attr( $field['class'] );
290
+ }
291
+ echo '<li class="', esc_attr( $field['class'] ),'">
292
+ <input class="', $class,'" type="radio" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), esc_attr( $i ),'" value="', esc_attr( $option['value'] ), '"', $meta == $option['value'] ? ' checked="checked"' : '', ' /><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), esc_attr( $i ), '">', esc_attr( $option['name'] ) . '</label> </li>';
293
+ $i++;
294
+ }
295
+ echo '</ul></div>';
296
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
297
+ break;
298
+ case 'checkbox':
299
+ echo '<input type="checkbox" class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '"', $meta ? ' checked="checked"' : '', ' />';
300
+ echo '<span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
301
+ break;
302
+ case 'multicheck':
303
+ echo '<ul class="', esc_attr( $field['class'] ),'">';
304
+ $i = 1;
305
+ foreach ( $field['options'] as $value => $name ) {
306
+ // Append `[]` to the name to get multiple values.
307
+ // Use in_array() to check whether the current option should be checked.
308
+ echo '<li class="', esc_attr( $field['class'] ),'"><input type="checkbox" class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '[]" id="', esc_attr( $field['id'] ), esc_attr( $i ), '" value="', $value, '"', in_array( $value, $meta ) ? ' checked="checked"' : '', ' /><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), esc_attr( $i ), '">', esc_html( $name ), '</label></li>';
309
+ $i++;
310
+ }
311
+ echo '</ul>';
312
+ echo '<span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
313
+ break;
314
+ case 'title':
315
+ echo '<h5 class="bsf_metabox_title ', esc_attr( $field['class'] ),'">', esc_html( $field['name'] ), '</h5>';
316
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
317
+ break;
318
+ case 'wysiwyg':
319
+ wp_editor( $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), esc_attr( $field['id'] ), isset( $field['options'] ) ? $field['options'] : array() );
320
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
321
+ break;
322
+ case 'taxonomy_select':
323
+ echo '<select class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '">';
324
+ $names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
325
+ $terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
326
+ foreach ( $terms as $term ) {
327
+ if ( ! is_wp_error( $names ) && ! empty( $names ) && ! strcmp( $term->slug, $names[0]->slug ) ) {
328
+ echo '<option value="' . esc_attr( $term->slug ) . '" selected>' . esc_attr( $term->name ) . '</option>';
329
+ } else {
330
+ echo '<option value="' . $term->slug . ' ' , $meta == $term->slug ? esc_attr( $meta ) : ' ' ,' ">' . esc_attr( $term->name ) . '</option>';
331
+ }
332
+ }
333
+ echo '</select>';
334
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
335
+ break;
336
+ case 'taxonomy_radio':
337
+ $names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
338
+ $terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
339
+ echo '<ul class="', esc_attr( $field['class'] ),'">';
340
+ foreach ( $terms as $term ) {
341
+ if ( ! is_wp_error( $names ) && ! empty( $names ) && ! strcmp( $term->slug, $names[0]->slug ) ) {
342
+ echo '<li class="', esc_attr( $field['class'] ),'"><input class="', esc_attr( $field['class'] ),'" type="radio" name="', esc_attr( $field['id'] ), '" value="' . esc_attr( $term->slug ) . '" checked>' . esc_attr( $term->name ) . '</li>';
343
+ } else {
344
+ echo '<li class="', esc_attr( $field['class'] ),'"><input class="', esc_attr( $field['class'] ),'" type="radio" name="', esc_attr( $field['id'] ), '" value="' . $term->slug . ' ' , $meta == $term->slug ? esc_attr( $meta ) : ' ' ,' ">' . esc_attr( $term->name ) . '</li>';
345
+ }
346
+ }
347
+ echo '</ul>';
348
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
349
+ break;
350
+ case 'taxonomy_multicheck':
351
+ echo '<ul>';
352
+ $names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
353
+ $terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
354
+ foreach ( $terms as $term ) {
355
+ echo '<li><input class="', esc_attr( $field['class'] ),'" type="checkbox" name="', esc_attr( $field['id'] ), '[]" id="', esc_attr( $field['id'] ), '" value="', esc_attr( $term->name ) , '"';
356
+ foreach ( $names as $name ) {
357
+ if ( $term->slug == $name->slug ) {
358
+ echo ' checked="checked" ';
359
+ };
360
+ }
361
+ echo ' /><label>', esc_attr( $term->name ) , '</label></li>';
362
+ }
363
+ echo '</ul>';
364
+ echo '<span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
365
+ break;
366
+ case 'file_list':
367
+ echo '<input class="bsf_upload_file ', esc_attr( $field['class'] ),'" type="text" size="36" name="', esc_attr( $field['id'] ), '" value="" />';
368
+ echo '<input class="bsf_upload_button button ', esc_attr( $field['class'] ),'" type="button" value="Upload File" />';
369
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
370
+ $args = array(
371
+ 'post_type' => 'attachment',
372
+ 'numberposts' => null,
373
+ 'post_status' => null,
374
+ 'post_parent' => $post->ID,
375
+ );
376
+ $attachments = get_posts( $args );
377
+ if ( $attachments ) {
378
+ echo '<ul class="attach_list">';
379
+ foreach ( $attachments as $attachment ) {
380
+ echo '<li>' . wp_get_attachment_link( $attachment->ID, 'thumbnail', 0, 0, 'Download' );
381
+ echo '<span>';
382
+ echo apply_filters( 'the_title', '&nbsp;' . $attachment->post_title ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
383
+ echo '</span></li>';
384
+ }
385
+ echo '</ul>';
386
+ }
387
+ break;
388
+ case 'file':
389
+ $input_type_url = 'hidden';
390
+ if ( 'url' == $field['allow'] || ( is_array( $field['allow'] ) && in_array( 'url', $field['allow'] ) ) ) {
391
+ $input_type_url = 'text';
392
+ }
393
+ echo '<input class="bsf_upload_file ', esc_attr( $field['class'] ),' ' . esc_attr( $field['id'] ) . '" type="' . esc_attr( $input_type_url ) . '" size="45" id="', esc_attr( $field['id'] ), '" name="', esc_attr( $field['id'] ), '" value="', esc_attr( $meta ), '" />';
394
+ echo '<input class="bsf_upload_button button ', esc_attr( $field['class'] ),'" id="', esc_attr( $field['id'] ), '_id" type="button" value="Upload File" />';
395
+ echo '<input class="bsf_upload_file_id ', esc_attr( $field['class'] ),'" type="hidden" id="',esc_attr( $field['id'] ), '" name="', esc_attr( $field['id'] ), '_id" value="', esc_attr( get_post_meta( $post->ID, $field['id'] . '_id', true ) ), '" />';
396
+ echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', wp_kses_post( $field['desc'] ), '</p>';
397
+ echo '<div id="', esc_attr( $field['id'] ), '_status" class="bsf_media_status ', esc_attr( $field['class'] ),'">';
398
+ if ( '' != $meta ) {
399
+ $check_image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $meta );
400
+ if ( $check_image ) {
401
+ echo '<div class="img_status">';
402
+ echo '<img src="', esc_attr( $meta ), '" alt="" />';
403
+ echo '<a href="#" class="bsf_remove_file_button ', esc_attr( $field['class'] ),'" rel="', esc_attr( $field['id'] ), '">Remove Image</a>';
404
+ echo '</div>';
405
+ } else {
406
+ $parts = explode( '/', $meta );
407
+ $parts_count = count( $parts );
408
+ for ( $i = 0; $i < $parts_count; ++$i ) {
409
+ $title = $parts[ $i ];
410
+ }
411
+ echo 'File: <strong>', esc_attr( $title ), '</strong>&nbsp;&nbsp;&nbsp; (<a href="', esc_attr( $meta ), '" target="_blank" rel="external">Download</a> / <a href="#" class="bsf_remove_file_button" rel="', esc_attr( $field['id'] ), '">Remove</a>)';
412
+ }
413
+ }
414
+ echo '</div>';
415
+ break;
416
+ case 'oembed':
417
+ echo '<input class="bsf_oembed ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" />','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
418
+ echo '<p class="bsf-spinner spinner ', esc_attr( $field['class'] ),'"></p>';
419
+ echo '<div id="', esc_attr( $field['id'] ), '_status" class="bsf_media_status ui-helper-clearfix embed_wrap ', esc_attr( $field['class'] ),'">';
420
+ if ( '' != $meta ) {
421
+ $check_embed = $GLOBALS['wp_embed']->run_shortcode( '[embed]' . esc_url( $meta ) . '[/embed]' );
422
+ if ( $check_embed ) {
423
+ echo '<div class="embed_status ', esc_attr( $field['class'] ),'">';
424
+ echo esc_html( $check_embed );
425
+ echo '<a href="#" class="bsf_remove_file_button ', esc_attr( $field['class'] ),'" rel="', esc_attr( $field['id'] ), '">Remove Embed</a>';
426
+ echo '</div>';
427
+ } else {
428
+ echo 'URL is not a valid oEmbed URL.';
429
+ }
430
+ }
431
+ echo '</div>';
432
+ break;
433
+ default:
434
+ do_action( 'bsf_render_' . $field['type'], $field, $meta );
435
+ }
436
+ echo '</td>','</tr>';
437
+ }
438
+ echo '<td></td>','<td class="bsf-table-data"><div class="bsf-tooltip"><span class="dashicons dashicons-info"></span><span class="bsf-tooltiptext">Don&#39;t want Schema data to be visible on your site&#39;s frontend? <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=editpage" target="_blank">Use Schema Pro</span></a></div></td>';
439
+ echo '</table>';
440
+ }
441
+ /**
442
+ * Save data from metabox.
443
+ *
444
+ * @param string $post_id Post ID.
445
+ */
446
+ public function save( $post_id ) {
447
+ // verify nonce.
448
+ if ( ! isset( $_POST['wp_meta_box_nonce'] ) || ! wp_verify_nonce( esc_attr( $_POST['wp_meta_box_nonce'] ), basename( __FILE__ ) ) ) {
449
+ return $post_id;
450
+ }
451
+ // check autosave.
452
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
453
+ return $post_id;
454
+ }
455
+ // check permissions.
456
+ if ( 'page' == esc_attr( $_POST['post_type'] ) ) {
457
+ if ( ! current_user_can( 'edit_page', $post_id ) ) {
458
+ return $post_id;
459
+ }
460
+ } elseif ( ! current_user_can( 'edit_post', $post_id ) ) {
461
+ return $post_id;
462
+ }
463
+ foreach ( $this->_meta_box['fields'] as $field ) {
464
+ $name = esc_attr( $field['id'] );
465
+ if ( ! isset( $field['multiple'] ) ) {
466
+ $field['multiple'] = ( 'multicheck' == $field['type'] ) ? true : false;
467
+ }
468
+ $old = get_post_meta( $post_id, $name, ! $field['multiple'] /* If multicheck this can be multiple values */ );
469
+ $new = isset( $_POST[ esc_attr( $field['id'] ) ] ) ? esc_attr( $_POST[ esc_attr( $field['id'] ) ] ) : null;
470
+ if ( in_array( $field['type'], array( 'taxonomy_select', 'taxonomy_radio', 'taxonomy_multicheck' ) ) ) {
471
+ $new = wp_set_object_terms( $post_id, $new, $field['taxonomy'] );
472
+ }
473
+ if ( ( 'textarea' == $field['type'] ) || ( 'textarea_small' == $field['type'] ) ) {
474
+ $new = htmlspecialchars( $new ); //phpcs:ignore:PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault.NotSet
475
+ }
476
+ if ( ( 'textarea_code' == $field['type'] ) ) {
477
+ $new = htmlspecialchars_decode( $new );
478
+ }
479
+ if ( 'text_date_timestamp' == $field['type'] ) {
480
+ $new = strtotime( $new );
481
+ }
482
+ if ( 'text_datetime_timestamp' == $field['type'] ) {
483
+ $string = $new['date'] . ' ' . $new['time'];
484
+ $new = strtotime( $string );
485
+ }
486
+ $new = apply_filters( 'bsf_validate_' . $field['type'], $new, $post_id, $field );
487
+ // validate meta value.
488
+ if ( isset( $field['validate_func'] ) ) {
489
+ $ok = call_user_func( array( 'Bsf_Meta_Box_Validate', $field['validate_func'] ), $new );
490
+ if ( false === $ok ) { // pass away when meta value is invalid.
491
+ continue;
492
+ }
493
+ } elseif ( $field['multiple'] ) {
494
+ delete_post_meta( $post_id, $name );
495
+ if ( ! empty( $new ) ) {
496
+ foreach ( $new as $add_new ) {
497
+ add_post_meta( $post_id, $name, $add_new, false );
498
+ }
499
+ }
500
+ } elseif ( '' !== $new && $new != $old ) {
501
+ update_post_meta( $post_id, $name, $new );
502
+ } elseif ( '' == $new ) {
503
+ delete_post_meta( $post_id, $name );
504
+ }
505
+ if ( 'file' == $field['type'] ) {
506
+ $name = esc_attr( $field['id'] ) . '_id';
507
+ $old = get_post_meta( $post_id, $name, ! $field['multiple'] /* If multicheck this can be multiple values */ );
508
+ if ( isset( $field['save_id'] ) && $field['save_id'] ) {
509
+ $new = isset( $_POST[ $name ] ) ? esc_attr( $_POST[ $name ] ) : null;
510
+ } else {
511
+ $new = '';
512
+ }
513
+ if ( $new && $new != $old ) {
514
+ update_post_meta( $post_id, $name, $new );
515
+ } elseif ( '' == $new && $old ) {
516
+ delete_post_meta( $post_id, $name, $old );
517
+ }
518
+ }
519
+ }
520
+ }
521
+ }
522
+ /**
523
+ * Adding scripts and styles
524
+ *
525
+ * @param string $hook Hook.
526
+ */
527
+ function bsf_scripts( $hook ) {
528
+ global $wp_version;
529
+ // only enqueue our scripts/styles on the proper pages.
530
+ if ( 'post.php' == $hook || 'post-new.php' == $hook || 'page-new.php' == $hook || 'page.php' == $hook ) {
531
+ // scripts required for cmb.
532
+ $bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
533
+ // styles required for cmb.
534
+ $bsf_style_array = array( 'thickbox' );
535
+ // if we're 3.5 or later, user wp-color-picker.
536
+ if ( 3.5 <= $wp_version ) {
537
+ $bsf_script_array[] = 'wp-color-picker';
538
+ $bsf_style_array[] = 'wp-color-picker';
539
+ } else {
540
+ // otherwise use the older 'farbtastic'.
541
+ $bsf_script_array[] = 'farbtastic';
542
+ $bsf_style_array[] = 'farbtastic';
543
+ }
544
+ wp_register_script( 'bsf-timepicker', BSF_META_BOX_URL . 'js/jquery.timePicker.min.js', false ); //phpcs:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion
545
+ wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', $bsf_script_array, '0.9.1', false );
546
+ wp_localize_script(
547
+ 'bsf-scripts',
548
+ 'bsf_ajax_data',
549
+ array(
550
+ 'ajax_nonce' => wp_create_nonce( 'ajax_nonce' ),
551
+ 'post_id' => get_the_ID(),
552
+ )
553
+ );
554
+ wp_enqueue_script( 'bsf-timepicker' );
555
+ wp_enqueue_script( 'bsf-scripts' );
556
+ wp_register_style( 'bsf-styles', BSF_META_BOX_URL . 'admin/css/style.css', $bsf_style_array ); //phpcs:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion
557
+ wp_enqueue_style( 'bsf-styles' );
558
+ }
559
+ }
560
+ add_action( 'admin_enqueue_scripts', 'bsf_scripts', 10 );
561
+ /**
562
+ * Bsf_editor_footer_scripts.
563
+ */
564
+ function bsf_editor_footer_scripts() { ?>
565
+ <?php
566
+ if ( isset( $_GET['bsf_force_send'] ) && isset( $_GET['bsf_file_upload_nonce'] ) && wp_verify_nonce( $_GET['bsf_file_upload_nonce'], 'ajax_nonce' ) && 'true' == esc_attr( $_GET['bsf_force_send'] ) ) {
567
+ $label = esc_attr( $_GET['bsf_send_label'] );
568
+ if ( empty( $label ) ) {
569
+ $label = 'Select File';
570
+ }
571
+ ?>
572
+ <script type="text/javascript">
573
+ jQuery(function($) {
574
+ $('td.savesend input').val('<?php echo esc_attr( $label ); ?>');
575
+ });
576
+ </script>
577
+ <?php
578
+ }
579
+ }
580
+ add_action( 'admin_print_footer_scripts', 'bsf_editor_footer_scripts', 99 );
581
+ // Force 'Insert into Post' button from Media Library.
582
+ add_filter( 'get_media_item_args', 'bsf_force_send' );
583
+ /**
584
+ * Bsf_force_send.
585
+ *
586
+ * @param array $args Arguments.
587
+ */
588
+ function bsf_force_send( $args ) {
589
+
590
+ if ( ! isset( $_GET['bsf_file_upload_nonce'] ) || ! wp_verify_nonce( $_GET['bsf_file_upload_nonce'], 'ajax_nonce' ) ) {
591
+ return;
592
+ }
593
+ // if the Gallery tab is opened from a custom meta box field, add Insert Into Post button.
594
+ if ( isset( $_GET['bsf_force_send'] ) && 'true' == esc_attr( $_GET['bsf_force_send'] ) ) {
595
+ $args['send'] = true;
596
+ }
597
+ // if the From Computer tab is opened AT ALL, add Insert Into Post button after an image is uploaded.
598
+ if ( isset( $_POST['attachment_id'] ) && '' != esc_attr( $_POST['attachment_id'] ) ) {
599
+ $args['send'] = true;
600
+ // TO DO: Are there any conditions in which we don't want the Insert Into Post.
601
+ // button added? For example, if a post type supports thumbnails, does not support.
602
+ // the editor, and does not have any cmb file inputs? If so, here's the first.
603
+ // bits of code needed to check all that.
604
+ // $attachment_ancestors = get_post_ancestors( $_POST["attachment_id"] );.
605
+ // $attachment_parent_post_type = get_post_type( $attachment_ancestors[0] );.
606
+ // $post_type_object = get_post_type_object( $attachment_parent_post_type );.
607
+ }
608
+ // change the label of the button on the From Computer tab.
609
+ if ( isset( $_POST['attachment_id'] ) && '' != esc_attr( $_POST['attachment_id'] ) ) {
610
+ echo '
611
+ <script type="text/javascript">
612
+ function cmbGetParameterByNameInline(name) {
613
+ name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
614
+ var regexS = "[\\?&]" + name + "=([^&#]*)";
615
+ var regex = new RegExp(regexS);
616
+ var results = regex.exec(window.location.href);
617
+ if(results == null)
618
+ return "";
619
+ else
620
+ return decodeURIComponent(results[1].replace(/\+/g, " "));
621
+ }
622
+ jQuery(function($) {
623
+ if (cmbGetParameterByNameInline("bsf_force_send")=="true") {
624
+ var bsf_send_label = cmbGetParameterByNameInline("bsf_send_label");
625
+ $("td.savesend input").val(bsf_send_label);
626
+ }
627
+ });
628
+ </script>
629
+ ';
630
+ }
631
+ return $args;
632
+ }
633
+ add_action( 'wp_ajax_bsf_oembed_handler', 'bsf_oembed_ajax_results' );
634
+ /**
635
+ * Handles our oEmbed ajax request.
636
+ */
637
+ function bsf_oembed_ajax_results() {
638
+ // verify our nonce.
639
+ if ( ! ( isset( $_REQUEST['bsf_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['bsf_ajax_nonce'], 'ajax_nonce' ) ) ) {
640
+ die();
641
+ }
642
+ // sanitize our search string.
643
+ $oembed_string = sanitize_text_field( $_REQUEST['oembed_url'] );
644
+ if ( empty( $oembed_string ) ) {
645
+ $return = '<p class="ui-state-error-text">' . __( 'Please Try Again', 'all-in-one-schemaorg-rich-snippets' ) . '</p>';
646
+ $found = 'not found';
647
+ } else {
648
+ global $wp_embed;
649
+ $oembed_url = esc_url( $oembed_string );
650
+ // Post ID is needed to check for embeds.
651
+ if ( isset( $_REQUEST['post_id'] ) ) {
652
+ $GLOBALS['post'] = get_post( esc_attr( $_REQUEST['post_id'] ) ); //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
653
+ }
654
+ // ping WordPress for an embed.
655
+ $check_embed = $wp_embed->run_shortcode( '[embed]' . $oembed_url . '[/embed]' );
656
+ // fallback that WordPress creates when no oEmbed was found.
657
+ $fallback = $wp_embed->maybe_make_link( $oembed_url );
658
+ if ( $check_embed && $check_embed != $fallback ) {
659
+ // Embed data.
660
+ $return = '<div class="embed_status">' . $check_embed . '<a href="#" class="bsf_remove_file_button" rel="' . esc_attr( $_REQUEST['field_id'] ) . '">' . __( 'Remove Embed', 'all-in-one-schemaorg-rich-snippets' ) . '</a></div>';
661
+ // set our response id.
662
+ $found = 'found';
663
+ } else {
664
+ // error info when no oEmbeds were found.
665
+ /* translators: %s: $fallback */
666
+ $return = '<p class="ui-state-error-text">' . sprintf( __( 'No oEmbed Results Found for %s. View more info at', 'all-in-one-schemaorg-rich-snippets' ), $fallback ) . ' <a href="http://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>.</p>';
667
+ // set our response id.
668
+ $found = 'not found';
669
+ }
670
+ }
671
+ // send back our encoded data.
672
+ echo wp_json_encode(
673
+ array(
674
+ 'result' => $return,
675
+ 'id' => $found,
676
+ )
677
+ );
678
+ die();
679
+ }
680
+ // End. That's it, folks! //.
681
+ ?>
js/cmb.js CHANGED
@@ -67,11 +67,12 @@
67
  formfield = $(this).attr('name');
68
  $('#' + formfield + '_id').val("");
69
  });
 
70
  $('.bsf_upload_button').live('click', function () {
71
  var buttonLabel;
72
  formfield = $(this).prev('input').attr('name');
73
  buttonLabel = 'Use as ' + $('label[for=' + formfield + ']').text();
74
- tb_show('', 'media-upload.php?post_id=' + $('#post_ID').val() + '&type=file&bsf_force_send=true&bsf_send_label=' + buttonLabel + '&TB_iframe=true');
75
  return false;
76
  });
77
  $('.bsf_remove_file_button').live('click', function () {
@@ -125,6 +126,6 @@
125
  CMBMeta.TimePicker();
126
  CMBMeta.DatePicker();
127
  CMBMeta.ColorPicker();
128
- // CMBMeta.FileUpload();
129
  });
130
  }(jQuery));
67
  formfield = $(this).attr('name');
68
  $('#' + formfield + '_id').val("");
69
  });
70
+
71
  $('.bsf_upload_button').live('click', function () {
72
  var buttonLabel;
73
  formfield = $(this).prev('input').attr('name');
74
  buttonLabel = 'Use as ' + $('label[for=' + formfield + ']').text();
75
+ tb_show('', 'media-upload.php?post_id=' + $('#post_ID').val() + '&type=file&bsf_force_send=true&bsf_send_label=' + buttonLabel + '&TB_iframe=true&bsf_file_upload_nonce=' + bsf_ajax_data.ajax_nonce );
76
  return false;
77
  });
78
  $('.bsf_remove_file_button').live('click', function () {
126
  CMBMeta.TimePicker();
127
  CMBMeta.DatePicker();
128
  CMBMeta.ColorPicker();
129
+ // CMBMeta.FileUpload();
130
  });
131
  }(jQuery));
languages/all-in-one-schemaorg-rich-snippets.pot ADDED
@@ -0,0 +1,1455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020 Brainstorm Force
2
+ # This file is distributed under the GPL2.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Schema - All In One Schema Rich Snippets 1.6.0\n"
6
+ "Report-Msgid-Bugs-To: "
7
+ "https://wordpress.org/support/plugin/all-in-one-schemaorg-rich-snippets\n"
8
+ "POT-Creation-Date: 2020-02-27 06:43:26+00:00\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=utf-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: en\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "X-Poedit-Country: United States\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+ "X-Poedit-KeywordsList: "
20
+ "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
21
+ "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
22
+ "X-Poedit-Basepath: ../\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+ "X-Poedit-Bookmarks: \n"
25
+ "X-Textdomain-Support: yes\n"
26
+ "X-Generator: grunt-wp-i18n 1.0.3\n"
27
+
28
+ #: admin/index.php:88
29
+ msgid "All in One Schema.org Rich Snippets - Dashboard"
30
+ msgstr ""
31
+
32
+ #: admin/index.php:93
33
+ msgid "Configuration"
34
+ msgstr ""
35
+
36
+ #: admin/index.php:94
37
+ msgid "Customization"
38
+ msgstr ""
39
+
40
+ #: admin/index.php:96
41
+ msgid "FAQs"
42
+ msgstr ""
43
+
44
+ #: admin/index.php:97
45
+ msgid "Getting Started"
46
+ msgstr ""
47
+
48
+ #: admin/index.php:104
49
+ msgid ""
50
+ "Choose the schema markup and update the strings you want to display on the "
51
+ "front-end."
52
+ msgstr ""
53
+
54
+ #: admin/index.php:110 meta-boxes.php:56
55
+ msgid "Item Review"
56
+ msgstr ""
57
+
58
+ #: admin/index.php:113
59
+ msgid ""
60
+ "Strings to be displayed on frontend for <strong>Item Review Rich Snippets "
61
+ "&mdash;</strong>"
62
+ msgstr ""
63
+
64
+ #: admin/index.php:120 admin/index.php:162 admin/index.php:212
65
+ #: admin/index.php:262 admin/index.php:312 admin/index.php:370
66
+ #: admin/index.php:422 admin/index.php:464 admin/index.php:514
67
+ msgid "Rich Snippet Title :"
68
+ msgstr ""
69
+
70
+ #: admin/index.php:124
71
+ msgid "Reviewer :"
72
+ msgstr ""
73
+
74
+ #: admin/index.php:128
75
+ msgid "Review Date :"
76
+ msgstr ""
77
+
78
+ #: admin/index.php:132
79
+ msgid "Item Name :"
80
+ msgstr ""
81
+
82
+ #: admin/index.php:136
83
+ msgid "Item Ratings :"
84
+ msgstr ""
85
+
86
+ #: admin/index.php:142 admin/index.php:192 admin/index.php:242
87
+ #: admin/index.php:292 admin/index.php:350 admin/index.php:400
88
+ #: admin/index.php:444 admin/index.php:494 admin/index.php:552
89
+ #: admin/index.php:878
90
+ msgid "Update "
91
+ msgstr ""
92
+
93
+ #: admin/index.php:142 admin/index.php:192 admin/index.php:242
94
+ #: admin/index.php:292 admin/index.php:350 admin/index.php:400
95
+ #: admin/index.php:444 admin/index.php:494 admin/index.php:552
96
+ #: admin/index.php:842
97
+ msgid "Reset "
98
+ msgstr ""
99
+
100
+ #: admin/index.php:152
101
+ msgid "Events"
102
+ msgstr ""
103
+
104
+ #: admin/index.php:155
105
+ msgid ""
106
+ "Strings to be displayed on frontend for <strong>Events Rich Snippets "
107
+ "&mdash;</strong>"
108
+ msgstr ""
109
+
110
+ #: admin/index.php:166
111
+ msgid "Event Title :"
112
+ msgstr ""
113
+
114
+ #: admin/index.php:170
115
+ msgid "Event Location :"
116
+ msgstr ""
117
+
118
+ #: admin/index.php:174
119
+ msgid "Start Time :"
120
+ msgstr ""
121
+
122
+ #: admin/index.php:178
123
+ msgid "End Time :"
124
+ msgstr ""
125
+
126
+ #: admin/index.php:182 admin/index.php:340 admin/index.php:430
127
+ #: admin/index.php:476 admin/index.php:526
128
+ msgid "Description :"
129
+ msgstr ""
130
+
131
+ #: admin/index.php:186
132
+ msgid "Ticket Promotion :"
133
+ msgstr ""
134
+
135
+ #: admin/index.php:202 meta-boxes.php:64
136
+ msgid "Person"
137
+ msgstr ""
138
+
139
+ #: admin/index.php:205
140
+ msgid ""
141
+ "Strings to be displayed on frontend for <strong>Person's Rich Snippets "
142
+ "&mdash;</strong>"
143
+ msgstr ""
144
+
145
+ #: admin/index.php:216
146
+ msgid "Person's Name :"
147
+ msgstr ""
148
+
149
+ #: admin/index.php:220
150
+ msgid "Nick Name :"
151
+ msgstr ""
152
+
153
+ #: admin/index.php:224
154
+ msgid "Job Title :"
155
+ msgstr ""
156
+
157
+ #: admin/index.php:228
158
+ msgid "Home page :"
159
+ msgstr ""
160
+
161
+ #: admin/index.php:232
162
+ msgid "Company Name :"
163
+ msgstr ""
164
+
165
+ #: admin/index.php:236
166
+ msgid "Address :"
167
+ msgstr ""
168
+
169
+ #: admin/index.php:252 meta-boxes.php:68 meta-boxes.php:132
170
+ msgid "Product"
171
+ msgstr ""
172
+
173
+ #: admin/index.php:255
174
+ msgid ""
175
+ "Strings to be displayed on frontend for <strong>Product Rich Snippets "
176
+ "&mdash;</strong>"
177
+ msgstr ""
178
+
179
+ #: admin/index.php:266 admin/index.php:374
180
+ msgid "Author Rating :"
181
+ msgstr ""
182
+
183
+ #: admin/index.php:270
184
+ msgid "Brand Name :"
185
+ msgstr ""
186
+
187
+ #: admin/index.php:274
188
+ msgid "Product Name :"
189
+ msgstr ""
190
+
191
+ #: admin/index.php:278 admin/index.php:378
192
+ msgid "User Rating :"
193
+ msgstr ""
194
+
195
+ #: admin/index.php:282
196
+ msgid "Price :"
197
+ msgstr ""
198
+
199
+ #: admin/index.php:286
200
+ msgid "Product Availability :"
201
+ msgstr ""
202
+
203
+ #: admin/index.php:302 meta-boxes.php:72 meta-boxes.php:136
204
+ msgid "Recipe"
205
+ msgstr ""
206
+
207
+ #: admin/index.php:305
208
+ msgid ""
209
+ "Strings to be displayed on frontend for <strong>Recipe Rich Snippets "
210
+ "&mdash;</strong>"
211
+ msgstr ""
212
+
213
+ #: admin/index.php:316
214
+ msgid "Recipe Name :"
215
+ msgstr ""
216
+
217
+ #: admin/index.php:320
218
+ msgid "Author Name :"
219
+ msgstr ""
220
+
221
+ #: admin/index.php:324
222
+ msgid "Published On : "
223
+ msgstr ""
224
+
225
+ #: admin/index.php:328
226
+ msgid "Preparation Time:"
227
+ msgstr ""
228
+
229
+ #: admin/index.php:332
230
+ msgid "Cook Time :"
231
+ msgstr ""
232
+
233
+ #: admin/index.php:336
234
+ msgid "Total Time :"
235
+ msgstr ""
236
+
237
+ #: admin/index.php:344
238
+ msgid "Average Rating:"
239
+ msgstr ""
240
+
241
+ #: admin/index.php:360 meta-boxes.php:76 meta-boxes.php:140
242
+ msgid "Software Application"
243
+ msgstr ""
244
+
245
+ #: admin/index.php:363
246
+ msgid ""
247
+ "Strings to be displayed on frontend for <strong>Software Application Rich "
248
+ "Snippets &mdash;</strong>"
249
+ msgstr ""
250
+
251
+ #: admin/index.php:382
252
+ msgid "Software Price :"
253
+ msgstr ""
254
+
255
+ #: admin/index.php:386
256
+ msgid "Software Name:"
257
+ msgstr ""
258
+
259
+ #: admin/index.php:390
260
+ msgid "Operating System :"
261
+ msgstr ""
262
+
263
+ #: admin/index.php:394
264
+ msgid "Landing Page:"
265
+ msgstr ""
266
+
267
+ #: admin/index.php:412 meta-boxes.php:80 meta-boxes.php:144 meta-boxes.php:883
268
+ msgid "Video"
269
+ msgstr ""
270
+
271
+ #: admin/index.php:415
272
+ msgid ""
273
+ "Strings to be displayed on frontend for <strong>Video Rich Snippets "
274
+ "&mdash;</strong>"
275
+ msgstr ""
276
+
277
+ #: admin/index.php:426
278
+ msgid "Video Title :"
279
+ msgstr ""
280
+
281
+ #: admin/index.php:434
282
+ msgid "Video Duration :"
283
+ msgstr ""
284
+
285
+ #: admin/index.php:438
286
+ msgid "Video Upload Date :"
287
+ msgstr ""
288
+
289
+ #: admin/index.php:454 meta-boxes.php:84
290
+ msgid "Article"
291
+ msgstr ""
292
+
293
+ #: admin/index.php:457
294
+ msgid ""
295
+ "Strings to be displayed on frontend for <strong>Article Rich Snippets "
296
+ "&mdash;</strong>"
297
+ msgstr ""
298
+
299
+ #: admin/index.php:468
300
+ msgid "Article Name :"
301
+ msgstr ""
302
+
303
+ #: admin/index.php:472
304
+ msgid "Author :"
305
+ msgstr ""
306
+
307
+ #: admin/index.php:480
308
+ msgid "Image :"
309
+ msgstr ""
310
+
311
+ #: admin/index.php:484
312
+ msgid "Publisher :"
313
+ msgstr ""
314
+
315
+ #: admin/index.php:488
316
+ msgid "Publisher Logo :"
317
+ msgstr ""
318
+
319
+ #: admin/index.php:504 meta-boxes.php:88
320
+ msgid "Service"
321
+ msgstr ""
322
+
323
+ #: admin/index.php:507
324
+ msgid ""
325
+ "Strings to be displayed on frontend for <strong>Service Rich Snippets "
326
+ "&mdash;</strong>"
327
+ msgstr ""
328
+
329
+ #: admin/index.php:518
330
+ msgid "Service Type :"
331
+ msgstr ""
332
+
333
+ #: admin/index.php:522
334
+ msgid "Area :"
335
+ msgstr ""
336
+
337
+ #: admin/index.php:530
338
+ msgid "Provider Name :"
339
+ msgstr ""
340
+
341
+ #: admin/index.php:534
342
+ msgid "Provider Location :"
343
+ msgstr ""
344
+
345
+ #: admin/index.php:538
346
+ msgid "URL :"
347
+ msgstr ""
348
+
349
+ #: admin/index.php:542
350
+ msgid "URL Text :"
351
+ msgstr ""
352
+
353
+ #: admin/index.php:546
354
+ msgid "Service Rating :"
355
+ msgstr ""
356
+
357
+ #: admin/index.php:564
358
+ msgid ""
359
+ "Need some more schema types with automation to implement schema markup? Get "
360
+ "the latest and premium schema markup plugin to automate the process of "
361
+ "adding schema markup on your entire website. <br><a "
362
+ "href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_"
363
+ "medium=configure' target='_blank'> Know more about Schema Pro.</a>"
364
+ msgstr ""
365
+
366
+ #: admin/index.php:576
367
+ msgid "Welcome to All In One Schema Rich Snippets"
368
+ msgstr ""
369
+
370
+ #: admin/index.php:607
371
+ msgid "How it works"
372
+ msgstr ""
373
+
374
+ #: admin/index.php:610
375
+ msgid "Configure The Settings"
376
+ msgstr ""
377
+
378
+ #: admin/index.php:611
379
+ msgid ""
380
+ "Go to the “Rich Snippets” option in your WordPress dashboard. Under the "
381
+ "Configuration tab, select your desired schema type and update the strings "
382
+ "you want to display on the front-end. You can use the Customization tab to "
383
+ "manage how your rich snippet content box will look."
384
+ msgstr ""
385
+
386
+ #: admin/index.php:612
387
+ msgid "Add Markup To Pages"
388
+ msgstr ""
389
+
390
+ #: admin/index.php:612
391
+ msgid ""
392
+ "Edit the posts or pages where you wish to add rich snippets and scroll down "
393
+ "to the “Configure Rich Snippet” meta box to add schema markup."
394
+ msgstr ""
395
+
396
+ #: admin/index.php:613
397
+ msgid "Test Your Rich Snippets"
398
+ msgstr ""
399
+
400
+ #: admin/index.php:613
401
+ msgid ""
402
+ "Google Structured Data Testing is a widely used online tool to test "
403
+ "structured data. Open the <a "
404
+ "href='https://search.google.com/structured-data/testing-tool/u/0/' "
405
+ "target='_blank'>Google Structured Testing Tool</a> and fetch your website "
406
+ "URL to test the schema markup you’ve just implemented on your webpages."
407
+ msgstr ""
408
+
409
+ #: admin/index.php:618
410
+ msgid "Want to Automate Your Schema Markup?"
411
+ msgstr ""
412
+
413
+ #: admin/index.php:620
414
+ msgid "Consider Schema Pro"
415
+ msgstr ""
416
+
417
+ #: admin/index.php:621
418
+ msgid ""
419
+ "Schema Pro is an advanced schema markup plugin that automates the process "
420
+ "of adding schema markup on multiple pages with just a few clicks. Schema "
421
+ "Pro uses JSON-LD markup, which is the latest technology recommended by "
422
+ "Google. With it, you can kick those front-end content boxes to the curb "
423
+ "and<b> get rich snippets without displaying any new human-readable "
424
+ "content</b> on your site."
425
+ msgstr ""
426
+
427
+ #: admin/index.php:694
428
+ msgid "With Schema Pro, you can…"
429
+ msgstr ""
430
+
431
+ #: admin/index.php:704
432
+ msgid "Testimonials"
433
+ msgstr ""
434
+
435
+ #: admin/index.php:755
436
+ msgid "Where can I test my schema markup implementation?"
437
+ msgstr ""
438
+
439
+ #: admin/index.php:757
440
+ msgid ""
441
+ "You can use the standard Google Structured Data Testing Tool to test your "
442
+ "schema markup implementation. You can also take a look at the preview of "
443
+ "how your search result might look."
444
+ msgstr ""
445
+
446
+ #: admin/index.php:762
447
+ msgid "Do I have to fill in all the details?"
448
+ msgstr ""
449
+
450
+ #: admin/index.php:764
451
+ msgid ""
452
+ "No. But, every schema type has some fields that HAVE to be filled as stated "
453
+ "by Google. Therefore, it is recommended to fill these required fields in "
454
+ "the schema markup you are implementing."
455
+ msgstr ""
456
+
457
+ #: admin/index.php:769
458
+ msgid "Why does the plugin create extra content in the frontend? Can I hide it?"
459
+ msgstr ""
460
+
461
+ #: admin/index.php:778
462
+ msgid ""
463
+ "Does the plugin work with other plugins like WordPress SEO, WooCommerce, "
464
+ "etc?"
465
+ msgstr ""
466
+
467
+ #: admin/index.php:785
468
+ msgid "How long will it take to show up rich snippets for my search results?"
469
+ msgstr ""
470
+
471
+ #: admin/index.php:794
472
+ msgid "I don't see the feature I want. How can I get it?"
473
+ msgstr ""
474
+
475
+ #: admin/index.php:796
476
+ msgid ""
477
+ "<a href='https://wpschema.com/contact/' target='_blank'>Get in touch</a> "
478
+ "with us to ask if this feature is in our development roadmap. If it is not "
479
+ "in our roadmap, and if you still think this feature would make the plugin "
480
+ "better, we have a couple of options for you:"
481
+ msgstr ""
482
+
483
+ #: admin/index.php:798
484
+ msgid ""
485
+ "Code the new feature if you are a developer and submit your code. If we "
486
+ "include this feature in our releases, credits will be given to you."
487
+ msgstr ""
488
+
489
+ #: admin/index.php:799
490
+ msgid ""
491
+ "Offer a sponsorship to get this feature done for all plugin users OR "
492
+ "request a professional customisation service."
493
+ msgstr ""
494
+
495
+ #: admin/index.php:814
496
+ msgid "<span>Customize the look and feel of rich snippet box</span>"
497
+ msgstr ""
498
+
499
+ #: admin/index.php:821
500
+ msgid "Box Background "
501
+ msgstr ""
502
+
503
+ #: admin/index.php:825
504
+ msgid "Title Background"
505
+ msgstr ""
506
+
507
+ #: admin/index.php:829
508
+ msgid "Border Color"
509
+ msgstr ""
510
+
511
+ #: admin/index.php:833
512
+ msgid "Title Color"
513
+ msgstr ""
514
+
515
+ #: admin/index.php:837
516
+ msgid "Snippet Text Color"
517
+ msgstr ""
518
+
519
+ #: admin/index.php:849
520
+ msgid ""
521
+ "Don&#39;t want to add a content box on the front-end? Get the latest and "
522
+ "premium schema markup plugin that adds Google recommended JSON-LD "
523
+ "structured data format without the content box. <a "
524
+ "href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_"
525
+ "medium=customize' target='_blank'> Know more about Schema Pro.</a>"
526
+ msgstr ""
527
+
528
+ #: admin/index.php:863
529
+ msgid "WooCommerce Configuration"
530
+ msgstr ""
531
+
532
+ #: admin/index.php:868
533
+ msgid ""
534
+ "WooCommerce comes with Schema.org code by default and using our plugin on "
535
+ "WooCommerce product pages does will add duplicate schema so it is not "
536
+ "recommended. If you could still like to enable our plugin on WooCommerce "
537
+ "products, please enable this option."
538
+ msgstr ""
539
+
540
+ #: admin/index.php:1073
541
+ msgid "Success! Your changes were successfully saved!"
542
+ msgstr ""
543
+
544
+ #: admin/index.php:1075
545
+ msgid "Sorry, Your changes are not saved!"
546
+ msgstr ""
547
+
548
+ #: admin/index.php:1197
549
+ msgid "Get in touch with the Plugin Developers"
550
+ msgstr ""
551
+
552
+ #: admin/index.php:1201
553
+ msgid ""
554
+ "Just fill out the form below and your message will be emailed to the Plugin "
555
+ "Developers."
556
+ msgstr ""
557
+
558
+ #: admin/index.php:1203
559
+ msgid "Your Name:"
560
+ msgstr ""
561
+
562
+ #: admin/index.php:1205
563
+ msgid "Your Email:"
564
+ msgstr ""
565
+
566
+ #: admin/index.php:1207
567
+ msgid "Reference URL:"
568
+ msgstr ""
569
+
570
+ #: admin/index.php:1209
571
+ msgid "Subject:"
572
+ msgstr ""
573
+
574
+ #: admin/index.php:1220
575
+ msgid "Your Query in Brief:"
576
+ msgstr ""
577
+
578
+ #: functions.php:1241
579
+ msgid "Error adding your rating"
580
+ msgstr ""
581
+
582
+ #: functions.php:1241
583
+ msgid "Ratings added successfully !"
584
+ msgstr ""
585
+
586
+ #: functions.php:1271
587
+ msgid "Error updating your rating"
588
+ msgstr ""
589
+
590
+ #: functions.php:1271
591
+ msgid "Ratings updated successfully !"
592
+ msgstr ""
593
+
594
+ #: index.php:302
595
+ msgid "Thank you!"
596
+ msgstr ""
597
+
598
+ #: index.php:302
599
+ msgid "Something went wrong!"
600
+ msgstr ""
601
+
602
+ #: index.php:331
603
+ msgid "Settings saved !"
604
+ msgstr ""
605
+
606
+ #: index.php:331
607
+ msgid "Error occured. Settings were not saved !"
608
+ msgstr ""
609
+
610
+ #: init.php:645
611
+ msgid "Please Try Again"
612
+ msgstr ""
613
+
614
+ #: init.php:660
615
+ msgid "Remove Embed"
616
+ msgstr ""
617
+
618
+ #: init.php:666
619
+ #. translators: %s: $fallback
620
+ msgid "No oEmbed Results Found for %s. View more info at"
621
+ msgstr ""
622
+
623
+ #: meta-boxes.php:38
624
+ msgid "Configure Rich Snippet"
625
+ msgstr ""
626
+
627
+ #: meta-boxes.php:52
628
+ msgid "Select what this post is about"
629
+ msgstr ""
630
+
631
+ #: meta-boxes.php:60 meta-boxes.php:128 settings.php:28
632
+ msgid "Event"
633
+ msgstr ""
634
+
635
+ #: meta-boxes.php:96
636
+ msgid "Rich Snippets - Item Review"
637
+ msgstr ""
638
+
639
+ #: meta-boxes.php:97 meta-boxes.php:343 meta-boxes.php:435 meta-boxes.php:443
640
+ #: meta-boxes.php:521 meta-boxes.php:600 meta-boxes.php:700 meta-boxes.php:771
641
+ #: meta-boxes.php:856 meta-boxes.php:915 meta-boxes.php:966
642
+ msgid "Please provide the following information."
643
+ msgstr ""
644
+
645
+ #: meta-boxes.php:103
646
+ msgid "Reviewer&rsquo;s Name "
647
+ msgstr ""
648
+
649
+ #: meta-boxes.php:104
650
+ msgid "Enter the name of Item Reviewer or The Post Author."
651
+ msgstr ""
652
+
653
+ #: meta-boxes.php:110
654
+ msgid "Item to be reviewed"
655
+ msgstr ""
656
+
657
+ #: meta-boxes.php:111
658
+ msgid "Enter the name of the item, you are writing review about."
659
+ msgstr ""
660
+
661
+ #: meta-boxes.php:117
662
+ msgid "Item Review Type"
663
+ msgstr ""
664
+
665
+ #: meta-boxes.php:118
666
+ msgid "Select the item to be reviewed."
667
+ msgstr ""
668
+
669
+ #: meta-boxes.php:124
670
+ msgid "Select Item type"
671
+ msgstr ""
672
+
673
+ #: meta-boxes.php:150
674
+ msgid "Event Name"
675
+ msgstr ""
676
+
677
+ #: meta-boxes.php:151
678
+ msgid "Enter the Event name."
679
+ msgstr ""
680
+
681
+ #: meta-boxes.php:157
682
+ msgid "Event Start Date "
683
+ msgstr ""
684
+
685
+ #: meta-boxes.php:158 meta-boxes.php:399
686
+ msgid "Provide the Event Start Date."
687
+ msgstr ""
688
+
689
+ #: meta-boxes.php:164
690
+ msgid "Event Location "
691
+ msgstr ""
692
+
693
+ #: meta-boxes.php:165 meta-boxes.php:357
694
+ msgid "Location Name Here"
695
+ msgstr ""
696
+
697
+ #: meta-boxes.php:172 meta-boxes.php:364 meta-boxes.php:1008
698
+ msgid "Street Address"
699
+ msgstr ""
700
+
701
+ #: meta-boxes.php:179 meta-boxes.php:371 meta-boxes.php:1015
702
+ msgid "Locality"
703
+ msgstr ""
704
+
705
+ #: meta-boxes.php:186 meta-boxes.php:378 meta-boxes.php:584 meta-boxes.php:1022
706
+ msgid "Region"
707
+ msgstr ""
708
+
709
+ #: meta-boxes.php:193 meta-boxes.php:385 meta-boxes.php:492 meta-boxes.php:591
710
+ #: meta-boxes.php:1029
711
+ msgid "Postal Code"
712
+ msgstr ""
713
+
714
+ #: meta-boxes.php:199 meta-boxes.php:642 settings.php:62
715
+ msgid "Product Name"
716
+ msgstr ""
717
+
718
+ #: meta-boxes.php:200
719
+ msgid "Enter the Product name."
720
+ msgstr ""
721
+
722
+ #: meta-boxes.php:206 meta-boxes.php:656
723
+ msgid "Product Price"
724
+ msgstr ""
725
+
726
+ #: meta-boxes.php:207 meta-boxes.php:657
727
+ msgid "Enter the product Price."
728
+ msgstr ""
729
+
730
+ #: meta-boxes.php:213 meta-boxes.php:419 meta-boxes.php:663
731
+ msgid "Currency "
732
+ msgstr ""
733
+
734
+ #: meta-boxes.php:214 meta-boxes.php:420 meta-boxes.php:664 meta-boxes.php:814
735
+ msgid ""
736
+ "Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a "
737
+ "href=\"http://www.science.co.il/International/Currency-Codes.asp\" "
738
+ "target=\"_blank\"> Know you currency code</a>"
739
+ msgstr ""
740
+
741
+ #: meta-boxes.php:220 meta-boxes.php:670
742
+ msgid "Availability"
743
+ msgstr ""
744
+
745
+ #: meta-boxes.php:221 meta-boxes.php:671
746
+ msgid "Select the products availability."
747
+ msgstr ""
748
+
749
+ #: meta-boxes.php:227 meta-boxes.php:677
750
+ msgid "__ Please Select __"
751
+ msgstr ""
752
+
753
+ #: meta-boxes.php:231 meta-boxes.php:681
754
+ msgid "Out of Stock"
755
+ msgstr ""
756
+
757
+ #: meta-boxes.php:235 meta-boxes.php:685
758
+ msgid "In Stock"
759
+ msgstr ""
760
+
761
+ #: meta-boxes.php:239 meta-boxes.php:689
762
+ msgid "In Store Only"
763
+ msgstr ""
764
+
765
+ #: meta-boxes.php:243 meta-boxes.php:693
766
+ msgid "Pre-Order"
767
+ msgstr ""
768
+
769
+ #: meta-boxes.php:249 meta-boxes.php:706
770
+ msgid "Recipe Name "
771
+ msgstr ""
772
+
773
+ #: meta-boxes.php:250 meta-boxes.php:707
774
+ msgid "Enter the recipe name."
775
+ msgstr ""
776
+
777
+ #: meta-boxes.php:256 meta-boxes.php:762
778
+ msgid "Recipe Photo"
779
+ msgstr ""
780
+
781
+ #: meta-boxes.php:257 meta-boxes.php:763
782
+ msgid "Upload or Select recipe photo. Medium size is recommended (300px X 300px)"
783
+ msgstr ""
784
+
785
+ #: meta-boxes.php:263 settings.php:99
786
+ msgid "Software Name"
787
+ msgstr ""
788
+
789
+ #: meta-boxes.php:264
790
+ msgid "Enter the Software name."
791
+ msgstr ""
792
+
793
+ #: meta-boxes.php:270
794
+ msgid "Software Operating System"
795
+ msgstr ""
796
+
797
+ #: meta-boxes.php:271
798
+ msgid "Enter the Operating System name."
799
+ msgstr ""
800
+
801
+ #: meta-boxes.php:277
802
+ msgid "Software Application Category"
803
+ msgstr ""
804
+
805
+ #: meta-boxes.php:278
806
+ msgid "Enter the Application Category name."
807
+ msgstr ""
808
+
809
+ #: meta-boxes.php:284 meta-boxes.php:862
810
+ msgid "Video Title"
811
+ msgstr ""
812
+
813
+ #: meta-boxes.php:285 meta-boxes.php:863
814
+ msgid "Enter the title for this video"
815
+ msgstr ""
816
+
817
+ #: meta-boxes.php:291 meta-boxes.php:869
818
+ msgid "Video Description"
819
+ msgstr ""
820
+
821
+ #: meta-boxes.php:292 meta-boxes.php:870
822
+ msgid "Enter the brief description for this video"
823
+ msgstr ""
824
+
825
+ #: meta-boxes.php:298 meta-boxes.php:876
826
+ msgid "Video Thumbnail"
827
+ msgstr ""
828
+
829
+ #: meta-boxes.php:299 meta-boxes.php:877
830
+ msgid ""
831
+ "Upload or select video thumbnail from gallery. Medium size is recommended "
832
+ "(300px X 300px)"
833
+ msgstr ""
834
+
835
+ #: meta-boxes.php:305 meta-boxes.php:906 settings.php:115
836
+ msgid "Upload Date"
837
+ msgstr ""
838
+
839
+ #: meta-boxes.php:306 meta-boxes.php:907
840
+ msgid "Provide the date when the video is uploaded"
841
+ msgstr ""
842
+
843
+ #: meta-boxes.php:312 meta-boxes.php:606
844
+ msgid "Your Rating"
845
+ msgstr ""
846
+
847
+ #: meta-boxes.php:313
848
+ msgid "&nbsp;&nbsp;Rate this item (1-5)"
849
+ msgstr ""
850
+
851
+ #: meta-boxes.php:342
852
+ msgid "Rich Snippets - Events"
853
+ msgstr ""
854
+
855
+ #: meta-boxes.php:349
856
+ msgid "Event Title "
857
+ msgstr ""
858
+
859
+ #: meta-boxes.php:350
860
+ msgid "What would be the name of the event?"
861
+ msgstr ""
862
+
863
+ #: meta-boxes.php:356
864
+ msgid "Location "
865
+ msgstr ""
866
+
867
+ #: meta-boxes.php:391
868
+ msgid "Description "
869
+ msgstr ""
870
+
871
+ #: meta-boxes.php:392
872
+ msgid "Describe the event in short."
873
+ msgstr ""
874
+
875
+ #: meta-boxes.php:398
876
+ msgid "Start Date "
877
+ msgstr ""
878
+
879
+ #: meta-boxes.php:405
880
+ msgid "End Date "
881
+ msgstr ""
882
+
883
+ #: meta-boxes.php:406
884
+ msgid "Provide the Event End Date."
885
+ msgstr ""
886
+
887
+ #: meta-boxes.php:412 settings.php:33
888
+ msgid "Offer Price"
889
+ msgstr ""
890
+
891
+ #: meta-boxes.php:413
892
+ msgid "Enter the ticket Price."
893
+ msgstr ""
894
+
895
+ #: meta-boxes.php:426
896
+ msgid "Url "
897
+ msgstr ""
898
+
899
+ #: meta-boxes.php:427
900
+ msgid "Url of buy ticket page"
901
+ msgstr ""
902
+
903
+ #: meta-boxes.php:434
904
+ msgid "Rich Snippets - Music"
905
+ msgstr ""
906
+
907
+ #: meta-boxes.php:442
908
+ msgid "Rich Snippets - Organization"
909
+ msgstr ""
910
+
911
+ #: meta-boxes.php:449
912
+ msgid "Organization Name "
913
+ msgstr ""
914
+
915
+ #: meta-boxes.php:450
916
+ msgid "Enter the Company or Organization Name."
917
+ msgstr ""
918
+
919
+ #: meta-boxes.php:456
920
+ msgid "Website URL "
921
+ msgstr ""
922
+
923
+ #: meta-boxes.php:457
924
+ msgid "Enter the Organization homepage url."
925
+ msgstr ""
926
+
927
+ #: meta-boxes.php:463
928
+ msgid "Contact No. "
929
+ msgstr ""
930
+
931
+ #: meta-boxes.php:464
932
+ msgid "Enter the Telephone No."
933
+ msgstr ""
934
+
935
+ #: meta-boxes.php:470
936
+ msgid "Address "
937
+ msgstr ""
938
+
939
+ #: meta-boxes.php:471
940
+ msgid "Street Name."
941
+ msgstr ""
942
+
943
+ #: meta-boxes.php:478
944
+ msgid "Locality."
945
+ msgstr ""
946
+
947
+ #: meta-boxes.php:485
948
+ msgid "Region."
949
+ msgstr ""
950
+
951
+ #: meta-boxes.php:499
952
+ msgid "Country Name"
953
+ msgstr ""
954
+
955
+ #: meta-boxes.php:505
956
+ msgid "GEO Location"
957
+ msgstr ""
958
+
959
+ #: meta-boxes.php:506
960
+ msgid ""
961
+ "Latitude. <a "
962
+ "href=\"http://universimmedia.pagesperso-orange.fr/geo/loc.htm\" "
963
+ "target=\"_blank\">Find Here.</a>"
964
+ msgstr ""
965
+
966
+ #: meta-boxes.php:513
967
+ msgid "Longitude."
968
+ msgstr ""
969
+
970
+ #: meta-boxes.php:520
971
+ msgid "Rich Snippets - Person"
972
+ msgstr ""
973
+
974
+ #: meta-boxes.php:527
975
+ msgid "Person&lsquo;s Name"
976
+ msgstr ""
977
+
978
+ #: meta-boxes.php:528
979
+ msgid "Enter the relative person&lsquo;s name."
980
+ msgstr ""
981
+
982
+ #: meta-boxes.php:534 settings.php:45
983
+ msgid "Nickname"
984
+ msgstr ""
985
+
986
+ #: meta-boxes.php:535
987
+ msgid "Enter the nickname (if any)."
988
+ msgstr ""
989
+
990
+ #: meta-boxes.php:541
991
+ msgid "Photograph"
992
+ msgstr ""
993
+
994
+ #: meta-boxes.php:542
995
+ msgid ""
996
+ "Upload the photo or select from media library. Medium size is recommended "
997
+ "(300px X 300px)"
998
+ msgstr ""
999
+
1000
+ #: meta-boxes.php:548
1001
+ msgid "Job Title "
1002
+ msgstr ""
1003
+
1004
+ #: meta-boxes.php:549
1005
+ msgid "Enter job title."
1006
+ msgstr ""
1007
+
1008
+ #: meta-boxes.php:555
1009
+ msgid "Homepage URL"
1010
+ msgstr ""
1011
+
1012
+ #: meta-boxes.php:556
1013
+ msgid "Enter homepage URL(if any)."
1014
+ msgstr ""
1015
+
1016
+ #: meta-boxes.php:562
1017
+ msgid "Company / Organization"
1018
+ msgstr ""
1019
+
1020
+ #: meta-boxes.php:563
1021
+ msgid "Enter Company or Organization name in affiliation."
1022
+ msgstr ""
1023
+
1024
+ #: meta-boxes.php:569 settings.php:49
1025
+ msgid "Address"
1026
+ msgstr ""
1027
+
1028
+ #: meta-boxes.php:570
1029
+ msgid "Enter Street"
1030
+ msgstr ""
1031
+
1032
+ #: meta-boxes.php:577
1033
+ msgid "Enter Locality"
1034
+ msgstr ""
1035
+
1036
+ #: meta-boxes.php:599
1037
+ msgid "Rich Snippets - Products"
1038
+ msgstr ""
1039
+
1040
+ #: meta-boxes.php:607
1041
+ msgid "Rate this product or aggregate rating."
1042
+ msgstr ""
1043
+
1044
+ #: meta-boxes.php:635 settings.php:61
1045
+ msgid "Brand Name"
1046
+ msgstr ""
1047
+
1048
+ #: meta-boxes.php:636
1049
+ msgid "Enter the products brand name"
1050
+ msgstr ""
1051
+
1052
+ #: meta-boxes.php:643
1053
+ msgid "Enter the product name."
1054
+ msgstr ""
1055
+
1056
+ #: meta-boxes.php:649
1057
+ msgid "Product Image"
1058
+ msgstr ""
1059
+
1060
+ #: meta-boxes.php:650
1061
+ msgid ""
1062
+ "Upload the product image or select from library. Medium size is recommended "
1063
+ "(300px X 300px)"
1064
+ msgstr ""
1065
+
1066
+ #: meta-boxes.php:699
1067
+ msgid "Rich Snippets - Recipes"
1068
+ msgstr ""
1069
+
1070
+ #: meta-boxes.php:713
1071
+ msgid "Author Name "
1072
+ msgstr ""
1073
+
1074
+ #: meta-boxes.php:714
1075
+ msgid "Enter the Author name."
1076
+ msgstr ""
1077
+
1078
+ #: meta-boxes.php:720
1079
+ msgid "Time Required "
1080
+ msgstr ""
1081
+
1082
+ #: meta-boxes.php:721
1083
+ msgid "Preperation time (Format: 1H30M. H - Hours, M - Minutes )"
1084
+ msgstr ""
1085
+
1086
+ #: meta-boxes.php:728
1087
+ msgid "Cook Time. (Format: 1H30M. H - Hours, M - Minutes )"
1088
+ msgstr ""
1089
+
1090
+ #: meta-boxes.php:735
1091
+ msgid "Total Time (Format: 1H30M. H - Hours, M - Minutes )"
1092
+ msgstr ""
1093
+
1094
+ #: meta-boxes.php:741 settings.php:30 settings.php:82 settings.php:113
1095
+ #: settings.php:127 settings.php:143
1096
+ msgid "Description"
1097
+ msgstr ""
1098
+
1099
+ #: meta-boxes.php:742
1100
+ msgid "Describe the recipe in short."
1101
+ msgstr ""
1102
+
1103
+ #: meta-boxes.php:748 meta-boxes.php:749 settings.php:83
1104
+ msgid "Nutrition"
1105
+ msgstr ""
1106
+
1107
+ #: meta-boxes.php:755 settings.php:84
1108
+ msgid "Ingredients"
1109
+ msgstr ""
1110
+
1111
+ #: meta-boxes.php:756
1112
+ msgid "Enter the ingredients used"
1113
+ msgstr ""
1114
+
1115
+ #: meta-boxes.php:770
1116
+ msgid "Rich Snippets - Software Application"
1117
+ msgstr ""
1118
+
1119
+ #: meta-boxes.php:777
1120
+ msgid "Software Rating"
1121
+ msgstr ""
1122
+
1123
+ #: meta-boxes.php:778
1124
+ msgid "Rate this software."
1125
+ msgstr ""
1126
+
1127
+ #: meta-boxes.php:806 settings.php:64 settings.php:98
1128
+ msgid "Price"
1129
+ msgstr ""
1130
+
1131
+ #: meta-boxes.php:807
1132
+ msgid "Enter the Price of Software"
1133
+ msgstr ""
1134
+
1135
+ #: meta-boxes.php:813
1136
+ msgid "Currency"
1137
+ msgstr ""
1138
+
1139
+ #: meta-boxes.php:820
1140
+ msgid "Software Name "
1141
+ msgstr ""
1142
+
1143
+ #: meta-boxes.php:821
1144
+ msgid "Enter the Software Name."
1145
+ msgstr ""
1146
+
1147
+ #: meta-boxes.php:827 settings.php:100
1148
+ msgid "Operating System"
1149
+ msgstr ""
1150
+
1151
+ #: meta-boxes.php:828
1152
+ msgid "Enter the software Operating System."
1153
+ msgstr ""
1154
+
1155
+ #: meta-boxes.php:834
1156
+ msgid "Application Category"
1157
+ msgstr ""
1158
+
1159
+ #: meta-boxes.php:835
1160
+ msgid "Like Game, Multimedia"
1161
+ msgstr ""
1162
+
1163
+ #: meta-boxes.php:841
1164
+ msgid "Software Image"
1165
+ msgstr ""
1166
+
1167
+ #: meta-boxes.php:842
1168
+ msgid ""
1169
+ "Upload or select image of software. Medium size is recommended (300px X "
1170
+ "300px)"
1171
+ msgstr ""
1172
+
1173
+ #: meta-boxes.php:848 settings.php:101
1174
+ msgid "Landing Page"
1175
+ msgstr ""
1176
+
1177
+ #: meta-boxes.php:849
1178
+ msgid "Enter the landing page url for software"
1179
+ msgstr ""
1180
+
1181
+ #: meta-boxes.php:855
1182
+ msgid "Rich Snippets - Videos"
1183
+ msgstr ""
1184
+
1185
+ #: meta-boxes.php:884
1186
+ msgid ""
1187
+ "Upload Video or enter the video file url<br>Example: <br> "
1188
+ "http://www.example.com/video123.flv<br>A URL pointing to the actual video "
1189
+ "media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, "
1190
+ ".avi, .flv, or other video file format"
1191
+ msgstr ""
1192
+
1193
+ #: meta-boxes.php:891
1194
+ msgid "Embed Video"
1195
+ msgstr ""
1196
+
1197
+ #: meta-boxes.php:892
1198
+ msgid ""
1199
+ "A URL pointing to a player for the specific video. Usually this is the "
1200
+ "information in the src element of an &lt;embed&gt;tag. <br>Example: "
1201
+ "<br>Youtube: https://www.youtube.com/embed/CibazcCevOk <br>Dailymotion: "
1202
+ "http://www.dailymotion.com/swf/x1o2g<br><div class=\"bsf_vd_note\"><h3>Add "
1203
+ "only one url either in \"Video\" or \"Embed Video\" field. Dont use "
1204
+ "both.</h3></div>"
1205
+ msgstr ""
1206
+
1207
+ #: meta-boxes.php:899
1208
+ msgid "Video Duration"
1209
+ msgstr ""
1210
+
1211
+ #: meta-boxes.php:900
1212
+ msgid "Enter the duration for this video"
1213
+ msgstr ""
1214
+
1215
+ #: meta-boxes.php:914
1216
+ msgid "Rich Snippets - Article"
1217
+ msgstr ""
1218
+
1219
+ #: meta-boxes.php:921
1220
+ msgid "Article Image"
1221
+ msgstr ""
1222
+
1223
+ #: meta-boxes.php:922 meta-boxes.php:957 meta-boxes.php:973
1224
+ msgid ""
1225
+ "Upload or select image from gallery. Medium size is recommended (300px X "
1226
+ "300px)"
1227
+ msgstr ""
1228
+
1229
+ #: meta-boxes.php:928 settings.php:125
1230
+ msgid "Article Name"
1231
+ msgstr ""
1232
+
1233
+ #: meta-boxes.php:929
1234
+ msgid "Enter the name for this article"
1235
+ msgstr ""
1236
+
1237
+ #: meta-boxes.php:935 meta-boxes.php:993
1238
+ msgid "Short Description"
1239
+ msgstr ""
1240
+
1241
+ #: meta-boxes.php:936
1242
+ msgid "Enter the brief description about this article (About 30 Words)"
1243
+ msgstr ""
1244
+
1245
+ #: meta-boxes.php:942 settings.php:126
1246
+ msgid "Author"
1247
+ msgstr ""
1248
+
1249
+ #: meta-boxes.php:943
1250
+ msgid "Enter the author name for this article"
1251
+ msgstr ""
1252
+
1253
+ #: meta-boxes.php:949
1254
+ msgid "Publisher - Orgnization"
1255
+ msgstr ""
1256
+
1257
+ #: meta-boxes.php:950
1258
+ msgid "Enter the publisher name for this article"
1259
+ msgstr ""
1260
+
1261
+ #: meta-boxes.php:956 settings.php:130
1262
+ msgid "Publisher Logo"
1263
+ msgstr ""
1264
+
1265
+ #: meta-boxes.php:965
1266
+ msgid "Rich Snippets - Service"
1267
+ msgstr ""
1268
+
1269
+ #: meta-boxes.php:972 settings.php:128
1270
+ msgid "Image"
1271
+ msgstr ""
1272
+
1273
+ #: meta-boxes.php:979 settings.php:141
1274
+ msgid "Service Type"
1275
+ msgstr ""
1276
+
1277
+ #: meta-boxes.php:980
1278
+ msgid "Enter the service type"
1279
+ msgstr ""
1280
+
1281
+ #: meta-boxes.php:986
1282
+ msgid "Service Served Area"
1283
+ msgstr ""
1284
+
1285
+ #: meta-boxes.php:987
1286
+ msgid "Enter the area where service is available"
1287
+ msgstr ""
1288
+
1289
+ #: meta-boxes.php:994
1290
+ msgid "Enter the description about service (About 30 Words)"
1291
+ msgstr ""
1292
+
1293
+ #: meta-boxes.php:1000 settings.php:147
1294
+ msgid "Provider Name"
1295
+ msgstr ""
1296
+
1297
+ #: meta-boxes.php:1001
1298
+ msgid "Enter the service provider name"
1299
+ msgstr ""
1300
+
1301
+ #: meta-boxes.php:1007 settings.php:29 settings.php:148
1302
+ msgid "Location"
1303
+ msgstr ""
1304
+
1305
+ #: meta-boxes.php:1035
1306
+ msgid "Provider Location Image"
1307
+ msgstr ""
1308
+
1309
+ #: meta-boxes.php:1036
1310
+ msgid ""
1311
+ "Upload the provider location image or select from library. Medium size is "
1312
+ "recommended (300px X 300px)"
1313
+ msgstr ""
1314
+
1315
+ #: meta-boxes.php:1042
1316
+ msgid "Telephone"
1317
+ msgstr ""
1318
+
1319
+ #: meta-boxes.php:1043
1320
+ msgid "Telephone number"
1321
+ msgstr ""
1322
+
1323
+ #: settings.php:13 settings.php:27 settings.php:43 settings.php:59
1324
+ #: settings.php:75 settings.php:95 settings.php:111 settings.php:124
1325
+ #: settings.php:140
1326
+ msgid "Summary"
1327
+ msgstr ""
1328
+
1329
+ #: settings.php:14
1330
+ msgid "Reviewer"
1331
+ msgstr ""
1332
+
1333
+ #: settings.php:15
1334
+ msgid "Review Date"
1335
+ msgstr ""
1336
+
1337
+ #: settings.php:16
1338
+ msgid "Reviewed Item"
1339
+ msgstr ""
1340
+
1341
+ #: settings.php:17 settings.php:60 settings.php:96
1342
+ msgid "Author Rating"
1343
+ msgstr ""
1344
+
1345
+ #: settings.php:31
1346
+ msgid "Starting on"
1347
+ msgstr ""
1348
+
1349
+ #: settings.php:32
1350
+ msgid "Ending on"
1351
+ msgstr ""
1352
+
1353
+ #: settings.php:44
1354
+ msgid "Name"
1355
+ msgstr ""
1356
+
1357
+ #: settings.php:46
1358
+ msgid "Job Title"
1359
+ msgstr ""
1360
+
1361
+ #: settings.php:47
1362
+ msgid "Website"
1363
+ msgstr ""
1364
+
1365
+ #: settings.php:48
1366
+ msgid "Company"
1367
+ msgstr ""
1368
+
1369
+ #: settings.php:63 settings.php:97
1370
+ msgid "Aggregate Rating"
1371
+ msgstr ""
1372
+
1373
+ #: settings.php:65
1374
+ msgid "Product Availability"
1375
+ msgstr ""
1376
+
1377
+ #: settings.php:76
1378
+ msgid "Recipe Name"
1379
+ msgstr ""
1380
+
1381
+ #: settings.php:77
1382
+ msgid "Author Name"
1383
+ msgstr ""
1384
+
1385
+ #: settings.php:78
1386
+ msgid "Published On"
1387
+ msgstr ""
1388
+
1389
+ #: settings.php:79
1390
+ msgid "Preparation Time"
1391
+ msgstr ""
1392
+
1393
+ #: settings.php:80
1394
+ msgid "Cook Time"
1395
+ msgstr ""
1396
+
1397
+ #: settings.php:81
1398
+ msgid "Total Time"
1399
+ msgstr ""
1400
+
1401
+ #: settings.php:85
1402
+ msgid "Average Rating"
1403
+ msgstr ""
1404
+
1405
+ #: settings.php:112
1406
+ msgid "Title"
1407
+ msgstr ""
1408
+
1409
+ #: settings.php:114
1410
+ msgid "Duration"
1411
+ msgstr ""
1412
+
1413
+ #: settings.php:129
1414
+ msgid "Publisher Name"
1415
+ msgstr ""
1416
+
1417
+ #: settings.php:142
1418
+ msgid "Area"
1419
+ msgstr ""
1420
+
1421
+ #: settings.php:144
1422
+ msgid "URL"
1423
+ msgstr ""
1424
+
1425
+ #: settings.php:145
1426
+ msgid "Click Here For More Info"
1427
+ msgstr ""
1428
+
1429
+ #: settings.php:146
1430
+ msgid "User Rating"
1431
+ msgstr ""
1432
+
1433
+ #: settings.php:149
1434
+ msgid "Provider telephone number"
1435
+ msgstr ""
1436
+
1437
+ #. Plugin Name of the plugin/theme
1438
+ msgid "Schema - All In One Schema Rich Snippets"
1439
+ msgstr ""
1440
+
1441
+ #. Author URI of the plugin/theme
1442
+ msgid "https://www.brainstormforce.com"
1443
+ msgstr ""
1444
+
1445
+ #. Description of the plugin/theme
1446
+ msgid ""
1447
+ "Welcome to the Schema - All In One Schema Rich Snippets! You can now easily "
1448
+ "add schema markup on various * pages and posts of your website. Implement "
1449
+ "schema types such as Review, Events, Recipes, Article, Products, Services * "
1450
+ "*etc."
1451
+ msgstr ""
1452
+
1453
+ #. Author of the plugin/theme
1454
+ msgid "Brainstorm Force"
1455
+ msgstr ""
meta-boxes.php CHANGED
@@ -1,935 +1,1053 @@
1
- <?php
2
- // Metabox for review
3
- function bsf_metaboxes( array $meta_boxes ) {
4
- // Start with an underscore to hide fields from custom fields list
5
- $prefix = '_bsf_';
6
- $post_types = get_post_types('','names');
7
-
8
- if ( !get_option( 'bsf_woocom_init_setting' ) ) {
9
- $woo_settings = true;
10
- }else {
11
- $woo_settings = get_option( 'bsf_woocom_setting' );
12
- }
13
-
14
- if( empty( $woo_settings ) ) {
15
-
16
- $woocommerce_post_type = array( "product", "product_variation", "shop_order" , "shop_order_refund", "shop_coupon", "shop_webhook" );
17
- $required_post_type = array_diff( $post_types, $woocommerce_post_type );
18
-
19
- }
20
- else {
21
-
22
- $exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
23
- $required_post_type = array_diff( $post_types, $exclude_custom_post_type );
24
-
25
- }
26
-
27
- $meta_boxes[] = array(
28
- 'id' => 'review_metabox',
29
- 'title' => __('Configure Rich Snippet','rich-snippets'),
30
- 'pages' => $required_post_type,//$post_types, //array( 'post','page' ), // Custom Post types
31
- 'context' => 'normal',
32
- 'priority' => 'high',
33
- 'show_names' => true, // Show field names on the left
34
- 'fields' => array(
35
- array(
36
- 'name' => __('','rich-snippets'),
37
- 'desc' => __('','rich-snippets'),
38
- 'id' => $prefix . 'post_type',
39
- 'class' => 'snippet-type',
40
- 'type' => 'select',
41
- 'options' => array(
42
- array( 'name' => __('Select what this post is about','rich-snippets'), 'value' => '0', ),
43
- array( 'name' => __('Item Review','rich-snippets'), 'value' => '1', ),
44
- array( 'name' => __('Event','rich-snippets'), 'value' => '2', ),
45
- array( 'name' => __('Person','rich-snippets'), 'value' => '5', ),
46
- array( 'name' => __('Product','rich-snippets'), 'value' => '6', ),
47
- array( 'name' => __('Recipe','rich-snippets'), 'value' => '7', ),
48
- array( 'name' => __('Software Application','rich-snippets'), 'value' => '8', ),
49
- array( 'name' => __('Video','rich-snippets'), 'value' => '9', ),
50
- array( 'name' => __('Article','rich-snippets'), 'value' => '10', ),
51
- array( 'name' => __('Service','rich-snippets'), 'value' => '11', ),
52
-
53
- ),
54
- ),
55
- // Meta Settings for Item Review
56
- array(
57
- 'name' => __('Rich Snippets - Item Review','rich-snippets'),
58
- 'desc' => __('Please provide the following information.','rich-snippets'),
59
- 'id' => $prefix . 'review_title',
60
- 'class' => 'review',
61
- 'type' => 'title',
62
- ),
63
- array(
64
- 'name' => __('Reviewer&rsquo;s Name ','rich-snippets'),
65
- 'desc' => __('Enter the name of Item Reviewer or The Post Author.','rich-snippets'),
66
- 'id' => $prefix . 'item_reviewer',
67
- 'class' => 'review',
68
- 'type' => 'text_medium',
69
- ),
70
- array(
71
- 'name' => __('Item to be reviewed','rich-snippets'),
72
- 'desc' => __('Enter the name of the item, you are writing review about.','rich-snippets'),
73
- 'id' => $prefix . 'item_name',
74
- 'class' => 'review',
75
- 'type' => 'text',
76
- ),
77
- array(
78
- 'name' => __('Item Review Type','rich-snippets'),
79
- 'desc' => __('Select the item to be reviewed.','rich-snippets'),
80
- 'id' => $prefix . 'item_review_type',
81
- 'class' => 'item_type review',
82
- 'type' => 'select',
83
- 'options' => array(
84
- array( 'name' => __('Select Item type','rich-snippets'), 'value' => 'none', ),
85
- array( 'name' => __('Event','rich-snippets'), 'value' => 'item_event', ),
86
- array( 'name' => __('Product','rich-snippets'), 'value' => 'item_product', ),
87
- array( 'name' => __('Recipe','rich-snippets'), 'value' => 'item_recipe', ),
88
- array( 'name' => __('Software Application','rich-snippets'), 'value' => 'item_software', ),
89
- array( 'name' => __('Video','rich-snippets'), 'value' => 'item_video', ),
90
- ),
91
- ),
92
- array(
93
- 'name' => __('Event Name','rich-snippets'),
94
- 'desc' => __('Enter the Event name.','rich-snippets'),
95
- 'id' => $prefix . 'item_event_name',
96
- 'class' => 'event_item_type',
97
- 'type' => 'text',
98
- ),
99
- array(
100
- 'name' => __('Event Start Date ','rich-snippets'),
101
- 'desc' => __('Provide the Event Start Date.','rich-snippets'),
102
- 'id' => $prefix . 'item_event_start_date',
103
- 'class' => 'event_item_type',
104
- 'type' => 'text_date',
105
- ),
106
- array(
107
- 'name' => __('Event Location ','rich-snippets'),
108
- 'desc' => __('Location Name Here','rich-snippets'),
109
- 'id' => $prefix . 'item_event_organization',
110
- 'class' => 'event_item_type',
111
- 'type' => 'text_medium',
112
- ),
113
- array(
114
- 'name' => __('','rich-snippets'),
115
- 'desc' => __('Street Address','rich-snippets'),
116
- 'id' => $prefix . 'item_event_street',
117
- 'class' => 'event_item_type',
118
- 'type' => 'text_medium',
119
- ),
120
- array(
121
- 'name' => __('','rich-snippets'),
122
- 'desc' => __('Locality','rich-snippets'),
123
- 'id' => $prefix . 'item_event_local',
124
- 'class' => 'event_item_type',
125
- 'type' => 'text_medium',
126
- ),
127
- array(
128
- 'name' => __('','rich-snippets'),
129
- 'desc' => __('Region','rich-snippets'),
130
- 'id' => $prefix . 'item_event_region',
131
- 'class' => 'event_item_type',
132
- 'type' => 'text_medium',
133
- ),
134
- array(
135
- 'name' => __('','rich-snippets'),
136
- 'desc' => __('Postal Code','rich-snippets'),
137
- 'id' => $prefix . 'item_event_postal_code',
138
- 'class' => 'event_item_type',
139
- 'type' => 'text_medium',
140
- ),
141
- array(
142
- 'name' => __('Product Name','rich-snippets'),
143
- 'desc' => __('Enter the Product name.','rich-snippets'),
144
- 'id' => $prefix . 'item_pro_name',
145
- 'class' => 'product_item_type',
146
- 'type' => 'text',
147
- ),
148
- array(
149
- 'name' => __('Product Price','rich-snippets'),
150
- 'desc' => __('Enter the product Price.','rich-snippets'),
151
- 'id' => $prefix . 'item_pro_price',
152
- 'class' => 'product_item_type',
153
- 'type' => 'text_small',
154
- ),
155
- array(
156
- 'name' => __('Currency ','rich-snippets'),
157
- 'desc' => __('Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>','rich-snippets'),
158
- 'id' => $prefix . 'item_pro_cur',
159
- 'class' => 'product_item_type',
160
- 'type' => 'text_small',
161
- ),
162
- array(
163
- 'name' => __('Availability','rich-snippets'),
164
- 'desc' => __('Select the products availability.','rich-snippets'),
165
- 'id' => $prefix . 'item_pro_status',
166
- 'class' => 'product_item_type',
167
- 'type' => 'select',
168
- 'options' => array(
169
- array('name' => __('__ Please Select __','rich-snippets'), 'value' => ''),
170
- array('name' => __('Out of Stock','rich-snippets'), 'value' => 'out_of_stock'),
171
- array('name' => __('In Stock','rich-snippets'), 'value' => 'in_stock'),
172
- array('name' => __('In Store Only','rich-snippets'), 'value' => 'instore_only'),
173
- array('name' => __('Pre-Order','rich-snippets'), 'value' => 'preorder'),
174
- ),
175
- ),
176
- array(
177
- 'name' => __('Recipe Name ','rich-snippets'),
178
- 'desc' => __('Enter the recipe name.','rich-snippets'),
179
- 'id' => $prefix . 'item_recipes_name',
180
- 'class' => 'recipes_item_type',
181
- 'type' => 'text_medium',
182
- ),
183
- array(
184
- 'name' => __('Recipe Photo','rich-snippets'),
185
- 'desc' => __('Upload or Select recipe photo. Medium size is recommended (300px X 300px)','rich-snippets'),
186
- 'id' => $prefix . 'item_recipes_photo',
187
- 'class' => 'recipes_item_type',
188
- 'type' => 'file',
189
- ),
190
- array(
191
- 'name' => __('Software Name','rich-snippets'),
192
- 'desc' => __('Enter the Software name.','rich-snippets'),
193
- 'id' => $prefix . 'item_soft_name',
194
- 'class' => 'soft_item_type',
195
- 'type' => 'text',
196
- ),
197
- array(
198
- 'name' => __('Software Operating System','rich-snippets'),
199
- 'desc' => __('Enter the Operating System name.','rich-snippets'),
200
- 'id' => $prefix . 'item_os_name',
201
- 'class' => 'soft_item_type',
202
- 'type' => 'text',
203
- ),
204
- array(
205
- 'name' => __('Software Application Category','rich-snippets'),
206
- 'desc' => __('Enter the Application Category name.','rich-snippets'),
207
- 'id' => $prefix . 'item_app_name',
208
- 'class' => 'soft_item_type',
209
- 'type' => 'text',
210
- ),
211
- array(
212
- 'name' => __('Video Title','rich-snippets'),
213
- 'desc' => __('Enter the title for this video','rich-snippets'),
214
- 'id' => $prefix . 'item_video_title',
215
- 'class' => 'video_item_type',
216
- 'type' => 'text',
217
- ),
218
- array(
219
- 'name' => __('Video Description','rich-snippets'),
220
- 'desc' => __('Enter the brief description for this video','rich-snippets'),
221
- 'id' => $prefix . 'item_video_desc',
222
- 'class' => 'video_item_type',
223
- 'type' => 'textarea_small',
224
- ),
225
- array(
226
- 'name' => __('Video Thumbnail','rich-snippets'),
227
- 'desc' => __('Upload or select video thumbnail from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
228
- 'id' => $prefix . 'item_video_thumb',
229
- 'class' => 'video_item_type',
230
- 'type' => 'file',
231
- ),
232
- array(
233
- 'name' => __('Upload Date','rich-snippets'),
234
- 'desc' => __('Provide the date when the video is uploaded','rich-snippets'),
235
- 'id' => $prefix . 'item_video_date',
236
- 'class' => 'video_item_type',
237
- 'type' => 'text_date',
238
- ),
239
- array(
240
- 'name' => __('Your Rating','rich-snippets'),
241
- 'desc' => __('&nbsp;&nbsp;Rate this item (1-5)','rich-snippets'),
242
- 'id' => $prefix . 'rating',
243
- 'class' => 'star review',
244
- 'type' => 'radio',
245
- 'options' => array(
246
- array( 'name' => __('','rich-snippets'), 'value' => '1', ),
247
- array( 'name' => __('','rich-snippets'), 'value' => '2', ),
248
- array( 'name' => __('','rich-snippets'), 'value' => '3', ),
249
- array( 'name' => __('','rich-snippets'), 'value' => '4', ),
250
- array( 'name' => __('','rich-snippets'), 'value' => '5', ),
251
- ),
252
- ),
253
- // Meta Settings for Events
254
- array(
255
- 'name' => __('Rich Snippets - Events','rich-snippets'),
256
- 'desc' => __('Please provide the following information.','rich-snippets'),
257
- 'id' => $prefix . 'events',
258
- 'class' => 'events',
259
- 'type' => 'title',
260
- ),
261
- array(
262
- 'name' => __('Event Title ','rich-snippets'),
263
- 'desc' => __('What would be the name of the event?','rich-snippets'),
264
- 'id' => $prefix . 'event_title',
265
- 'class' => 'events',
266
- 'type' => 'text',
267
- ),
268
- array(
269
- 'name' => __('Location ','rich-snippets'),
270
- 'desc' => __('Location Name Here','rich-snippets'),
271
- 'id' => $prefix . 'event_organization',
272
- 'class' => 'events',
273
- 'type' => 'text_medium',
274
- ),
275
- array(
276
- 'name' => __('','rich-snippets'),
277
- 'desc' => __('Street Address','rich-snippets'),
278
- 'id' => $prefix . 'event_street',
279
- 'class' => 'events',
280
- 'type' => 'text_medium',
281
- ),
282
- array(
283
- 'name' => __('','rich-snippets'),
284
- 'desc' => __('Locality','rich-snippets'),
285
- 'id' => $prefix . 'event_local',
286
- 'class' => 'events',
287
- 'type' => 'text_medium',
288
- ),
289
- array(
290
- 'name' => __('','rich-snippets'),
291
- 'desc' => __('Region','rich-snippets'),
292
- 'id' => $prefix . 'event_region',
293
- 'class' => 'events',
294
- 'type' => 'text_medium',
295
- ),
296
- array(
297
- 'name' => __('','rich-snippets'),
298
- 'desc' => __('Postal Code','rich-snippets'),
299
- 'id' => $prefix . 'event_postal_code',
300
- 'class' => 'events',
301
- 'type' => 'text_medium',
302
- ),
303
- array(
304
- 'name' => __('Description ','rich-snippets'),
305
- 'desc' => __('Describe the event in short.','rich-snippets'),
306
- 'id' => $prefix . 'event_desc',
307
- 'class' => 'events',
308
- 'type' => 'textarea_small',
309
- ),
310
- array(
311
- 'name' => __('Start Date ','rich-snippets'),
312
- 'desc' => __('Provide the Event Start Date.','rich-snippets'),
313
- 'id' => $prefix . 'event_start_date',
314
- 'class' => 'events',
315
- 'type' => 'text_date',
316
- ),
317
- array(
318
- 'name' => __('End Date ','rich-snippets'),
319
- 'desc' => __('Provide the Event End Date.','rich-snippets'),
320
- 'id' => $prefix . 'event_end_date',
321
- 'class' => 'events',
322
- 'type' => 'text_date',
323
- ),
324
- array(
325
- 'name' => __('Offer Price','rich-snippets'),
326
- 'desc' => __('Enter the ticket Price.','rich-snippets'),
327
- 'id' => $prefix . 'event_price',
328
- 'class' => 'events',
329
- 'type' => 'text_small',
330
- ),
331
- array(
332
- 'name' => __('Currency ','rich-snippets'),
333
- 'desc' => __('Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>','rich-snippets'),
334
- 'id' => $prefix . 'event_cur',
335
- 'class' => 'events',
336
- 'type' => 'text_small',
337
- ),
338
- array(
339
- 'name' => __('Url ','rich-snippets'),
340
- 'desc' => __('Url of buy ticket page','rich-snippets'),
341
- 'id' => $prefix . 'event_ticket_url',
342
- 'class' => 'events',
343
- 'type' => 'text',
344
- ),
345
- // Meta Settings for Music
346
- array(
347
- 'name' => __('Rich Snippets - Music','rich-snippets'),
348
- 'desc' => __('Please provide the following information.','rich-snippets'),
349
- 'id' => $prefix . 'music',
350
- 'class' => 'music',
351
- 'type' => 'title',
352
- ),
353
- // Meta Settings for Organization
354
- array(
355
- 'name' => __('Rich Snippets - Organization','rich-snippets'),
356
- 'desc' => __('Please provide the following information.','rich-snippets'),
357
- 'id' => $prefix . 'organization',
358
- 'class' => 'organization',
359
- 'type' => 'title',
360
- ),
361
- array(
362
- 'name' => __('Organization Name ','rich-snippets'),
363
- 'desc' => __('Enter the Company or Organization Name.','rich-snippets'),
364
- 'id' => $prefix . 'organization_name',
365
- 'class' => 'organization',
366
- 'type' => 'text',
367
- ),
368
- array(
369
- 'name' => __('Website URL ','rich-snippets'),
370
- 'desc' => __('Enter the Organization homepage url.','rich-snippets'),
371
- 'id' => $prefix . 'organization_url',
372
- 'class' => 'organization',
373
- 'type' => 'text_medium',
374
- ),
375
- array(
376
- 'name' => __('Contact No. ','rich-snippets'),
377
- 'desc' => __('Enter the Telephone No.','rich-snippets'),
378
- 'id' => $prefix . 'organization_tel',
379
- 'class' => 'organization',
380
- 'type' => 'text_medium',
381
- ),
382
- array(
383
- 'name' => __('Address ','rich-snippets'),
384
- 'desc' => __('Street Name.','rich-snippets'),
385
- 'id' => $prefix . 'organization_street',
386
- 'class' => 'organization',
387
- 'type' => 'text_medium',
388
- ),
389
- array(
390
- 'name' => __('','rich-snippets'),
391
- 'desc' => __('Locality.','rich-snippets'),
392
- 'id' => $prefix . 'organization_local',
393
- 'class' => 'organization',
394
- 'type' => 'text_medium',
395
- ),
396
- array(
397
- 'name' => __('','rich-snippets'),
398
- 'desc' => __('Region.','rich-snippets'),
399
- 'id' => $prefix . 'organization_region',
400
- 'class' => 'organization',
401
- 'type' => 'text_medium',
402
- ),
403
- array(
404
- 'name' => __('','rich-snippets'),
405
- 'desc' => __('Postal Code','rich-snippets'),
406
- 'id' => $prefix . 'organization_zip',
407
- 'class' => 'organization',
408
- 'type' => 'text_medium',
409
- ),
410
- array(
411
- 'name' => __('','rich-snippets'),
412
- 'desc' => __('Country Name','rich-snippets'),
413
- 'id' => $prefix . 'organization_country',
414
- 'class' => 'organization',
415
- 'type' => 'text_medium',
416
- ),
417
- array(
418
- 'name' => __('GEO Location','rich-snippets'),
419
- 'desc' => __('Latitude. <a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank">Find Here.</a>','rich-snippets'),
420
- 'id' => $prefix . 'organization_latitide',
421
- 'class' => 'organization',
422
- 'type' => 'text_medium',
423
- ),
424
- array(
425
- 'name' => __('','rich-snippets'),
426
- 'desc' => __('Longitude.','rich-snippets'),
427
- 'id' => $prefix . 'organization_longitude',
428
- 'class' => 'organization',
429
- 'type' => 'text_medium',
430
- ),
431
- // Meta Settings for People
432
- array(
433
- 'name' => __('Rich Snippets - Person','rich-snippets'),
434
- 'desc' => __('Please provide the following information.','rich-snippets'),
435
- 'id' => $prefix . 'people',
436
- 'class' => 'people',
437
- 'type' => 'title',
438
- ),
439
- array(
440
- 'name' => __('Person&lsquo;s Name','rich-snippets'),
441
- 'desc' => __('Enter the relative person&lsquo;s name.','rich-snippets'),
442
- 'id' => $prefix . 'people_fn',
443
- 'class' => 'people',
444
- 'type' => 'text_medium',
445
- ),
446
- array(
447
- 'name' => __('Nickname','rich-snippets'),
448
- 'desc' => __('Enter the nickname (if any).','rich-snippets'),
449
- 'id' => $prefix . 'people_nickname',
450
- 'class' => 'people',
451
- 'type' => 'text_medium',
452
- ),
453
- array(
454
- 'name' => __('Photograph','rich-snippets'),
455
- 'desc' => __('Upload the photo or select from media library. Medium size is recommended (300px X 300px)','rich-snippets'),
456
- 'id' => $prefix . 'people_photo',
457
- 'class' => 'people',
458
- 'type' => 'file',
459
- ),
460
- array(
461
- 'name' => __('Job Title ','rich-snippets'),
462
- 'desc' => __('Enter job title.','rich-snippets'),
463
- 'id' => $prefix . 'people_job_title',
464
- 'class' => 'people',
465
- 'type' => 'text_medium',
466
- ),
467
- array(
468
- 'name' => __('Homepage URL','rich-snippets'),
469
- 'desc' => __('Enter homepage URL(if any).','rich-snippets'),
470
- 'id' => $prefix . 'people_website',
471
- 'class' => 'people',
472
- 'type' => 'text_medium',
473
- ),
474
- array(
475
- 'name' => __('Company / Organization','rich-snippets'),
476
- 'desc' => __('Enter Company or Organization name in affiliation.','rich-snippets'),
477
- 'id' => $prefix . 'people_company',
478
- 'class' => 'people',
479
- 'type' => 'text_medium',
480
- ),
481
- array(
482
- 'name' => __('Address','rich-snippets'),
483
- 'desc' => __('Enter Street','rich-snippets'),
484
- 'id' => $prefix . 'people_street',
485
- 'class' => 'people',
486
- 'type' => 'text_medium',
487
- ),
488
- array(
489
- 'name' => __('','rich-snippets'),
490
- 'desc' => __('Enter Locality','rich-snippets'),
491
- 'id' => $prefix . 'people_local',
492
- 'class' => 'people',
493
- 'type' => 'text_medium',
494
- ),
495
- array(
496
- 'name' => __('','rich-snippets'),
497
- 'desc' => __('Region','rich-snippets'),
498
- 'id' => $prefix . 'people_region',
499
- 'class' => 'people',
500
- 'type' => 'text_medium',
501
- ),
502
- array(
503
- 'name' => __('','rich-snippets'),
504
- 'desc' => __('Postal Code','rich-snippets'),
505
- 'id' => $prefix . 'people_postal',
506
- 'class' => 'people',
507
- 'type' => 'text_medium',
508
- ),
509
-
510
- // Meta Settings for Products
511
- array(
512
- 'name' => __('Rich Snippets - Products','rich-snippets'),
513
- 'desc' => __('Please provide the following information.','rich-snippets'),
514
- 'id' => $prefix . 'product',
515
- 'class' => 'product',
516
- 'type' => 'title',
517
- ),
518
- array(
519
- 'name' => __('Your Rating','rich-snippets'),
520
- 'desc' => __('Rate this product or aggregate rating.','rich-snippets'),
521
- 'id' => $prefix . 'product_rating',
522
- 'class' => 'star product',
523
- 'type' => 'radio',
524
- 'options' => array(
525
- array( 'name' => __('','rich-snippets'), 'value' => '1', ),
526
- array( 'name' => __('','rich-snippets'), 'value' => '2', ),
527
- array( 'name' => __('','rich-snippets'), 'value' => '3', ),
528
- array( 'name' => __('','rich-snippets'), 'value' => '4', ),
529
- array( 'name' => __('','rich-snippets'), 'value' => '5', ),
530
- ),
531
- ),
532
- array(
533
- 'name' => __('Brand Name','rich-snippets'),
534
- 'desc' => __('Enter the products brand name','rich-snippets'),
535
- 'id' => $prefix . 'product_brand',
536
- 'class' => 'product',
537
- 'type' => 'text_medium',
538
- ),
539
- array(
540
- 'name' => __('Product Name','rich-snippets'),
541
- 'desc' => __('Enter the product name.','rich-snippets'),
542
- 'id' => $prefix . 'product_name',
543
- 'class' => 'product',
544
- 'type' => 'text_medium',
545
- ),
546
- array(
547
- 'name' => __('Product Image','rich-snippets'),
548
- 'desc' => __('Upload the product image or select from library. Medium size is recommended (300px X 300px)','rich-snippets'),
549
- 'id' => $prefix . 'product_image',
550
- 'class' => 'product',
551
- 'type' => 'file',
552
- ),
553
- array(
554
- 'name' => __('Product Price','rich-snippets'),
555
- 'desc' => __('Enter the product Price.','rich-snippets'),
556
- 'id' => $prefix . 'product_price',
557
- 'class' => 'product',
558
- 'type' => 'text_small',
559
- ),
560
- array(
561
- 'name' => __('Currency ','rich-snippets'),
562
- 'desc' => __('Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>','rich-snippets'),
563
- 'id' => $prefix . 'product_cur',
564
- 'class' => 'product',
565
- 'type' => 'text_small',
566
- ),
567
- array(
568
- 'name' => __('Availability','rich-snippets'),
569
- 'desc' => __('Select the products availability.','rich-snippets'),
570
- 'id' => $prefix . 'product_status',
571
- 'class' => 'product',
572
- 'type' => 'select',
573
- 'options' => array(
574
- array('name' => __('__ Please Select __','rich-snippets'), 'value' => ''),
575
- array('name' => __('Out of Stock','rich-snippets'), 'value' => 'out_of_stock'),
576
- array('name' => __('In Stock','rich-snippets'), 'value' => 'in_stock'),
577
- array('name' => __('In Store Only','rich-snippets'), 'value' => 'instore_only'),
578
- array('name' => __('Pre-Order','rich-snippets'), 'value' => 'preorder'),
579
- ),
580
- ),
581
- // Meta Settings for Recipes
582
- array(
583
- 'name' => __('Rich Snippets - Recipes','rich-snippets'),
584
- 'desc' => __('Please provide the following information.','rich-snippets'),
585
- 'id' => $prefix . 'recipes',
586
- 'class' => 'recipes',
587
- 'type' => 'title',
588
- ),
589
- array(
590
- 'name' => __('Recipe Name ','rich-snippets'),
591
- 'desc' => __('Enter the recipe name.','rich-snippets'),
592
- 'id' => $prefix . 'recipes_name',
593
- 'class' => 'recipes',
594
- 'type' => 'text_medium',
595
- ),
596
- array(
597
- 'name' => __('Author Name ','rich-snippets'),
598
- 'desc' => __('Enter the Author name.','rich-snippets'),
599
- 'id' => $prefix . 'authors_name',
600
- 'class' => 'recipes',
601
- 'type' => 'text_medium',
602
- ),
603
- array(
604
- 'name' => __('Time Required ','rich-snippets'),
605
- 'desc' => __('Preperation time (Format: 1H30M. H - Hours, M - Minutes )','rich-snippets'),
606
- 'id' => $prefix . 'recipes_preptime',
607
- 'class' => 'recipes',
608
- 'type' => 'text_small',
609
- ),
610
- array(
611
- 'name' => __('','rich-snippets'),
612
- 'desc' => __('Cook Time. (Format: 1H30M. H - Hours, M - Minutes )','rich-snippets'),
613
- 'id' => $prefix . 'recipes_cooktime',
614
- 'class' => 'recipes',
615
- 'type' => 'text_small',
616
- ),
617
- array(
618
- 'name' => __('','rich-snippets'),
619
- 'desc' => __('Total Time (Format: 1H30M. H - Hours, M - Minutes )','rich-snippets'),
620
- 'id' => $prefix . 'recipes_totaltime',
621
- 'class' => 'recipes',
622
- 'type' => 'text_small',
623
- ),
624
- array(
625
- 'name' => __('Description','rich-snippets'),
626
- 'desc' => __('Describe the recipe in short.','rich-snippets'),
627
- 'id' => $prefix . 'recipes_desc',
628
- 'class' => 'recipes',
629
- 'type' => 'textarea_small',
630
- ),
631
- array(
632
- 'name' => __('Nutrition','rich-snippets'),
633
- 'desc' => __('Nutrition','rich-snippets'),
634
- 'id' => $prefix . 'recipes_nutrition',
635
- 'class' => 'recipes',
636
- 'type' => 'text_medium',
637
- ),
638
- array(
639
- 'name' => __('Ingredients','rich-snippets'),
640
- 'desc' => __('Enter the ingredients used','rich-snippets'),
641
- 'id' => $prefix . 'recipes_ingredient',
642
- 'class' => 'recipes',
643
- 'type' => 'text_medium',
644
- ),
645
- array(
646
- 'name' => __('Recipe Photo','rich-snippets'),
647
- 'desc' => __('Upload or Select recipe photo. Medium size is recommended (300px X 300px)','rich-snippets'),
648
- 'id' => $prefix . 'recipes_photo',
649
- 'class' => 'recipes',
650
- 'type' => 'file',
651
- ),
652
- // Meta Settings for Software Application
653
- array(
654
- 'name' => __('Rich Snippets - Software Application','rich-snippets'),
655
- 'desc' => __('Please provide the following information.','rich-snippets'),
656
- 'id' => $prefix . 'software',
657
- 'class' => 'software',
658
- 'type' => 'title',
659
- ),
660
- array(
661
- 'name' => __('Software Rating','rich-snippets'),
662
- 'desc' => __('Rate this software.','rich-snippets'),
663
- 'id' => $prefix . 'software_rating',
664
- 'class' => 'star software',
665
- 'type' => 'radio',
666
- 'options' => array(
667
- array( 'name' => __('','rich-snippets'), 'value' => '1', ),
668
- array( 'name' => __('','rich-snippets'), 'value' => '2', ),
669
- array( 'name' => __('','rich-snippets'), 'value' => '3', ),
670
- array( 'name' => __('','rich-snippets'), 'value' => '4', ),
671
- array( 'name' => __('','rich-snippets'), 'value' => '5', ),
672
- ),
673
- ),
674
- array(
675
- 'name' => __('Price','rich-snippets'),
676
- 'desc' => __('Enter the Price of Software','rich-snippets'),
677
- 'id' => $prefix . 'software_price',
678
- 'class' => 'software',
679
- 'type' => 'text_small',
680
- ),
681
- array(
682
- 'name' => __('Currency','rich-snippets'),
683
- 'desc' => __('Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>','rich-snippets'),
684
- 'id' => $prefix . 'software_cur',
685
- 'class'=> 'software',
686
- 'type' => 'text_small',
687
- ),
688
- array(
689
- 'name' => __('Software Name ','rich-snippets'),
690
- 'desc' => __('Enter the Software Name.','rich-snippets'),
691
- 'id' => $prefix . 'software_name',
692
- 'class' => 'software',
693
- 'type' => 'text_medium',
694
- ),
695
- array(
696
- 'name' => __('Operating System','rich-snippets'),
697
- 'desc' => __('Enter the software Operating System.','rich-snippets'),
698
- 'id' => $prefix . 'software_os',
699
- 'class' => 'software',
700
- 'type' => 'text_medium',
701
- ),
702
- array(
703
- 'name' => __('Application Category','rich-snippets'),
704
- 'desc' => __('Like Game, Multimedia','rich-snippets'),
705
- 'id' => $prefix . 'software_cat',
706
- 'class' => 'software',
707
- 'type' => 'text_medium',
708
- ),
709
- array(
710
- 'name' => __('Software Image','rich-snippets'),
711
- 'desc' => __('Upload or select image of software. Medium size is recommended (300px X 300px)','rich-snippets'),
712
- 'id' => $prefix . 'software_image',
713
- 'class' => 'software',
714
- 'type' => 'file',
715
- ),
716
- array(
717
- 'name' => __('Landing Page','rich-snippets'),
718
- 'desc' => __('Enter the landing page url for software','rich-snippets'),
719
- 'id' => $prefix . 'software_landing',
720
- 'class' => 'software',
721
- 'type' => 'text',
722
- ),
723
- // Meta Settings for Video
724
- array(
725
- 'name' => __('Rich Snippets - Videos','rich-snippets'),
726
- 'desc' => __('Please provide the following information.','rich-snippets'),
727
- 'id' => $prefix . 'video',
728
- 'class' => 'video',
729
- 'type' => 'title',
730
- ),
731
- array(
732
- 'name' => __('Video Title','rich-snippets'),
733
- 'desc' => __('Enter the title for this video','rich-snippets'),
734
- 'id' => $prefix . 'video_title',
735
- 'class' => 'video',
736
- 'type' => 'text',
737
- ),
738
- array(
739
- 'name' => __('Video Description','rich-snippets'),
740
- 'desc' => __('Enter the brief description for this video','rich-snippets'),
741
- 'id' => $prefix . 'video_desc',
742
- 'class' => 'video',
743
- 'type' => 'textarea_small',
744
- ),
745
- array(
746
- 'name' => __('Video Thumbnail','rich-snippets'),
747
- 'desc' => __('Upload or select video thumbnail from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
748
- 'id' => $prefix . 'video_thumb',
749
- 'class' => 'video',
750
- 'type' => 'file',
751
- ),
752
- array(
753
- 'name' => __('Video','rich-snippets'),
754
- 'desc' => __('Upload Video or enter the video file url<br>Example: <br> http://www.example.com/video123.flv<br>A URL pointing to the actual video media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .avi, .flv, or other video file format','rich-snippets'),
755
- 'id' => $prefix . 'video_url',
756
- 'class' => 'video',
757
- 'type' => 'file',
758
- ),
759
-
760
- array(
761
- 'name' => __('Embed Video','rich-snippets'),
762
- 'desc' => __('A URL pointing to a player for the specific video. Usually this is the information in the src element of an &lt;embed&gt;tag. <br>Example: <br>Youtube: https://www.youtube.com/embed/CibazcCevOk <br>Dailymotion: http://www.dailymotion.com/swf/x1o2g<br><div class="bsf_vd_note"><h3>Add only one url either in "Video" or "Embed Video" field. Dont use both.</h3></div>','rich-snippets'),
763
- 'id' => $prefix . 'video_emb_url',
764
- 'class' => 'video',
765
- 'type' => 'text',
766
- ),
767
-
768
- array(
769
- 'name' => __('Video Duration','rich-snippets'),
770
- 'desc' => __('Enter the duration for this video','rich-snippets'),
771
- 'id' => $prefix . 'video_duration',
772
- 'class' => 'video',
773
- 'type' => 'text_small',
774
- ),
775
- array(
776
- 'name' => __('Upload Date','rich-snippets'),
777
- 'desc' => __('Provide the date when the video is uploaded','rich-snippets'),
778
- 'id' => $prefix . 'video_date',
779
- 'class' => 'video',
780
- 'type' => 'text_date',
781
- ),
782
- // Meta Settings for Article
783
- array(
784
- 'name' => __('Rich Snippets - Article','rich-snippets'),
785
- 'desc' => __('Please provide the following information.','rich-snippets'),
786
- 'id' => $prefix . 'article',
787
- 'class' => 'article',
788
- 'type' => 'title',
789
- ),
790
- array(
791
- 'name' => __('Article Image','rich-snippets'),
792
- 'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
793
- 'id' => $prefix . 'article_image',
794
- 'class' => 'article',
795
- 'type' => 'file',
796
- ),
797
- array(
798
- 'name' => __('Article Name','rich-snippets'),
799
- 'desc' => __('Enter the name for this article','rich-snippets'),
800
- 'id' => $prefix . 'article_name',
801
- 'class' => 'article',
802
- 'type' => 'text',
803
- ),
804
- array(
805
- 'name' => __('Short Description','rich-snippets'),
806
- 'desc' => __('Enter the brief description about this article (About 30 Words)','rich-snippets'),
807
- 'id' => $prefix . 'article_desc',
808
- 'class' => 'article',
809
- 'type' => 'textarea_small',
810
- ),
811
- array(
812
- 'name' => __('Author','rich-snippets'),
813
- 'desc' => __('Enter the author name for this article','rich-snippets'),
814
- 'id' => $prefix . 'article_author',
815
- 'class' => 'article',
816
- 'type' => 'text',
817
- ),
818
- array(
819
- 'name' => __('Publisher - Orgnization','rich-snippets'),
820
- 'desc' => __('Enter the publisher name for this article','rich-snippets'),
821
- 'id' => $prefix . 'article_publisher',
822
- 'class' => 'article',
823
- 'type' => 'text',
824
- ),
825
- array(
826
- 'name' => __('Publisher Logo','rich-snippets'),
827
- 'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
828
- 'id' => $prefix . 'article_publisher_logo',
829
- 'class' => 'article',
830
- 'type' => 'file',
831
- ),
832
-
833
-
834
- // Meta Settings for Service
835
- array(
836
- 'name' => __('Rich Snippets - Service','rich-snippets'),
837
- 'desc' => __('Please provide the following information.','rich-snippets'),
838
- 'id' => $prefix . 'service',
839
- 'class' => 'service',
840
- 'type' => 'title',
841
- ),
842
- array(
843
- 'name' => __('Image','rich-snippets'),
844
- 'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
845
- 'id' => $prefix . 'service_image',
846
- 'class' => 'service',
847
- 'type' => 'file',
848
- ),
849
- array(
850
- 'name' => __('Service Type','rich-snippets'),
851
- 'desc' => __('Enter the service type','rich-snippets'),
852
- 'id' => $prefix . 'service_type',
853
- 'class' => 'service',
854
- 'type' => 'text',
855
- ),
856
- array(
857
- 'name' => __('Service Served Area','rich-snippets'),
858
- 'desc' => __('Enter the area where service is available','rich-snippets'),
859
- 'id' => $prefix . 'service_area',
860
- 'class' => 'service',
861
- 'type' => 'text',
862
- ),
863
- array(
864
- 'name' => __('Short Description','rich-snippets'),
865
- 'desc' => __('Enter the description about service (About 30 Words)','rich-snippets'),
866
- 'id' => $prefix . 'service_desc',
867
- 'class' => 'service',
868
- 'type' => 'textarea_small',
869
- ),
870
- array(
871
- 'name' => __('Provider Name','rich-snippets'),
872
- 'desc' => __('Enter the service provider name','rich-snippets'),
873
- 'id' => $prefix . 'service_provider',
874
- 'class' => 'service',
875
- 'type' => 'text',
876
- ),
877
- array(
878
- 'name' => __('Location','rich-snippets'),
879
- 'desc' => __('Street Address','rich-snippets'),
880
- 'id' => $prefix . 'service_street',
881
- 'class' => 'service',
882
- 'type' => 'text_medium',
883
- ),
884
- array(
885
- 'name' => __('','rich-snippets'),
886
- 'desc' => __('Locality','rich-snippets'),
887
- 'id' => $prefix . 'service_local',
888
- 'class' => 'service',
889
- 'type' => 'text_medium',
890
- ),
891
- array(
892
- 'name' => __('','rich-snippets'),
893
- 'desc' => __('Region','rich-snippets'),
894
- 'id' => $prefix . 'service_region',
895
- 'class' => 'service',
896
- 'type' => 'text_medium',
897
- ),
898
- array(
899
- 'name' => __('','rich-snippets'),
900
- 'desc' => __('Postal Code','rich-snippets'),
901
- 'id' => $prefix . 'service_postal_code',
902
- 'class' => 'service',
903
- 'type' => 'text_medium',
904
- ),
905
- array(
906
- 'name' => __('Provider Location Image','rich-snippets'),
907
- 'desc' => __('Upload the provider location image or select from library. Medium size is recommended (300px X 300px)','rich-snippets'),
908
- 'id' => $prefix . 'provider_location_image',
909
- 'class' => 'service',
910
- 'type' => 'file',
911
- ),
912
- array(
913
- 'name' => __('Telephone','rich-snippets'),
914
- 'desc' => __('Telephone number','rich-snippets'),
915
- 'id' => $prefix . 'service_telephone',
916
- 'class' => 'service',
917
- 'type' => 'text_medium',
918
- ),
919
- array(
920
- 'name' => __('Enable/Disable Rating','rich-snippets'),
921
- 'desc' => __('.','rich-snippets'),
922
- 'id' => $prefix . 'service_rating_switch',
923
- 'class' => 'service',
924
- 'type' => 'select',
925
- 'options' => array(
926
- array('name' => __('Disable','rich-snippets'), 'value' => ''),
927
- array('name' => __('Enable','rich-snippets'), 'value' => 'enable'),
928
- ),
929
- ),
930
- ),
931
- );
932
- // Add other metaboxes as needed
933
- return $meta_boxes;
934
- }
935
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Meta Boxes.
4
+ *
5
+ * @package AIOSRS.
6
+ */
7
+
8
+ /**
9
+ * Metabox for review.
10
+ *
11
+ * @param array $meta_boxes Meta Boxes.
12
+ */
13
+ function bsf_metaboxes( array $meta_boxes ) {
14
+ // Start with an underscore to hide fields from custom fields list.
15
+ $prefix = '_bsf_';
16
+ $post_types = get_post_types( '', 'names' );
17
+
18
+ if ( ! get_option( 'bsf_woocom_init_setting' ) ) {
19
+ $woo_settings = true;
20
+ } else {
21
+ $woo_settings = get_option( 'bsf_woocom_setting' );
22
+ }
23
+
24
+ if ( empty( $woo_settings ) ) {
25
+
26
+ $woocommerce_post_type = array( 'product', 'product_variation', 'shop_order', 'shop_order_refund', 'shop_coupon', 'shop_webhook' );
27
+ $required_post_type = array_diff( $post_types, $woocommerce_post_type );
28
+
29
+ } else {
30
+
31
+ $exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
32
+ $required_post_type = array_diff( $post_types, $exclude_custom_post_type );
33
+
34
+ }
35
+
36
+ $meta_boxes[] = array(
37
+ 'id' => 'review_metabox',
38
+ 'title' => __( 'Configure Rich Snippet', 'all-in-one-schemaorg-rich-snippets' ),
39
+ 'pages' => $required_post_type,
40
+ 'context' => 'normal',
41
+ 'priority' => 'high',
42
+ 'show_names' => true, // Show field names on the left.
43
+ 'fields' => array(
44
+ array(
45
+ 'name' => '',
46
+ 'desc' => '',
47
+ 'id' => $prefix . 'post_type',
48
+ 'class' => 'snippet-type',
49
+ 'type' => 'select',
50
+ 'options' => array(
51
+ array(
52
+ 'name' => __( 'Select what this post is about', 'all-in-one-schemaorg-rich-snippets' ),
53
+ 'value' => '0',
54
+ ),
55
+ array(
56
+ 'name' => __( 'Item Review', 'all-in-one-schemaorg-rich-snippets' ),
57
+ 'value' => '1',
58
+ ),
59
+ array(
60
+ 'name' => __( 'Event', 'all-in-one-schemaorg-rich-snippets' ),
61
+ 'value' => '2',
62
+ ),
63
+ array(
64
+ 'name' => __( 'Person', 'all-in-one-schemaorg-rich-snippets' ),
65
+ 'value' => '5',
66
+ ),
67
+ array(
68
+ 'name' => __( 'Product', 'all-in-one-schemaorg-rich-snippets' ),
69
+ 'value' => '6',
70
+ ),
71
+ array(
72
+ 'name' => __( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ),
73
+ 'value' => '7',
74
+ ),
75
+ array(
76
+ 'name' => __( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ),
77
+ 'value' => '8',
78
+ ),
79
+ array(
80
+ 'name' => __( 'Video', 'all-in-one-schemaorg-rich-snippets' ),
81
+ 'value' => '9',
82
+ ),
83
+ array(
84
+ 'name' => __( 'Article', 'all-in-one-schemaorg-rich-snippets' ),
85
+ 'value' => '10',
86
+ ),
87
+ array(
88
+ 'name' => __( 'Service', 'all-in-one-schemaorg-rich-snippets' ),
89
+ 'value' => '11',
90
+ ),
91
+
92
+ ),
93
+ ),
94
+ // Meta Settings for Item Review.
95
+ array(
96
+ 'name' => __( 'Rich Snippets - Item Review', 'all-in-one-schemaorg-rich-snippets' ),
97
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
98
+ 'id' => $prefix . 'review_title',
99
+ 'class' => 'review',
100
+ 'type' => 'title',
101
+ ),
102
+ array(
103
+ 'name' => __( 'Reviewer&rsquo;s Name ', 'all-in-one-schemaorg-rich-snippets' ),
104
+ 'desc' => __( 'Enter the name of Item Reviewer or The Post Author.', 'all-in-one-schemaorg-rich-snippets' ),
105
+ 'id' => $prefix . 'item_reviewer',
106
+ 'class' => 'review',
107
+ 'type' => 'text_medium',
108
+ ),
109
+ array(
110
+ 'name' => __( 'Item to be reviewed', 'all-in-one-schemaorg-rich-snippets' ),
111
+ 'desc' => __( 'Enter the name of the item, you are writing review about.', 'all-in-one-schemaorg-rich-snippets' ),
112
+ 'id' => $prefix . 'item_name',
113
+ 'class' => 'review',
114
+ 'type' => 'text',
115
+ ),
116
+ array(
117
+ 'name' => __( 'Item Review Type', 'all-in-one-schemaorg-rich-snippets' ),
118
+ 'desc' => __( 'Select the item to be reviewed.', 'all-in-one-schemaorg-rich-snippets' ),
119
+ 'id' => $prefix . 'item_review_type',
120
+ 'class' => 'item_type review',
121
+ 'type' => 'select',
122
+ 'options' => array(
123
+ array(
124
+ 'name' => __( 'Select Item type', 'all-in-one-schemaorg-rich-snippets' ),
125
+ 'value' => 'none',
126
+ ),
127
+ array(
128
+ 'name' => __( 'Event', 'all-in-one-schemaorg-rich-snippets' ),
129
+ 'value' => 'item_event',
130
+ ),
131
+ array(
132
+ 'name' => __( 'Product', 'all-in-one-schemaorg-rich-snippets' ),
133
+ 'value' => 'item_product',
134
+ ),
135
+ array(
136
+ 'name' => __( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ),
137
+ 'value' => 'item_recipe',
138
+ ),
139
+ array(
140
+ 'name' => __( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ),
141
+ 'value' => 'item_software',
142
+ ),
143
+ array(
144
+ 'name' => __( 'Video', 'all-in-one-schemaorg-rich-snippets' ),
145
+ 'value' => 'item_video',
146
+ ),
147
+ ),
148
+ ),
149
+ array(
150
+ 'name' => __( 'Event Name', 'all-in-one-schemaorg-rich-snippets' ),
151
+ 'desc' => __( 'Enter the Event name.', 'all-in-one-schemaorg-rich-snippets' ),
152
+ 'id' => $prefix . 'item_event_name',
153
+ 'class' => 'event_item_type',
154
+ 'type' => 'text',
155
+ ),
156
+ array(
157
+ 'name' => __( 'Event Start Date ', 'all-in-one-schemaorg-rich-snippets' ),
158
+ 'desc' => __( 'Provide the Event Start Date.', 'all-in-one-schemaorg-rich-snippets' ),
159
+ 'id' => $prefix . 'item_event_start_date',
160
+ 'class' => 'event_item_type',
161
+ 'type' => 'text_date',
162
+ ),
163
+ array(
164
+ 'name' => __( 'Event Location ', 'all-in-one-schemaorg-rich-snippets' ),
165
+ 'desc' => __( 'Location Name Here', 'all-in-one-schemaorg-rich-snippets' ),
166
+ 'id' => $prefix . 'item_event_organization',
167
+ 'class' => 'event_item_type',
168
+ 'type' => 'text_medium',
169
+ ),
170
+ array(
171
+ 'name' => '',
172
+ 'desc' => __( 'Street Address', 'all-in-one-schemaorg-rich-snippets' ),
173
+ 'id' => $prefix . 'item_event_street',
174
+ 'class' => 'event_item_type',
175
+ 'type' => 'text_medium',
176
+ ),
177
+ array(
178
+ 'name' => '',
179
+ 'desc' => __( 'Locality', 'all-in-one-schemaorg-rich-snippets' ),
180
+ 'id' => $prefix . 'item_event_local',
181
+ 'class' => 'event_item_type',
182
+ 'type' => 'text_medium',
183
+ ),
184
+ array(
185
+ 'name' => '',
186
+ 'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
187
+ 'id' => $prefix . 'item_event_region',
188
+ 'class' => 'event_item_type',
189
+ 'type' => 'text_medium',
190
+ ),
191
+ array(
192
+ 'name' => '',
193
+ 'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
194
+ 'id' => $prefix . 'item_event_postal_code',
195
+ 'class' => 'event_item_type',
196
+ 'type' => 'text_medium',
197
+ ),
198
+ array(
199
+ 'name' => __( 'Product Name', 'all-in-one-schemaorg-rich-snippets' ),
200
+ 'desc' => __( 'Enter the Product name.', 'all-in-one-schemaorg-rich-snippets' ),
201
+ 'id' => $prefix . 'item_pro_name',
202
+ 'class' => 'product_item_type',
203
+ 'type' => 'text',
204
+ ),
205
+ array(
206
+ 'name' => __( 'Product Price', 'all-in-one-schemaorg-rich-snippets' ),
207
+ 'desc' => __( 'Enter the product Price.', 'all-in-one-schemaorg-rich-snippets' ),
208
+ 'id' => $prefix . 'item_pro_price',
209
+ 'class' => 'product_item_type',
210
+ 'type' => 'text_small',
211
+ ),
212
+ array(
213
+ 'name' => __( 'Currency ', 'all-in-one-schemaorg-rich-snippets' ),
214
+ 'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
215
+ 'id' => $prefix . 'item_pro_cur',
216
+ 'class' => 'product_item_type',
217
+ 'type' => 'text_small',
218
+ ),
219
+ array(
220
+ 'name' => __( 'Availability', 'all-in-one-schemaorg-rich-snippets' ),
221
+ 'desc' => __( 'Select the products availability.', 'all-in-one-schemaorg-rich-snippets' ),
222
+ 'id' => $prefix . 'item_pro_status',
223
+ 'class' => 'product_item_type',
224
+ 'type' => 'select',
225
+ 'options' => array(
226
+ array(
227
+ 'name' => __( '__ Please Select __', 'all-in-one-schemaorg-rich-snippets' ),
228
+ 'value' => '',
229
+ ),
230
+ array(
231
+ 'name' => __( 'Out of Stock', 'all-in-one-schemaorg-rich-snippets' ),
232
+ 'value' => 'out_of_stock',
233
+ ),
234
+ array(
235
+ 'name' => __( 'In Stock', 'all-in-one-schemaorg-rich-snippets' ),
236
+ 'value' => 'in_stock',
237
+ ),
238
+ array(
239
+ 'name' => __( 'In Store Only', 'all-in-one-schemaorg-rich-snippets' ),
240
+ 'value' => 'instore_only',
241
+ ),
242
+ array(
243
+ 'name' => __( 'Pre-Order', 'all-in-one-schemaorg-rich-snippets' ),
244
+ 'value' => 'preorder',
245
+ ),
246
+ ),
247
+ ),
248
+ array(
249
+ 'name' => __( 'Recipe Name ', 'all-in-one-schemaorg-rich-snippets' ),
250
+ 'desc' => __( 'Enter the recipe name.', 'all-in-one-schemaorg-rich-snippets' ),
251
+ 'id' => $prefix . 'item_recipes_name',
252
+ 'class' => 'recipes_item_type',
253
+ 'type' => 'text_medium',
254
+ ),
255
+ array(
256
+ 'name' => __( 'Recipe Photo', 'all-in-one-schemaorg-rich-snippets' ),
257
+ 'desc' => __( 'Upload or Select recipe photo. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
258
+ 'id' => $prefix . 'item_recipes_photo',
259
+ 'class' => 'recipes_item_type',
260
+ 'type' => 'file',
261
+ ),
262
+ array(
263
+ 'name' => __( 'Software Name', 'all-in-one-schemaorg-rich-snippets' ),
264
+ 'desc' => __( 'Enter the Software name.', 'all-in-one-schemaorg-rich-snippets' ),
265
+ 'id' => $prefix . 'item_soft_name',
266
+ 'class' => 'soft_item_type',
267
+ 'type' => 'text',
268
+ ),
269
+ array(
270
+ 'name' => __( 'Software Operating System', 'all-in-one-schemaorg-rich-snippets' ),
271
+ 'desc' => __( 'Enter the Operating System name.', 'all-in-one-schemaorg-rich-snippets' ),
272
+ 'id' => $prefix . 'item_os_name',
273
+ 'class' => 'soft_item_type',
274
+ 'type' => 'text',
275
+ ),
276
+ array(
277
+ 'name' => __( 'Software Application Category', 'all-in-one-schemaorg-rich-snippets' ),
278
+ 'desc' => __( 'Enter the Application Category name.', 'all-in-one-schemaorg-rich-snippets' ),
279
+ 'id' => $prefix . 'item_app_name',
280
+ 'class' => 'soft_item_type',
281
+ 'type' => 'text',
282
+ ),
283
+ array(
284
+ 'name' => __( 'Video Title', 'all-in-one-schemaorg-rich-snippets' ),
285
+ 'desc' => __( 'Enter the title for this video', 'all-in-one-schemaorg-rich-snippets' ),
286
+ 'id' => $prefix . 'item_video_title',
287
+ 'class' => 'video_item_type',
288
+ 'type' => 'text',
289
+ ),
290
+ array(
291
+ 'name' => __( 'Video Description', 'all-in-one-schemaorg-rich-snippets' ),
292
+ 'desc' => __( 'Enter the brief description for this video', 'all-in-one-schemaorg-rich-snippets' ),
293
+ 'id' => $prefix . 'item_video_desc',
294
+ 'class' => 'video_item_type',
295
+ 'type' => 'textarea_small',
296
+ ),
297
+ array(
298
+ 'name' => __( 'Video Thumbnail', 'all-in-one-schemaorg-rich-snippets' ),
299
+ 'desc' => __( 'Upload or select video thumbnail from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
300
+ 'id' => $prefix . 'item_video_thumb',
301
+ 'class' => 'video_item_type',
302
+ 'type' => 'file',
303
+ ),
304
+ array(
305
+ 'name' => __( 'Upload Date', 'all-in-one-schemaorg-rich-snippets' ),
306
+ 'desc' => __( 'Provide the date when the video is uploaded', 'all-in-one-schemaorg-rich-snippets' ),
307
+ 'id' => $prefix . 'item_video_date',
308
+ 'class' => 'video_item_type',
309
+ 'type' => 'text_date',
310
+ ),
311
+ array(
312
+ 'name' => __( 'Your Rating', 'all-in-one-schemaorg-rich-snippets' ),
313
+ 'desc' => __( '&nbsp;&nbsp;Rate this item (1-5)', 'all-in-one-schemaorg-rich-snippets' ),
314
+ 'id' => $prefix . 'rating',
315
+ 'class' => 'star review',
316
+ 'type' => 'radio',
317
+ 'options' => array(
318
+ array(
319
+ 'name' => '',
320
+ 'value' => '1',
321
+ ),
322
+ array(
323
+ 'name' => '',
324
+ 'value' => '2',
325
+ ),
326
+ array(
327
+ 'name' => '',
328
+ 'value' => '3',
329
+ ),
330
+ array(
331
+ 'name' => '',
332
+ 'value' => '4',
333
+ ),
334
+ array(
335
+ 'name' => '',
336
+ 'value' => '5',
337
+ ),
338
+ ),
339
+ ),
340
+ // Meta Settings for Events.
341
+ array(
342
+ 'name' => __( 'Rich Snippets - Events', 'all-in-one-schemaorg-rich-snippets' ),
343
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
344
+ 'id' => $prefix . 'events',
345
+ 'class' => 'events',
346
+ 'type' => 'title',
347
+ ),
348
+ array(
349
+ 'name' => __( 'Event Title ', 'all-in-one-schemaorg-rich-snippets' ),
350
+ 'desc' => __( 'What would be the name of the event?', 'all-in-one-schemaorg-rich-snippets' ),
351
+ 'id' => $prefix . 'event_title',
352
+ 'class' => 'events',
353
+ 'type' => 'text',
354
+ ),
355
+ array(
356
+ 'name' => __( 'Location ', 'all-in-one-schemaorg-rich-snippets' ),
357
+ 'desc' => __( 'Location Name Here', 'all-in-one-schemaorg-rich-snippets' ),
358
+ 'id' => $prefix . 'event_organization',
359
+ 'class' => 'events',
360
+ 'type' => 'text_medium',
361
+ ),
362
+ array(
363
+ 'name' => '',
364
+ 'desc' => __( 'Street Address', 'all-in-one-schemaorg-rich-snippets' ),
365
+ 'id' => $prefix . 'event_street',
366
+ 'class' => 'events',
367
+ 'type' => 'text_medium',
368
+ ),
369
+ array(
370
+ 'name' => '',
371
+ 'desc' => __( 'Locality', 'all-in-one-schemaorg-rich-snippets' ),
372
+ 'id' => $prefix . 'event_local',
373
+ 'class' => 'events',
374
+ 'type' => 'text_medium',
375
+ ),
376
+ array(
377
+ 'name' => '',
378
+ 'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
379
+ 'id' => $prefix . 'event_region',
380
+ 'class' => 'events',
381
+ 'type' => 'text_medium',
382
+ ),
383
+ array(
384
+ 'name' => '',
385
+ 'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
386
+ 'id' => $prefix . 'event_postal_code',
387
+ 'class' => 'events',
388
+ 'type' => 'text_medium',
389
+ ),
390
+ array(
391
+ 'name' => __( 'Description ', 'all-in-one-schemaorg-rich-snippets' ),
392
+ 'desc' => __( 'Describe the event in short.', 'all-in-one-schemaorg-rich-snippets' ),
393
+ 'id' => $prefix . 'event_desc',
394
+ 'class' => 'events',
395
+ 'type' => 'textarea_small',
396
+ ),
397
+ array(
398
+ 'name' => __( 'Start Date ', 'all-in-one-schemaorg-rich-snippets' ),
399
+ 'desc' => __( 'Provide the Event Start Date.', 'all-in-one-schemaorg-rich-snippets' ),
400
+ 'id' => $prefix . 'event_start_date',
401
+ 'class' => 'events',
402
+ 'type' => 'text_date',
403
+ ),
404
+ array(
405
+ 'name' => __( 'End Date ', 'all-in-one-schemaorg-rich-snippets' ),
406
+ 'desc' => __( 'Provide the Event End Date.', 'all-in-one-schemaorg-rich-snippets' ),
407
+ 'id' => $prefix . 'event_end_date',
408
+ 'class' => 'events',
409
+ 'type' => 'text_date',
410
+ ),
411
+ array(
412
+ 'name' => __( 'Offer Price', 'all-in-one-schemaorg-rich-snippets' ),
413
+ 'desc' => __( 'Enter the ticket Price.', 'all-in-one-schemaorg-rich-snippets' ),
414
+ 'id' => $prefix . 'event_price',
415
+ 'class' => 'events',
416
+ 'type' => 'text_small',
417
+ ),
418
+ array(
419
+ 'name' => __( 'Currency ', 'all-in-one-schemaorg-rich-snippets' ),
420
+ 'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
421
+ 'id' => $prefix . 'event_cur',
422
+ 'class' => 'events',
423
+ 'type' => 'text_small',
424
+ ),
425
+ array(
426
+ 'name' => __( 'Url ', 'all-in-one-schemaorg-rich-snippets' ),
427
+ 'desc' => __( 'Url of buy ticket page', 'all-in-one-schemaorg-rich-snippets' ),
428
+ 'id' => $prefix . 'event_ticket_url',
429
+ 'class' => 'events',
430
+ 'type' => 'text',
431
+ ),
432
+ // Meta Settings for Music.
433
+ array(
434
+ 'name' => __( 'Rich Snippets - Music', 'all-in-one-schemaorg-rich-snippets' ),
435
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
436
+ 'id' => $prefix . 'music',
437
+ 'class' => 'music',
438
+ 'type' => 'title',
439
+ ),
440
+ // Meta Settings for Organization.
441
+ array(
442
+ 'name' => __( 'Rich Snippets - Organization', 'all-in-one-schemaorg-rich-snippets' ),
443
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
444
+ 'id' => $prefix . 'organization',
445
+ 'class' => 'organization',
446
+ 'type' => 'title',
447
+ ),
448
+ array(
449
+ 'name' => __( 'Organization Name ', 'all-in-one-schemaorg-rich-snippets' ),
450
+ 'desc' => __( 'Enter the Company or Organization Name.', 'all-in-one-schemaorg-rich-snippets' ),
451
+ 'id' => $prefix . 'organization_name',
452
+ 'class' => 'organization',
453
+ 'type' => 'text',
454
+ ),
455
+ array(
456
+ 'name' => __( 'Website URL ', 'all-in-one-schemaorg-rich-snippets' ),
457
+ 'desc' => __( 'Enter the Organization homepage url.', 'all-in-one-schemaorg-rich-snippets' ),
458
+ 'id' => $prefix . 'organization_url',
459
+ 'class' => 'organization',
460
+ 'type' => 'text_medium',
461
+ ),
462
+ array(
463
+ 'name' => __( 'Contact No. ', 'all-in-one-schemaorg-rich-snippets' ),
464
+ 'desc' => __( 'Enter the Telephone No.', 'all-in-one-schemaorg-rich-snippets' ),
465
+ 'id' => $prefix . 'organization_tel',
466
+ 'class' => 'organization',
467
+ 'type' => 'text_medium',
468
+ ),
469
+ array(
470
+ 'name' => __( 'Address ', 'all-in-one-schemaorg-rich-snippets' ),
471
+ 'desc' => __( 'Street Name.', 'all-in-one-schemaorg-rich-snippets' ),
472
+ 'id' => $prefix . 'organization_street',
473
+ 'class' => 'organization',
474
+ 'type' => 'text_medium',
475
+ ),
476
+ array(
477
+ 'name' => '',
478
+ 'desc' => __( 'Locality.', 'all-in-one-schemaorg-rich-snippets' ),
479
+ 'id' => $prefix . 'organization_local',
480
+ 'class' => 'organization',
481
+ 'type' => 'text_medium',
482
+ ),
483
+ array(
484
+ 'name' => '',
485
+ 'desc' => __( 'Region.', 'all-in-one-schemaorg-rich-snippets' ),
486
+ 'id' => $prefix . 'organization_region',
487
+ 'class' => 'organization',
488
+ 'type' => 'text_medium',
489
+ ),
490
+ array(
491
+ 'name' => '',
492
+ 'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
493
+ 'id' => $prefix . 'organization_zip',
494
+ 'class' => 'organization',
495
+ 'type' => 'text_medium',
496
+ ),
497
+ array(
498
+ 'name' => '',
499
+ 'desc' => __( 'Country Name', 'all-in-one-schemaorg-rich-snippets' ),
500
+ 'id' => $prefix . 'organization_country',
501
+ 'class' => 'organization',
502
+ 'type' => 'text_medium',
503
+ ),
504
+ array(
505
+ 'name' => __( 'GEO Location', 'all-in-one-schemaorg-rich-snippets' ),
506
+ 'desc' => __( 'Latitude. <a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank">Find Here.</a>', 'all-in-one-schemaorg-rich-snippets' ),
507
+ 'id' => $prefix . 'organization_latitide',
508
+ 'class' => 'organization',
509
+ 'type' => 'text_medium',
510
+ ),
511
+ array(
512
+ 'name' => '',
513
+ 'desc' => __( 'Longitude.', 'all-in-one-schemaorg-rich-snippets' ),
514
+ 'id' => $prefix . 'organization_longitude',
515
+ 'class' => 'organization',
516
+ 'type' => 'text_medium',
517
+ ),
518
+ // Meta Settings for People.
519
+ array(
520
+ 'name' => __( 'Rich Snippets - Person', 'all-in-one-schemaorg-rich-snippets' ),
521
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
522
+ 'id' => $prefix . 'people',
523
+ 'class' => 'people',
524
+ 'type' => 'title',
525
+ ),
526
+ array(
527
+ 'name' => __( 'Person&lsquo;s Name', 'all-in-one-schemaorg-rich-snippets' ),
528
+ 'desc' => __( 'Enter the relative person&lsquo;s name.', 'all-in-one-schemaorg-rich-snippets' ),
529
+ 'id' => $prefix . 'people_fn',
530
+ 'class' => 'people',
531
+ 'type' => 'text_medium',
532
+ ),
533
+ array(
534
+ 'name' => __( 'Nickname', 'all-in-one-schemaorg-rich-snippets' ),
535
+ 'desc' => __( 'Enter the nickname (if any).', 'all-in-one-schemaorg-rich-snippets' ),
536
+ 'id' => $prefix . 'people_nickname',
537
+ 'class' => 'people',
538
+ 'type' => 'text_medium',
539
+ ),
540
+ array(
541
+ 'name' => __( 'Photograph', 'all-in-one-schemaorg-rich-snippets' ),
542
+ 'desc' => __( 'Upload the photo or select from media library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
543
+ 'id' => $prefix . 'people_photo',
544
+ 'class' => 'people',
545
+ 'type' => 'file',
546
+ ),
547
+ array(
548
+ 'name' => __( 'Job Title ', 'all-in-one-schemaorg-rich-snippets' ),
549
+ 'desc' => __( 'Enter job title.', 'all-in-one-schemaorg-rich-snippets' ),
550
+ 'id' => $prefix . 'people_job_title',
551
+ 'class' => 'people',
552
+ 'type' => 'text_medium',
553
+ ),
554
+ array(
555
+ 'name' => __( 'Homepage URL', 'all-in-one-schemaorg-rich-snippets' ),
556
+ 'desc' => __( 'Enter homepage URL(if any).', 'all-in-one-schemaorg-rich-snippets' ),
557
+ 'id' => $prefix . 'people_website',
558
+ 'class' => 'people',
559
+ 'type' => 'text_medium',
560
+ ),
561
+ array(
562
+ 'name' => __( 'Company / Organization', 'all-in-one-schemaorg-rich-snippets' ),
563
+ 'desc' => __( 'Enter Company or Organization name in affiliation.', 'all-in-one-schemaorg-rich-snippets' ),
564
+ 'id' => $prefix . 'people_company',
565
+ 'class' => 'people',
566
+ 'type' => 'text_medium',
567
+ ),
568
+ array(
569
+ 'name' => __( 'Address', 'all-in-one-schemaorg-rich-snippets' ),
570
+ 'desc' => __( 'Enter Street', 'all-in-one-schemaorg-rich-snippets' ),
571
+ 'id' => $prefix . 'people_street',
572
+ 'class' => 'people',
573
+ 'type' => 'text_medium',
574
+ ),
575
+ array(
576
+ 'name' => '',
577
+ 'desc' => __( 'Enter Locality', 'all-in-one-schemaorg-rich-snippets' ),
578
+ 'id' => $prefix . 'people_local',
579
+ 'class' => 'people',
580
+ 'type' => 'text_medium',
581
+ ),
582
+ array(
583
+ 'name' => '',
584
+ 'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
585
+ 'id' => $prefix . 'people_region',
586
+ 'class' => 'people',
587
+ 'type' => 'text_medium',
588
+ ),
589
+ array(
590
+ 'name' => '',
591
+ 'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
592
+ 'id' => $prefix . 'people_postal',
593
+ 'class' => 'people',
594
+ 'type' => 'text_medium',
595
+ ),
596
+
597
+ // Meta Settings for Products.
598
+ array(
599
+ 'name' => __( 'Rich Snippets - Products', 'all-in-one-schemaorg-rich-snippets' ),
600
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
601
+ 'id' => $prefix . 'product',
602
+ 'class' => 'product',
603
+ 'type' => 'title',
604
+ ),
605
+ array(
606
+ 'name' => __( 'Your Rating', 'all-in-one-schemaorg-rich-snippets' ),
607
+ 'desc' => __( 'Rate this product or aggregate rating.', 'all-in-one-schemaorg-rich-snippets' ),
608
+ 'id' => $prefix . 'product_rating',
609
+ 'class' => 'star product',
610
+ 'type' => 'radio',
611
+ 'options' => array(
612
+ array(
613
+ 'name' => '',
614
+ 'value' => '1',
615
+ ),
616
+ array(
617
+ 'name' => '',
618
+ 'value' => '2',
619
+ ),
620
+ array(
621
+ 'name' => '',
622
+ 'value' => '3',
623
+ ),
624
+ array(
625
+ 'name' => '',
626
+ 'value' => '4',
627
+ ),
628
+ array(
629
+ 'name' => '',
630
+ 'value' => '5',
631
+ ),
632
+ ),
633
+ ),
634
+ array(
635
+ 'name' => __( 'Brand Name', 'all-in-one-schemaorg-rich-snippets' ),
636
+ 'desc' => __( 'Enter the products brand name', 'all-in-one-schemaorg-rich-snippets' ),
637
+ 'id' => $prefix . 'product_brand',
638
+ 'class' => 'product',
639
+ 'type' => 'text_medium',
640
+ ),
641
+ array(
642
+ 'name' => __( 'Product Name', 'all-in-one-schemaorg-rich-snippets' ),
643
+ 'desc' => __( 'Enter the product name.', 'all-in-one-schemaorg-rich-snippets' ),
644
+ 'id' => $prefix . 'product_name',
645
+ 'class' => 'product',
646
+ 'type' => 'text_medium',
647
+ ),
648
+ array(
649
+ 'name' => __( 'Product Image', 'all-in-one-schemaorg-rich-snippets' ),
650
+ 'desc' => __( 'Upload the product image or select from library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
651
+ 'id' => $prefix . 'product_image',
652
+ 'class' => 'product',
653
+ 'type' => 'file',
654
+ ),
655
+ array(
656
+ 'name' => __( 'Product Price', 'all-in-one-schemaorg-rich-snippets' ),
657
+ 'desc' => __( 'Enter the product Price.', 'all-in-one-schemaorg-rich-snippets' ),
658
+ 'id' => $prefix . 'product_price',
659
+ 'class' => 'product',
660
+ 'type' => 'text_small',
661
+ ),
662
+ array(
663
+ 'name' => __( 'Currency ', 'all-in-one-schemaorg-rich-snippets' ),
664
+ 'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
665
+ 'id' => $prefix . 'product_cur',
666
+ 'class' => 'product',
667
+ 'type' => 'text_small',
668
+ ),
669
+ array(
670
+ 'name' => __( 'Availability', 'all-in-one-schemaorg-rich-snippets' ),
671
+ 'desc' => __( 'Select the products availability.', 'all-in-one-schemaorg-rich-snippets' ),
672
+ 'id' => $prefix . 'product_status',
673
+ 'class' => 'product',
674
+ 'type' => 'select',
675
+ 'options' => array(
676
+ array(
677
+ 'name' => __( '__ Please Select __', 'all-in-one-schemaorg-rich-snippets' ),
678
+ 'value' => '',
679
+ ),
680
+ array(
681
+ 'name' => __( 'Out of Stock', 'all-in-one-schemaorg-rich-snippets' ),
682
+ 'value' => 'out_of_stock',
683
+ ),
684
+ array(
685
+ 'name' => __( 'In Stock', 'all-in-one-schemaorg-rich-snippets' ),
686
+ 'value' => 'in_stock',
687
+ ),
688
+ array(
689
+ 'name' => __( 'In Store Only', 'all-in-one-schemaorg-rich-snippets' ),
690
+ 'value' => 'instore_only',
691
+ ),
692
+ array(
693
+ 'name' => __( 'Pre-Order', 'all-in-one-schemaorg-rich-snippets' ),
694
+ 'value' => 'preorder',
695
+ ),
696
+ ),
697
+ ), // Meta Settings for Recipes.
698
+ array(
699
+ 'name' => __( 'Rich Snippets - Recipes', 'all-in-one-schemaorg-rich-snippets' ),
700
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
701
+ 'id' => $prefix . 'recipes',
702
+ 'class' => 'recipes',
703
+ 'type' => 'title',
704
+ ),
705
+ array(
706
+ 'name' => __( 'Recipe Name ', 'all-in-one-schemaorg-rich-snippets' ),
707
+ 'desc' => __( 'Enter the recipe name.', 'all-in-one-schemaorg-rich-snippets' ),
708
+ 'id' => $prefix . 'recipes_name',
709
+ 'class' => 'recipes',
710
+ 'type' => 'text_medium',
711
+ ),
712
+ array(
713
+ 'name' => __( 'Author Name ', 'all-in-one-schemaorg-rich-snippets' ),
714
+ 'desc' => __( 'Enter the Author name.', 'all-in-one-schemaorg-rich-snippets' ),
715
+ 'id' => $prefix . 'authors_name',
716
+ 'class' => 'recipes',
717
+ 'type' => 'text_medium',
718
+ ),
719
+ array(
720
+ 'name' => __( 'Time Required ', 'all-in-one-schemaorg-rich-snippets' ),
721
+ 'desc' => __( 'Preperation time (Format: 1H30M. H - Hours, M - Minutes )', 'all-in-one-schemaorg-rich-snippets' ),
722
+ 'id' => $prefix . 'recipes_preptime',
723
+ 'class' => 'recipes',
724
+ 'type' => 'text_small',
725
+ ),
726
+ array(
727
+ 'name' => '',
728
+ 'desc' => __( 'Cook Time. (Format: 1H30M. H - Hours, M - Minutes )', 'all-in-one-schemaorg-rich-snippets' ),
729
+ 'id' => $prefix . 'recipes_cooktime',
730
+ 'class' => 'recipes',
731
+ 'type' => 'text_small',
732
+ ),
733
+ array(
734
+ 'name' => '',
735
+ 'desc' => __( 'Total Time (Format: 1H30M. H - Hours, M - Minutes )', 'all-in-one-schemaorg-rich-snippets' ),
736
+ 'id' => $prefix . 'recipes_totaltime',
737
+ 'class' => 'recipes',
738
+ 'type' => 'text_small',
739
+ ),
740
+ array(
741
+ 'name' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
742
+ 'desc' => __( 'Describe the recipe in short.', 'all-in-one-schemaorg-rich-snippets' ),
743
+ 'id' => $prefix . 'recipes_desc',
744
+ 'class' => 'recipes',
745
+ 'type' => 'textarea_small',
746
+ ),
747
+ array(
748
+ 'name' => __( 'Nutrition', 'all-in-one-schemaorg-rich-snippets' ),
749
+ 'desc' => __( 'Nutrition', 'all-in-one-schemaorg-rich-snippets' ),
750
+ 'id' => $prefix . 'recipes_nutrition',
751
+ 'class' => 'recipes',
752
+ 'type' => 'text_medium',
753
+ ),
754
+ array(
755
+ 'name' => __( 'Ingredients', 'all-in-one-schemaorg-rich-snippets' ),
756
+ 'desc' => __( 'Enter the ingredients used', 'all-in-one-schemaorg-rich-snippets' ),
757
+ 'id' => $prefix . 'recipes_ingredient',
758
+ 'class' => 'recipes',
759
+ 'type' => 'text_medium',
760
+ ),
761
+ array(
762
+ 'name' => __( 'Recipe Photo', 'all-in-one-schemaorg-rich-snippets' ),
763
+ 'desc' => __( 'Upload or Select recipe photo. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
764
+ 'id' => $prefix . 'recipes_photo',
765
+ 'class' => 'recipes',
766
+ 'type' => 'file',
767
+ ),
768
+ // Meta Settings for Software Application.
769
+ array(
770
+ 'name' => __( 'Rich Snippets - Software Application', 'all-in-one-schemaorg-rich-snippets' ),
771
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
772
+ 'id' => $prefix . 'software',
773
+ 'class' => 'software',
774
+ 'type' => 'title',
775
+ ),
776
+ array(
777
+ 'name' => __( 'Software Rating', 'all-in-one-schemaorg-rich-snippets' ),
778
+ 'desc' => __( 'Rate this software.', 'all-in-one-schemaorg-rich-snippets' ),
779
+ 'id' => $prefix . 'software_rating',
780
+ 'class' => 'star software',
781
+ 'type' => 'radio',
782
+ 'options' => array(
783
+ array(
784
+ 'name' => '',
785
+ 'value' => '1',
786
+ ),
787
+ array(
788
+ 'name' => '',
789
+ 'value' => '2',
790
+ ),
791
+ array(
792
+ 'name' => '',
793
+ 'value' => '3',
794
+ ),
795
+ array(
796
+ 'name' => '',
797
+ 'value' => '4',
798
+ ),
799
+ array(
800
+ 'name' => '',
801
+ 'value' => '5',
802
+ ),
803
+ ),
804
+ ),
805
+ array(
806
+ 'name' => __( 'Price', 'all-in-one-schemaorg-rich-snippets' ),
807
+ 'desc' => __( 'Enter the Price of Software', 'all-in-one-schemaorg-rich-snippets' ),
808
+ 'id' => $prefix . 'software_price',
809
+ 'class' => 'software',
810
+ 'type' => 'text_small',
811
+ ),
812
+ array(
813
+ 'name' => __( 'Currency', 'all-in-one-schemaorg-rich-snippets' ),
814
+ 'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
815
+ 'id' => $prefix . 'software_cur',
816
+ 'class' => 'software',
817
+ 'type' => 'text_small',
818
+ ),
819
+ array(
820
+ 'name' => __( 'Software Name ', 'all-in-one-schemaorg-rich-snippets' ),
821
+ 'desc' => __( 'Enter the Software Name.', 'all-in-one-schemaorg-rich-snippets' ),
822
+ 'id' => $prefix . 'software_name',
823
+ 'class' => 'software',
824
+ 'type' => 'text_medium',
825
+ ),
826
+ array(
827
+ 'name' => __( 'Operating System', 'all-in-one-schemaorg-rich-snippets' ),
828
+ 'desc' => __( 'Enter the software Operating System.', 'all-in-one-schemaorg-rich-snippets' ),
829
+ 'id' => $prefix . 'software_os',
830
+ 'class' => 'software',
831
+ 'type' => 'text_medium',
832
+ ),
833
+ array(
834
+ 'name' => __( 'Application Category', 'all-in-one-schemaorg-rich-snippets' ),
835
+ 'desc' => __( 'Like Game, Multimedia', 'all-in-one-schemaorg-rich-snippets' ),
836
+ 'id' => $prefix . 'software_cat',
837
+ 'class' => 'software',
838
+ 'type' => 'text_medium',
839
+ ),
840
+ array(
841
+ 'name' => __( 'Software Image', 'all-in-one-schemaorg-rich-snippets' ),
842
+ 'desc' => __( 'Upload or select image of software. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
843
+ 'id' => $prefix . 'software_image',
844
+ 'class' => 'software',
845
+ 'type' => 'file',
846
+ ),
847
+ array(
848
+ 'name' => __( 'Landing Page', 'all-in-one-schemaorg-rich-snippets' ),
849
+ 'desc' => __( 'Enter the landing page url for software', 'all-in-one-schemaorg-rich-snippets' ),
850
+ 'id' => $prefix . 'software_landing',
851
+ 'class' => 'software',
852
+ 'type' => 'text',
853
+ ), // Meta Settings for Video.
854
+ array(
855
+ 'name' => __( 'Rich Snippets - Videos', 'all-in-one-schemaorg-rich-snippets' ),
856
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
857
+ 'id' => $prefix . 'video',
858
+ 'class' => 'video',
859
+ 'type' => 'title',
860
+ ),
861
+ array(
862
+ 'name' => __( 'Video Title', 'all-in-one-schemaorg-rich-snippets' ),
863
+ 'desc' => __( 'Enter the title for this video', 'all-in-one-schemaorg-rich-snippets' ),
864
+ 'id' => $prefix . 'video_title',
865
+ 'class' => 'video',
866
+ 'type' => 'text',
867
+ ),
868
+ array(
869
+ 'name' => __( 'Video Description', 'all-in-one-schemaorg-rich-snippets' ),
870
+ 'desc' => __( 'Enter the brief description for this video', 'all-in-one-schemaorg-rich-snippets' ),
871
+ 'id' => $prefix . 'video_desc',
872
+ 'class' => 'video',
873
+ 'type' => 'textarea_small',
874
+ ),
875
+ array(
876
+ 'name' => __( 'Video Thumbnail', 'all-in-one-schemaorg-rich-snippets' ),
877
+ 'desc' => __( 'Upload or select video thumbnail from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
878
+ 'id' => $prefix . 'video_thumb',
879
+ 'class' => 'video',
880
+ 'type' => 'file',
881
+ ),
882
+ array(
883
+ 'name' => __( 'Video', 'all-in-one-schemaorg-rich-snippets' ),
884
+ 'desc' => __( 'Upload Video or enter the video file url<br>Example: <br> http://www.example.com/video123.flv<br>A URL pointing to the actual video media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .avi, .flv, or other video file format', 'all-in-one-schemaorg-rich-snippets' ),
885
+ 'id' => $prefix . 'video_url',
886
+ 'class' => 'video',
887
+ 'type' => 'file',
888
+ ),
889
+
890
+ array(
891
+ 'name' => __( 'Embed Video', 'all-in-one-schemaorg-rich-snippets' ),
892
+ 'desc' => __( 'A URL pointing to a player for the specific video. Usually this is the information in the src element of an &lt;embed&gt;tag. <br>Example: <br>Youtube: https://www.youtube.com/embed/CibazcCevOk <br>Dailymotion: http://www.dailymotion.com/swf/x1o2g<br><div class="bsf_vd_note"><h3>Add only one url either in "Video" or "Embed Video" field. Dont use both.</h3></div>', 'all-in-one-schemaorg-rich-snippets' ),
893
+ 'id' => $prefix . 'video_emb_url',
894
+ 'class' => 'video',
895
+ 'type' => 'text',
896
+ ),
897
+
898
+ array(
899
+ 'name' => __( 'Video Duration', 'all-in-one-schemaorg-rich-snippets' ),
900
+ 'desc' => __( 'Enter the duration for this video', 'all-in-one-schemaorg-rich-snippets' ),
901
+ 'id' => $prefix . 'video_duration',
902
+ 'class' => 'video',
903
+ 'type' => 'text_small',
904
+ ),
905
+ array(
906
+ 'name' => __( 'Upload Date', 'all-in-one-schemaorg-rich-snippets' ),
907
+ 'desc' => __( 'Provide the date when the video is uploaded', 'all-in-one-schemaorg-rich-snippets' ),
908
+ 'id' => $prefix . 'video_date',
909
+ 'class' => 'video',
910
+ 'type' => 'text_date',
911
+ ),
912
+ // Meta Settings for Article.
913
+ array(
914
+ 'name' => __( 'Rich Snippets - Article', 'all-in-one-schemaorg-rich-snippets' ),
915
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
916
+ 'id' => $prefix . 'article',
917
+ 'class' => 'article',
918
+ 'type' => 'title',
919
+ ),
920
+ array(
921
+ 'name' => __( 'Article Image', 'all-in-one-schemaorg-rich-snippets' ),
922
+ 'desc' => __( 'Upload or select image from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
923
+ 'id' => $prefix . 'article_image',
924
+ 'class' => 'article',
925
+ 'type' => 'file',
926
+ ),
927
+ array(
928
+ 'name' => __( 'Article Name', 'all-in-one-schemaorg-rich-snippets' ),
929
+ 'desc' => __( 'Enter the name for this article', 'all-in-one-schemaorg-rich-snippets' ),
930
+ 'id' => $prefix . 'article_name',
931
+ 'class' => 'article',
932
+ 'type' => 'text',
933
+ ),
934
+ array(
935
+ 'name' => __( 'Short Description', 'all-in-one-schemaorg-rich-snippets' ),
936
+ 'desc' => __( 'Enter the brief description about this article (About 30 Words)', 'all-in-one-schemaorg-rich-snippets' ),
937
+ 'id' => $prefix . 'article_desc',
938
+ 'class' => 'article',
939
+ 'type' => 'textarea_small',
940
+ ),
941
+ array(
942
+ 'name' => __( 'Author', 'all-in-one-schemaorg-rich-snippets' ),
943
+ 'desc' => __( 'Enter the author name for this article', 'all-in-one-schemaorg-rich-snippets' ),
944
+ 'id' => $prefix . 'article_author',
945
+ 'class' => 'article',
946
+ 'type' => 'text',
947
+ ),
948
+ array(
949
+ 'name' => __( 'Publisher - Orgnization', 'all-in-one-schemaorg-rich-snippets' ),
950
+ 'desc' => __( 'Enter the publisher name for this article', 'all-in-one-schemaorg-rich-snippets' ),
951
+ 'id' => $prefix . 'article_publisher',
952
+ 'class' => 'article',
953
+ 'type' => 'text',
954
+ ),
955
+ array(
956
+ 'name' => __( 'Publisher Logo', 'all-in-one-schemaorg-rich-snippets' ),
957
+ 'desc' => __( 'Upload or select image from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
958
+ 'id' => $prefix . 'article_publisher_logo',
959
+ 'class' => 'article',
960
+ 'type' => 'file',
961
+ ),
962
+
963
+ // Meta Settings for Service.
964
+ array(
965
+ 'name' => __( 'Rich Snippets - Service', 'all-in-one-schemaorg-rich-snippets' ),
966
+ 'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
967
+ 'id' => $prefix . 'service',
968
+ 'class' => 'service',
969
+ 'type' => 'title',
970
+ ),
971
+ array(
972
+ 'name' => __( 'Image', 'all-in-one-schemaorg-rich-snippets' ),
973
+ 'desc' => __( 'Upload or select image from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
974
+ 'id' => $prefix . 'service_image',
975
+ 'class' => 'service',
976
+ 'type' => 'file',
977
+ ),
978
+ array(
979
+ 'name' => __( 'Service Type', 'all-in-one-schemaorg-rich-snippets' ),
980
+ 'desc' => __( 'Enter the service type', 'all-in-one-schemaorg-rich-snippets' ),
981
+ 'id' => $prefix . 'service_type',
982
+ 'class' => 'service',
983
+ 'type' => 'text',
984
+ ),
985
+ array(
986
+ 'name' => __( 'Service Served Area', 'all-in-one-schemaorg-rich-snippets' ),
987
+ 'desc' => __( 'Enter the area where service is available', 'all-in-one-schemaorg-rich-snippets' ),
988
+ 'id' => $prefix . 'service_area',
989
+ 'class' => 'service',
990
+ 'type' => 'text',
991
+ ),
992
+ array(
993
+ 'name' => __( 'Short Description', 'all-in-one-schemaorg-rich-snippets' ),
994
+ 'desc' => __( 'Enter the description about service (About 30 Words)', 'all-in-one-schemaorg-rich-snippets' ),
995
+ 'id' => $prefix . 'service_desc',
996
+ 'class' => 'service',
997
+ 'type' => 'textarea_small',
998
+ ),
999
+ array(
1000
+ 'name' => __( 'Provider Name', 'all-in-one-schemaorg-rich-snippets' ),
1001
+ 'desc' => __( 'Enter the service provider name', 'all-in-one-schemaorg-rich-snippets' ),
1002
+ 'id' => $prefix . 'service_provider',
1003
+ 'class' => 'service',
1004
+ 'type' => 'text',
1005
+ ),
1006
+ array(
1007
+ 'name' => __( 'Location', 'all-in-one-schemaorg-rich-snippets' ),
1008
+ 'desc' => __( 'Street Address', 'all-in-one-schemaorg-rich-snippets' ),
1009
+ 'id' => $prefix . 'service_street',
1010
+ 'class' => 'service',
1011
+ 'type' => 'text_medium',
1012
+ ),
1013
+ array(
1014
+ 'name' => '',
1015
+ 'desc' => __( 'Locality', 'all-in-one-schemaorg-rich-snippets' ),
1016
+ 'id' => $prefix . 'service_local',
1017
+ 'class' => 'service',
1018
+ 'type' => 'text_medium',
1019
+ ),
1020
+ array(
1021
+ 'name' => '',
1022
+ 'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
1023
+ 'id' => $prefix . 'service_region',
1024
+ 'class' => 'service',
1025
+ 'type' => 'text_medium',
1026
+ ),
1027
+ array(
1028
+ 'name' => '',
1029
+ 'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
1030
+ 'id' => $prefix . 'service_postal_code',
1031
+ 'class' => 'service',
1032
+ 'type' => 'text_medium',
1033
+ ),
1034
+ array(
1035
+ 'name' => __( 'Provider Location Image', 'all-in-one-schemaorg-rich-snippets' ),
1036
+ 'desc' => __( 'Upload the provider location image or select from library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
1037
+ 'id' => $prefix . 'provider_location_image',
1038
+ 'class' => 'service',
1039
+ 'type' => 'file',
1040
+ ),
1041
+ array(
1042
+ 'name' => __( 'Telephone', 'all-in-one-schemaorg-rich-snippets' ),
1043
+ 'desc' => __( 'Telephone number', 'all-in-one-schemaorg-rich-snippets' ),
1044
+ 'id' => $prefix . 'service_telephone',
1045
+ 'class' => 'service',
1046
+ 'type' => 'text_medium',
1047
+ ),
1048
+ ),
1049
+ );
1050
+ // Add other metaboxes as needed.
1051
+ return $meta_boxes;
1052
+ }
1053
+
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce
3
  Donate link: https://www.paypal.me/BrainstormForce
4
  Tags: schema markup, structured data, rich snippets, schema.org, Microdata, schema
5
  Requires at least: 3.7
6
- Tested up to: 5.3
7
- Stable tag: 1.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
@@ -80,6 +80,13 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
83
  = 1.6.0 =
84
  - New: Added ItemReviewed types in Review schema.
85
  - Fix: error "Thing is not a known valid target type for the item reviewed the property" in the review schema.
3
  Donate link: https://www.paypal.me/BrainstormForce
4
  Tags: schema markup, structured data, rich snippets, schema.org, Microdata, schema
5
  Requires at least: 3.7
6
+ Tested up to: 5.4
7
+ Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
80
 
81
  == Changelog ==
82
 
83
+ = 1.6.1 =
84
+ - Improvement - Compatibility with the latest WordPress PHP_CodeSniffer rules.
85
+ - Improvement - Updated the Schema URL to the https instead of HTTP.
86
+ - Fix - Tabs conflict with the Astra theme.
87
+ - Fix - Image field is required error showing in the Recipe schema.
88
+ - Fix - Remove the support for Rating in the service schema as per the new Google update.
89
+
90
  = 1.6.0 =
91
  - New: Added ItemReviewed types in Review schema.
92
  - Fix: error "Thing is not a known valid target type for the item reviewed the property" in the review schema.
settings.php CHANGED
@@ -1,168 +1,184 @@
1
- <?php
2
- // Function to add review option for settings
3
- function add_review_option()
4
- {
5
- $review_opt = array(
6
- 'review_title' => __('Summary','rich-snippets'),
7
- 'item_reviewer' => __('Reviewer','rich-snippets'),
8
- 'review_date' => __('Review Date','rich-snippets'),
9
- 'item_name' => __('Reviewed Item','rich-snippets'),
10
- 'item_rating' => __('Author Rating','rich-snippets')
11
- );
12
- add_option('bsf_review',$review_opt);
13
- }
14
-
15
- // Function to add event option for settings
16
- function add_event_option()
17
- {
18
- $event_opt = array(
19
- 'snippet_title' => __('Summary','rich-snippets'),
20
- 'event_title' => __('Event','rich-snippets'),
21
- 'event_location' => __('Location','rich-snippets'),
22
- 'event_desc' => __('Description','rich-snippets'),
23
- 'start_time' => __('Starting on','rich-snippets'),
24
- 'end_time' => __('Ending on','rich-snippets'),
25
- 'events_price' => __('Offer Price','rich-snippets')
26
- );
27
- add_option('bsf_event',$event_opt);
28
- }
29
-
30
- // Function to add person option for settings
31
- function add_person_option()
32
- {
33
- $person_opt = array(
34
- 'snippet_title' => __('Summary','rich-snippets'),
35
- 'person_name' => __('Name','rich-snippets'),
36
- 'person_nickname' => __('Nickname','rich-snippets'),
37
- 'person_job_title' => __('Job Title','rich-snippets'),
38
- 'person_website' => __('Website','rich-snippets'),
39
- 'person_company' => __('Company','rich-snippets'),
40
- 'person_address' => __('Address','rich-snippets')
41
- );
42
- add_option('bsf_person',$person_opt);
43
- }
44
-
45
- // Function to add product option for settings
46
- function add_product_option()
47
- {
48
- $product_opt = array(
49
- 'snippet_title' => __('Summary','rich-snippets'),
50
- 'product_rating' => __('Author Rating','rich-snippets'),
51
- 'product_brand' => __('Brand Name','rich-snippets'),
52
- 'product_name' => __('Product Name','rich-snippets'),
53
- 'product_agr' => __('Aggregate Rating','rich-snippets'),
54
- 'product_price' => __('Price','rich-snippets'),
55
- 'product_avail' => __('Product Availability','rich-snippets')
56
- );
57
- add_option('bsf_product',$product_opt);
58
- }
59
-
60
- // Function to add recipe option for settings
61
- function add_recipe_option()
62
- {
63
- $recipe_opt = array(
64
- 'snippet_title' => __('Summary','rich-snippets'),
65
- 'recipe_name' => __('Recipe Name','rich-snippets'),
66
- 'author_name' => __('Author Name','rich-snippets'),
67
- 'recipe_pub' => __('Published On','rich-snippets'),
68
- 'recipe_prep' => __('Preparation Time','rich-snippets'),
69
- 'recipe_cook' => __('Cook Time','rich-snippets'),
70
- 'recipe_time' => __('Total Time','rich-snippets'),
71
- 'recipe_desc' => __('Description','rich-snippets'),
72
- 'recipe_nutrition' => __('Nutrition','rich-snippets'),
73
- 'recipe_ingredient' => __('Ingredients','rich-snippets'),
74
- 'recipe_rating' => __('Average Rating','rich-snippets')
75
- );
76
- add_option('bsf_recipe',$recipe_opt);
77
- }
78
-
79
- // Function to add software option for settings
80
- function add_software_option()
81
- {
82
- $software_opt = array(
83
- 'snippet_title' => __('Summary','rich-snippets'),
84
- 'software_rating' => __('Author Rating','rich-snippets'),
85
- 'software_agr' => __('Aggregate Rating','rich-snippets'),
86
- 'software_price' => __('Price','rich-snippets'),
87
- 'software_name' => __('Software Name','rich-snippets'),
88
- 'software_os' => __('Operating System','rich-snippets'),
89
- 'software_website' => __('Landing Page','rich-snippets'),
90
- );
91
- add_option('bsf_software',$software_opt);
92
- }
93
-
94
- // Function to add video option for settings
95
- function add_video_option()
96
- {
97
- $video_opt = array(
98
- 'snippet_title' => __('Summary','rich-snippets'),
99
- 'video_title' => __('Title','rich-snippets'),
100
- 'video_desc' => __('Description','rich-snippets'),
101
- 'video_time' => __('Duration','rich-snippets'),
102
- 'video_date' => __('Upload Date','rich-snippets')
103
- );
104
- add_option('bsf_video',$video_opt);
105
- }
106
- // Function to add article option for settings
107
- function add_article_option()
108
- {
109
- $article_opt = array(
110
- 'snippet_title' => __('Summary','rich-snippets'),
111
- 'article_name' => __('Article Name','rich-snippets'),
112
- 'article_author' => __('Author','rich-snippets'),
113
- 'article_desc' => __('Description','rich-snippets'),
114
- 'article_image' => __('Image','rich-snippets'),
115
- 'article_publisher' => __('Publisher Name','rich-snippets'),
116
- 'article_publisher_logo' => __('Publisher Logo','rich-snippets')
117
-
118
- );
119
- add_option('bsf_article',$article_opt);
120
- }
121
- // Function to add article option for settings
122
- function add_service_option()
123
- {
124
- $service_opt = array(
125
- 'snippet_title' => __('Summary','rich-snippets'),
126
- 'service_type' => __('Service Type','rich-snippets'),
127
- 'service_area' => __('Area','rich-snippets'),
128
- 'service_desc' => __('Description','rich-snippets'),
129
- 'service_channel' => __('URL','rich-snippets'),
130
- 'service_url_link' => __('Click Here For More Info','rich-snippets'),
131
- 'service_rating' => __('User Rating','rich-snippets'),
132
- 'service_provider_name' => __('Provider Name','rich-snippets'),
133
- 'provider_location' => __('Location','rich-snippets'),
134
- 'service_telephone' => __('Provider telephone number','rich-snippets'),
135
- // 'service_price' => __('Price Range','rich-snippets')
136
- );
137
- add_option('bsf_service',$service_opt);
138
- }
139
- // Function for customization
140
- function add_color_option()
141
- {
142
- $color_opt = array(
143
- 'snippet_box_bg' => '#F5F5F5',
144
- 'snippet_title_bg' => '#E4E4E4',
145
- 'snippet_border' => '#ACACAC',
146
- 'snippet_title_color' => '#333333',
147
- 'snippet_box_color' => '#333333',
148
- );
149
- add_option('bsf_custom',$color_opt);
150
- }
151
-
152
- // Function for customization
153
- function add_woo_commerce_option()
154
- {
155
- if ( !get_option( 'bsf_woocom_init_setting' ) ) {
156
-
157
- $woo_opt = false;
158
-
159
- if ( get_option( 'bsf_custom' ) ) {
160
- $woo_opt = true;
161
- }
162
-
163
- add_option('bsf_woocom_setting', $woo_opt);
164
- add_option('bsf_woocom_init_setting', 'done');
165
- }
166
- }
167
-
168
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings.
4
+ *
5
+ * @package AIOSRS.
6
+ */
7
+
8
+ /**
9
+ * Function to add review option for settings.
10
+ */
11
+ function add_review_option() {
12
+ $review_opt = array(
13
+ 'review_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
14
+ 'item_reviewer' => __( 'Reviewer', 'all-in-one-schemaorg-rich-snippets' ),
15
+ 'review_date' => __( 'Review Date', 'all-in-one-schemaorg-rich-snippets' ),
16
+ 'item_name' => __( 'Reviewed Item', 'all-in-one-schemaorg-rich-snippets' ),
17
+ 'item_rating' => __( 'Author Rating', 'all-in-one-schemaorg-rich-snippets' ),
18
+ );
19
+ add_option( 'bsf_review', $review_opt );
20
+ }
21
+
22
+ /**
23
+ * Function to add event option for settings.
24
+ */
25
+ function add_event_option() {
26
+ $event_opt = array(
27
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
28
+ 'event_title' => __( 'Event', 'all-in-one-schemaorg-rich-snippets' ),
29
+ 'event_location' => __( 'Location', 'all-in-one-schemaorg-rich-snippets' ),
30
+ 'event_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
31
+ 'start_time' => __( 'Starting on', 'all-in-one-schemaorg-rich-snippets' ),
32
+ 'end_time' => __( 'Ending on', 'all-in-one-schemaorg-rich-snippets' ),
33
+ 'events_price' => __( 'Offer Price', 'all-in-one-schemaorg-rich-snippets' ),
34
+ );
35
+ add_option( 'bsf_event', $event_opt );
36
+ }
37
+
38
+ /**
39
+ * Function to add person option for settings.
40
+ */
41
+ function add_person_option() {
42
+ $person_opt = array(
43
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
44
+ 'person_name' => __( 'Name', 'all-in-one-schemaorg-rich-snippets' ),
45
+ 'person_nickname' => __( 'Nickname', 'all-in-one-schemaorg-rich-snippets' ),
46
+ 'person_job_title' => __( 'Job Title', 'all-in-one-schemaorg-rich-snippets' ),
47
+ 'person_website' => __( 'Website', 'all-in-one-schemaorg-rich-snippets' ),
48
+ 'person_company' => __( 'Company', 'all-in-one-schemaorg-rich-snippets' ),
49
+ 'person_address' => __( 'Address', 'all-in-one-schemaorg-rich-snippets' ),
50
+ );
51
+ add_option( 'bsf_person', $person_opt );
52
+ }
53
+
54
+ /**
55
+ * Function to add product option for settings.
56
+ */
57
+ function add_product_option() {
58
+ $product_opt = array(
59
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
60
+ 'product_rating' => __( 'Author Rating', 'all-in-one-schemaorg-rich-snippets' ),
61
+ 'product_brand' => __( 'Brand Name', 'all-in-one-schemaorg-rich-snippets' ),
62
+ 'product_name' => __( 'Product Name', 'all-in-one-schemaorg-rich-snippets' ),
63
+ 'product_agr' => __( 'Aggregate Rating', 'all-in-one-schemaorg-rich-snippets' ),
64
+ 'product_price' => __( 'Price', 'all-in-one-schemaorg-rich-snippets' ),
65
+ 'product_avail' => __( 'Product Availability', 'all-in-one-schemaorg-rich-snippets' ),
66
+ );
67
+ add_option( 'bsf_product', $product_opt );
68
+ }
69
+
70
+ /**
71
+ * Function to add recipe option for settings.
72
+ */
73
+ function add_recipe_option() {
74
+ $recipe_opt = array(
75
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
76
+ 'recipe_name' => __( 'Recipe Name', 'all-in-one-schemaorg-rich-snippets' ),
77
+ 'author_name' => __( 'Author Name', 'all-in-one-schemaorg-rich-snippets' ),
78
+ 'recipe_pub' => __( 'Published On', 'all-in-one-schemaorg-rich-snippets' ),
79
+ 'recipe_prep' => __( 'Preparation Time', 'all-in-one-schemaorg-rich-snippets' ),
80
+ 'recipe_cook' => __( 'Cook Time', 'all-in-one-schemaorg-rich-snippets' ),
81
+ 'recipe_time' => __( 'Total Time', 'all-in-one-schemaorg-rich-snippets' ),
82
+ 'recipe_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
83
+ 'recipe_nutrition' => __( 'Nutrition', 'all-in-one-schemaorg-rich-snippets' ),
84
+ 'recipe_ingredient' => __( 'Ingredients', 'all-in-one-schemaorg-rich-snippets' ),
85
+ 'recipe_rating' => __( 'Average Rating', 'all-in-one-schemaorg-rich-snippets' ),
86
+ );
87
+ add_option( 'bsf_recipe', $recipe_opt );
88
+ }
89
+
90
+ /**
91
+ * Function to add software option for settings.
92
+ */
93
+ function add_software_option() {
94
+ $software_opt = array(
95
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
96
+ 'software_rating' => __( 'Author Rating', 'all-in-one-schemaorg-rich-snippets' ),
97
+ 'software_agr' => __( 'Aggregate Rating', 'all-in-one-schemaorg-rich-snippets' ),
98
+ 'software_price' => __( 'Price', 'all-in-one-schemaorg-rich-snippets' ),
99
+ 'software_name' => __( 'Software Name', 'all-in-one-schemaorg-rich-snippets' ),
100
+ 'software_os' => __( 'Operating System', 'all-in-one-schemaorg-rich-snippets' ),
101
+ 'software_website' => __( 'Landing Page', 'all-in-one-schemaorg-rich-snippets' ),
102
+ );
103
+ add_option( 'bsf_software', $software_opt );
104
+ }
105
+
106
+ /**
107
+ * Function to add video option for settings.
108
+ */
109
+ function add_video_option() {
110
+ $video_opt = array(
111
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
112
+ 'video_title' => __( 'Title', 'all-in-one-schemaorg-rich-snippets' ),
113
+ 'video_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
114
+ 'video_time' => __( 'Duration', 'all-in-one-schemaorg-rich-snippets' ),
115
+ 'video_date' => __( 'Upload Date', 'all-in-one-schemaorg-rich-snippets' ),
116
+ );
117
+ add_option( 'bsf_video', $video_opt );
118
+ }
119
+ /**
120
+ * Function to add article option for settings.
121
+ */
122
+ function add_article_option() {
123
+ $article_opt = array(
124
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
125
+ 'article_name' => __( 'Article Name', 'all-in-one-schemaorg-rich-snippets' ),
126
+ 'article_author' => __( 'Author', 'all-in-one-schemaorg-rich-snippets' ),
127
+ 'article_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
128
+ 'article_image' => __( 'Image', 'all-in-one-schemaorg-rich-snippets' ),
129
+ 'article_publisher' => __( 'Publisher Name', 'all-in-one-schemaorg-rich-snippets' ),
130
+ 'article_publisher_logo' => __( 'Publisher Logo', 'all-in-one-schemaorg-rich-snippets' ),
131
+
132
+ );
133
+ add_option( 'bsf_article', $article_opt );
134
+ }
135
+ /**
136
+ * Function to add article option for settings.
137
+ */
138
+ function add_service_option() {
139
+ $service_opt = array(
140
+ 'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
141
+ 'service_type' => __( 'Service Type', 'all-in-one-schemaorg-rich-snippets' ),
142
+ 'service_area' => __( 'Area', 'all-in-one-schemaorg-rich-snippets' ),
143
+ 'service_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
144
+ 'service_channel' => __( 'URL', 'all-in-one-schemaorg-rich-snippets' ),
145
+ 'service_url_link' => __( 'Click Here For More Info', 'all-in-one-schemaorg-rich-snippets' ),
146
+ 'service_rating' => __( 'User Rating', 'all-in-one-schemaorg-rich-snippets' ),
147
+ 'service_provider_name' => __( 'Provider Name', 'all-in-one-schemaorg-rich-snippets' ),
148
+ 'provider_location' => __( 'Location', 'all-in-one-schemaorg-rich-snippets' ),
149
+ 'service_telephone' => __( 'Provider telephone number', 'all-in-one-schemaorg-rich-snippets' ),
150
+ );
151
+ add_option( 'bsf_service', $service_opt );
152
+ }
153
+ /**
154
+ * Function for customization
155
+ */
156
+ function add_color_option() {
157
+ $color_opt = array(
158
+ 'snippet_box_bg' => '#F5F5F5',
159
+ 'snippet_title_bg' => '#E4E4E4',
160
+ 'snippet_border' => '#ACACAC',
161
+ 'snippet_title_color' => '#333333',
162
+ 'snippet_box_color' => '#333333',
163
+ );
164
+ add_option( 'bsf_custom', $color_opt );
165
+ }
166
+
167
+ /**
168
+ * Function for customization
169
+ */
170
+ function add_woo_commerce_option() {
171
+ if ( ! get_option( 'bsf_woocom_init_setting' ) ) {
172
+
173
+ $woo_opt = false;
174
+
175
+ if ( get_option( 'bsf_custom' ) ) {
176
+ $woo_opt = true;
177
+ }
178
+
179
+ add_option( 'bsf_woocom_setting', $woo_opt );
180
+ add_option( 'bsf_woocom_init_setting', 'done' );
181
+ }
182
+ }
183
+
184
+