Version Description
(18 Dec 2019) =
- Fixed: Author URL is missing #665
- Fixed: SoftwareApplication is being changed to Product schema type #669
- Fixed: AMP By Automatic compatibility issue (Image is not visible on post/page when SASWP is activated) #671
- Fixed: All values provided for url must point to the same page. #653
- Added: Ask if they are a customer in Email sending via Option panel #647
- Added: Compatibility with WordLift plugin. #625
- Enhancement: Updated Export/Import feature #595
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.19 |
Comparing to | |
See all releases |
Code changes from version 1.9.18 to 1.9.19
- admin_section/ajax-selectbox.php +0 -421
- admin_section/common-function.php +284 -447
- admin_section/css/amp/rating-module-front.css +166 -0
- admin_section/css/amp/rating-module.css +137 -0
- admin_section/fields-generator.php +0 -605
- admin_section/js/amp/collection-front.js +0 -0
- admin_section/js/main-script.js +46 -117
- admin_section/js/main-script.min.js +1 -1
- admin_section/settings.php +38 -62
- admin_section/structure_admin.php +20 -12
- core/array-list/compatibility-list.php +12 -0
- core/array-list/schema-properties.php +3 -3
- core/queries_function.php +13 -0
- modules/reviews/reviews_collection.php +19 -8
- modules/reviews/reviews_form.php +56 -114
- modules/reviews/reviews_service.php +82 -2
- modules/reviews/reviews_setup.php +6 -3
- modules/reviews/reviews_widget.php +5 -5
- output/compatibility.php +30 -0
- output/function.php +6 -0
- output/output.php +40 -7
- output/service.php +3 -3
- output/single.php +17 -1
- readme.txt +11 -1
- structured-data-for-wp.php +3 -2
admin_section/ajax-selectbox.php
CHANGED
@@ -1,421 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Ajax Selectbox Page
|
4 |
-
*
|
5 |
-
* @author Magazine3
|
6 |
-
* @category Admin
|
7 |
-
* @path admin_section/ajax-selectbox
|
8 |
-
* @version 1.1
|
9 |
-
*/
|
10 |
-
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* List of hooks used in this context
|
16 |
-
*/
|
17 |
-
add_action('wp_ajax_create_ajax_select_sdwp','saswp_ajax_select_creator');
|
18 |
-
add_action('wp_ajax_create_ajax_select_sdwp_taxonomy','saswp_create_ajax_select_taxonomy');
|
19 |
-
|
20 |
-
|
21 |
-
function saswp_ajax_select_creator($data = '', $saved_data= '', $current_number = '', $current_group_number ='') {
|
22 |
-
|
23 |
-
$response = $data;
|
24 |
-
$is_ajax = false;
|
25 |
-
|
26 |
-
if( $_SERVER['REQUEST_METHOD']=='POST'){
|
27 |
-
|
28 |
-
$is_ajax = true;
|
29 |
-
|
30 |
-
if(wp_verify_nonce($_POST["saswp_call_nonce"],'saswp_select_action_nonce')){
|
31 |
-
|
32 |
-
if ( isset( $_POST["id"] ) ) {
|
33 |
-
$response = sanitize_text_field(wp_unslash($_POST["id"]));
|
34 |
-
}
|
35 |
-
if ( isset( $_POST["number"] ) ) {
|
36 |
-
$current_number = intval(sanitize_text_field($_POST["number"]));
|
37 |
-
}
|
38 |
-
if ( isset( $_POST["group_number"] ) ) {
|
39 |
-
$current_group_number = intval(sanitize_text_field($_POST["group_number"]));
|
40 |
-
}
|
41 |
-
|
42 |
-
}else{
|
43 |
-
|
44 |
-
exit;
|
45 |
-
|
46 |
-
}
|
47 |
-
|
48 |
-
}
|
49 |
-
// send the response back to the front end
|
50 |
-
// vars
|
51 |
-
$choices = array();
|
52 |
-
|
53 |
-
$options['param'] = $response;
|
54 |
-
// some case's have the same outcome
|
55 |
-
if($options['param'] == "page_parent")
|
56 |
-
{
|
57 |
-
$options['param'] = "page";
|
58 |
-
}
|
59 |
-
|
60 |
-
switch($options['param'])
|
61 |
-
{
|
62 |
-
case "post_type":
|
63 |
-
|
64 |
-
$choices = saswp_post_type_generator();
|
65 |
-
|
66 |
-
$choices = apply_filters('saswp_modify_select_post_type', $choices );
|
67 |
-
|
68 |
-
unset($choices['saswp']);
|
69 |
-
|
70 |
-
break;
|
71 |
-
|
72 |
-
case "homepage":
|
73 |
-
|
74 |
-
$choices = array(
|
75 |
-
'true' => 'True',
|
76 |
-
'false' => 'False',
|
77 |
-
);
|
78 |
-
|
79 |
-
break;
|
80 |
-
|
81 |
-
case "page":
|
82 |
-
|
83 |
-
$post_type = 'page';
|
84 |
-
|
85 |
-
$posts = get_posts(array(
|
86 |
-
'posts_per_page' => -1,
|
87 |
-
'post_type' => $post_type,
|
88 |
-
'orderby' => 'menu_order title',
|
89 |
-
'order' => 'ASC',
|
90 |
-
'post_status' => 'any',
|
91 |
-
'suppress_filters' => false,
|
92 |
-
'update_post_meta_cache' => false,
|
93 |
-
));
|
94 |
-
|
95 |
-
if( $posts )
|
96 |
-
{
|
97 |
-
// sort into hierachial order!
|
98 |
-
if( is_post_type_hierarchical( $post_type ) )
|
99 |
-
{
|
100 |
-
$posts = get_page_children( 0, $posts );
|
101 |
-
}
|
102 |
-
|
103 |
-
foreach( $posts as $page )
|
104 |
-
{
|
105 |
-
$title = '';
|
106 |
-
$ancestors = get_ancestors($page->ID, 'page');
|
107 |
-
if($ancestors)
|
108 |
-
{
|
109 |
-
foreach($ancestors as $a)
|
110 |
-
{
|
111 |
-
$title .= '- ';
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
$title .= apply_filters( 'the_title', $page->post_title, $page->ID );
|
116 |
-
// status
|
117 |
-
if($page->post_status != "publish")
|
118 |
-
{
|
119 |
-
$title .= " ($page->post_status)";
|
120 |
-
}
|
121 |
-
|
122 |
-
$choices[ $page->ID ] = $title;
|
123 |
-
|
124 |
-
}
|
125 |
-
// foreach($pages as $page)
|
126 |
-
|
127 |
-
}
|
128 |
-
|
129 |
-
break;
|
130 |
-
|
131 |
-
case "page_template" :
|
132 |
-
|
133 |
-
$choices = array(
|
134 |
-
'default' => esc_html__('Default Template','schema-and-structured-data-for-wp'),
|
135 |
-
);
|
136 |
-
|
137 |
-
$templates = get_page_templates();
|
138 |
-
|
139 |
-
if($templates){
|
140 |
-
|
141 |
-
foreach($templates as $k => $v){
|
142 |
-
|
143 |
-
$choices[$v] = $k;
|
144 |
-
|
145 |
-
}
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
-
break;
|
151 |
-
|
152 |
-
case "post" :
|
153 |
-
|
154 |
-
$post_types = get_post_types();
|
155 |
-
|
156 |
-
unset( $post_types['page'], $post_types['attachment'], $post_types['revision'] , $post_types['nav_menu_item'], $post_types['acf'] , $post_types['amp_acf'],$post_types['saswp'] );
|
157 |
-
|
158 |
-
if( $post_types )
|
159 |
-
{
|
160 |
-
foreach( $post_types as $post_type ){
|
161 |
-
|
162 |
-
$posts = get_posts(array(
|
163 |
-
|
164 |
-
'numberposts' => '-1',
|
165 |
-
'post_type' => $post_type,
|
166 |
-
'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
|
167 |
-
'suppress_filters' => false,
|
168 |
-
|
169 |
-
));
|
170 |
-
|
171 |
-
if( $posts){
|
172 |
-
|
173 |
-
$choices[$post_type] = array();
|
174 |
-
|
175 |
-
foreach($posts as $post){
|
176 |
-
|
177 |
-
$title = apply_filters( 'the_title', $post->post_title, $post->ID );
|
178 |
-
// status
|
179 |
-
if($post->post_status != "publish"){
|
180 |
-
|
181 |
-
$title .= " ($post->post_status)";
|
182 |
-
}
|
183 |
-
|
184 |
-
$choices[$post_type][$post->ID] = $title;
|
185 |
-
|
186 |
-
}
|
187 |
-
// foreach($posts as $post)
|
188 |
-
}
|
189 |
-
// if( $posts )
|
190 |
-
}
|
191 |
-
// foreach( $post_types as $post_type )
|
192 |
-
}
|
193 |
-
// if( $post_types )
|
194 |
-
|
195 |
-
|
196 |
-
break;
|
197 |
-
|
198 |
-
case "post_category" :
|
199 |
-
|
200 |
-
$terms = get_terms( 'category', array( 'hide_empty' => false ) );
|
201 |
-
|
202 |
-
if( !empty($terms) ) {
|
203 |
-
|
204 |
-
foreach( $terms as $term ) {
|
205 |
-
|
206 |
-
$choices[ $term->term_id ] = $term->name;
|
207 |
-
|
208 |
-
}
|
209 |
-
|
210 |
-
}
|
211 |
-
|
212 |
-
break;
|
213 |
-
|
214 |
-
case "post_format" :
|
215 |
-
|
216 |
-
$choices = get_post_format_strings();
|
217 |
-
|
218 |
-
break;
|
219 |
-
|
220 |
-
case "user_type" :
|
221 |
-
|
222 |
-
global $wp_roles;
|
223 |
-
|
224 |
-
$choices = $wp_roles->get_names();
|
225 |
-
|
226 |
-
if( is_multisite() ){
|
227 |
-
|
228 |
-
$choices['super_admin'] = esc_html__('Super Admin','schema-and-structured-data-for-wp');
|
229 |
-
|
230 |
-
}
|
231 |
-
|
232 |
-
break;
|
233 |
-
|
234 |
-
case "ef_taxonomy" :
|
235 |
-
|
236 |
-
$choices = array('all' => esc_html__('All','schema-and-structured-data-for-wp'));
|
237 |
-
$taxonomies = saswp_post_taxonomy_generator();
|
238 |
-
$choices = array_merge($choices, $taxonomies);
|
239 |
-
|
240 |
-
break;
|
241 |
-
|
242 |
-
}
|
243 |
-
// allow custom location rules
|
244 |
-
$choices = $choices;
|
245 |
-
|
246 |
-
// Add None if no elements found in the current selected items
|
247 |
-
if ( empty( $choices) ) {
|
248 |
-
$choices = array('none' => esc_html__('No Items', 'schema-and-structured-data-for-wp') );
|
249 |
-
}
|
250 |
-
|
251 |
-
|
252 |
-
$output = '<select class="widefat ajax-output" name="data_group_array[group-'.esc_attr($current_group_number).'][data_array]['. esc_attr($current_number) .'][key_3]">';
|
253 |
-
|
254 |
-
// Generate Options for Posts
|
255 |
-
if ( $options['param'] == 'post' ) {
|
256 |
-
|
257 |
-
foreach ($choices as $choice_post_type) {
|
258 |
-
|
259 |
-
foreach ($choice_post_type as $key => $value) {
|
260 |
-
|
261 |
-
if ( $saved_data == $key ) {
|
262 |
-
|
263 |
-
$selected = 'selected="selected"';
|
264 |
-
|
265 |
-
} else {
|
266 |
-
|
267 |
-
$selected = '';
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
$output .= '<option '. esc_attr($selected) .' value="' . esc_attr($key) .'"> ' . esc_html__($value, 'schema-and-structured-data-for-wp') .' </option>';
|
272 |
-
}
|
273 |
-
}
|
274 |
-
// Options for Other then posts
|
275 |
-
} else {
|
276 |
-
|
277 |
-
foreach ($choices as $key => $value) {
|
278 |
-
|
279 |
-
if ( $saved_data == $key ) {
|
280 |
-
|
281 |
-
$selected = 'selected="selected"';
|
282 |
-
|
283 |
-
} else {
|
284 |
-
|
285 |
-
$selected = '';
|
286 |
-
|
287 |
-
}
|
288 |
-
|
289 |
-
$output .= '<option '. esc_attr($selected) .' value="' . esc_attr($key) .'"> ' . esc_html__($value, 'schema-and-structured-data-for-wp') .' </option>';
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
-
$output .= ' </select> ';
|
294 |
-
$allowed_html = saswp_expanded_allowed_tags();
|
295 |
-
echo wp_kses($output, $allowed_html);
|
296 |
-
|
297 |
-
if ( $is_ajax ) {
|
298 |
-
die();
|
299 |
-
}
|
300 |
-
// endif;
|
301 |
-
|
302 |
-
}
|
303 |
-
/**
|
304 |
-
* Function to Generate Proper Post Taxonomy for select and to add data.
|
305 |
-
* @return type array
|
306 |
-
* @since version 1.0
|
307 |
-
*/
|
308 |
-
function saswp_post_taxonomy_generator(){
|
309 |
-
|
310 |
-
$taxonomies = '';
|
311 |
-
$choices = array();
|
312 |
-
|
313 |
-
$taxonomies = get_taxonomies( array('public' => true), 'objects' );
|
314 |
-
|
315 |
-
if($taxonomies){
|
316 |
-
|
317 |
-
foreach($taxonomies as $taxonomy) {
|
318 |
-
|
319 |
-
$choices[ $taxonomy->name ] = $taxonomy->labels->name;
|
320 |
-
|
321 |
-
}
|
322 |
-
|
323 |
-
}
|
324 |
-
|
325 |
-
// unset post_format (why is this a public taxonomy?)
|
326 |
-
if( isset($choices['post_format']) ) {
|
327 |
-
|
328 |
-
unset( $choices['post_format']) ;
|
329 |
-
|
330 |
-
}
|
331 |
-
|
332 |
-
return $choices;
|
333 |
-
}
|
334 |
-
/**
|
335 |
-
* Function to create taxonomy
|
336 |
-
* @param type $selectedParentValue
|
337 |
-
* @param type $selectedValue
|
338 |
-
* @param type $current_number
|
339 |
-
* @param type $current_group_number
|
340 |
-
* @since version 1.0
|
341 |
-
*/
|
342 |
-
function saswp_create_ajax_select_taxonomy($selectedParentValue = '',$selectedValue='', $current_number ='', $current_group_number = ''){
|
343 |
-
|
344 |
-
$is_ajax = false;
|
345 |
-
|
346 |
-
if( $_SERVER['REQUEST_METHOD']=='POST'){
|
347 |
-
|
348 |
-
$is_ajax = true;
|
349 |
-
|
350 |
-
if(! current_user_can( 'manage_options' ) ) {
|
351 |
-
exit;
|
352 |
-
}
|
353 |
-
|
354 |
-
if(wp_verify_nonce($_POST["saswp_call_nonce"],'saswp_select_action_nonce')){
|
355 |
-
|
356 |
-
if(isset($_POST['id'])){
|
357 |
-
|
358 |
-
$selectedParentValue = sanitize_text_field(wp_unslash($_POST['id']));
|
359 |
-
|
360 |
-
}
|
361 |
-
|
362 |
-
if(isset($_POST['number'])){
|
363 |
-
|
364 |
-
$current_number = intval(sanitize_text_field($_POST['number']));
|
365 |
-
|
366 |
-
}
|
367 |
-
|
368 |
-
if ( isset( $_POST["group_number"] ) ) {
|
369 |
-
|
370 |
-
$current_group_number = intval(sanitize_text_field($_POST["group_number"]));
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
}else{
|
375 |
-
|
376 |
-
exit;
|
377 |
-
|
378 |
-
}
|
379 |
-
}
|
380 |
-
$taxonomies = array();
|
381 |
-
|
382 |
-
if($selectedParentValue == 'all'){
|
383 |
-
|
384 |
-
$taxonomies = get_terms( array(
|
385 |
-
'hide_empty' => true,
|
386 |
-
) );
|
387 |
-
|
388 |
-
}else{
|
389 |
-
|
390 |
-
$taxonomies = get_terms($selectedParentValue, array(
|
391 |
-
'hide_empty' => true,
|
392 |
-
) );
|
393 |
-
}
|
394 |
-
|
395 |
-
$choices = '<option value="all">'.esc_html__('All','schema-and-structured-data-for-wp').'</option>';
|
396 |
-
|
397 |
-
if(!empty($taxonomies)){
|
398 |
-
|
399 |
-
foreach($taxonomies as $taxonomy) {
|
400 |
-
|
401 |
-
$sel="";
|
402 |
-
|
403 |
-
if($selectedValue == $taxonomy->slug){
|
404 |
-
|
405 |
-
$sel = "selected";
|
406 |
-
|
407 |
-
}
|
408 |
-
$choices .= '<option value="'.esc_attr($taxonomy->slug).'" '.esc_attr($sel).'>'.esc_html__($taxonomy->name,'schema-and-structured-data-for-wp').'</option>';
|
409 |
-
|
410 |
-
}
|
411 |
-
|
412 |
-
$allowed_html = saswp_expanded_allowed_tags();
|
413 |
-
|
414 |
-
echo '<select class="widefat ajax-output-child" name="data_group_array[group-'. esc_attr($current_group_number) .'][data_array]['.esc_attr($current_number).'][key_4]">'. wp_kses($choices, $allowed_html).'</select>';
|
415 |
-
|
416 |
-
}
|
417 |
-
|
418 |
-
if($is_ajax){
|
419 |
-
die;
|
420 |
-
}
|
421 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin_section/common-function.php
CHANGED
@@ -14,11 +14,11 @@ if ( ! defined('ABSPATH') ) exit;
|
|
14 |
/**
|
15 |
* List of hooks used in this context
|
16 |
*/
|
17 |
-
add_action('admin_init', 'saswp_import_all_settings_and_schema',9);
|
18 |
add_action( 'wp_ajax_saswp_export_all_settings_and_schema', 'saswp_export_all_settings_and_schema');
|
19 |
-
add_action('plugins_loaded', 'saswp_defaultSettings' );
|
20 |
add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
|
21 |
-
add_action('amp_post_template_css','saswp_enqueue_amp_script');
|
22 |
|
23 |
|
24 |
//global variable to store List of labels starts here
|
@@ -69,7 +69,7 @@ if ( ! defined('ABSPATH') ) exit;
|
|
69 |
|
70 |
global $wpdb;
|
71 |
|
72 |
-
$result =
|
73 |
$errorDesc = array();
|
74 |
$all_schema_post = array();
|
75 |
|
@@ -77,80 +77,107 @@ if ( ! defined('ABSPATH') ) exit;
|
|
77 |
|
78 |
if($url){
|
79 |
|
80 |
-
$json_data = file_get_contents($url);
|
81 |
|
82 |
if($json_data){
|
83 |
|
84 |
-
|
85 |
-
if(array_key_exists('posts', $json_array)){
|
86 |
|
87 |
-
$
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
|
91 |
-
|
92 |
|
93 |
if($all_schema_post && is_array($all_schema_post)){
|
94 |
// begin transaction
|
95 |
$wpdb->query('START TRANSACTION');
|
96 |
|
97 |
foreach($all_schema_post as $schema_post){
|
|
|
|
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
}
|
115 |
-
|
116 |
-
|
|
|
|
|
117 |
|
118 |
-
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
}else{
|
128 |
-
$local_data[$key] = sanitize_text_field($local);
|
129 |
-
}
|
130 |
-
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
update_post_meta( $post_id, 'saswp_local_business_details', $local_data );
|
135 |
}
|
136 |
-
|
137 |
-
if
|
138 |
-
$data_array = saswp_sanitize_multi_array($schema_post['data_group_array'], 'data_array');
|
139 |
-
update_post_meta( $post_id, 'data_group_array', $data_array );
|
140 |
-
}
|
141 |
-
if(is_wp_error($result)){
|
142 |
$errorDesc[] = $result->get_error_message();
|
143 |
}
|
144 |
}
|
145 |
|
146 |
-
|
147 |
-
|
|
|
|
|
|
|
|
|
148 |
if(array_key_exists('sd_data', $json_array)){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
152 |
}
|
153 |
-
|
154 |
update_option('saswp-file-upload_url','');
|
155 |
|
156 |
}
|
@@ -173,100 +200,73 @@ if ( ! defined('ABSPATH') ) exit;
|
|
173 |
*/
|
174 |
function saswp_export_all_settings_and_schema(){
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
$export_data = array();
|
188 |
-
$export_data_all = array();
|
189 |
-
$schema_post = array();
|
190 |
-
$user_id = get_current_user_id();
|
191 |
|
192 |
-
|
193 |
-
|
194 |
-
array(
|
195 |
-
'post_type' => 'saswp',
|
196 |
-
'posts_per_page' => -1,
|
197 |
-
'post_status' => 'any',
|
198 |
-
)
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
$get_sd_data = get_option('sd_data');
|
203 |
-
|
204 |
-
if($all_schema_post || $get_sd_data){
|
205 |
-
|
206 |
-
foreach($all_schema_post as $schema){
|
207 |
-
|
208 |
-
$schema_post = array(
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
'post_modified' => $schema->post_modified,
|
224 |
-
'post_modified_gmt' => $schema->post_modified_gmt,
|
225 |
-
'post_content_filtered' => $schema->post_content_filtered,
|
226 |
-
'post_parent' => $schema->post_parent,
|
227 |
-
'menu_order' => $schema->menu_order,
|
228 |
-
'post_type' => 'saswp',
|
229 |
-
'post_mime_type' => $schema->post_mime_type,
|
230 |
-
'comment_count' => $schema->comment_count,
|
231 |
-
'filter' => $schema->filter,
|
232 |
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
-
$
|
249 |
-
$export_data[$schema->ID]['saswp_business_type'] = $local_business_type;
|
250 |
-
$export_data[$schema->ID]['saswp_business_name'] = $local_business_sub_type;
|
251 |
-
$export_data[$schema->ID]['data_group_array'] = $data_group_array;
|
252 |
-
$export_data[$schema->ID]['saswp_local_business_details'] = $local_business_details;
|
253 |
-
}
|
254 |
-
|
255 |
-
$export_data_all['posts'] = $export_data;
|
256 |
-
$export_data_all['sd_data'] = $get_sd_data;
|
257 |
|
258 |
header('Content-type: application/json');
|
259 |
header('Content-disposition: attachment; filename=structuredatabackup.json');
|
260 |
echo json_encode($export_data_all);
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
header('Content-type: application/json');
|
265 |
-
header('Content-disposition: attachment; filename=structuredatabackup.json');
|
266 |
-
echo json_encode(array('message'=> 'Data is not available'));
|
267 |
-
|
268 |
-
}
|
269 |
-
wp_die();
|
270 |
}
|
271 |
/**
|
272 |
* We are here fetching all schema and its settings from schema plugin
|
@@ -1783,337 +1783,61 @@ if ( ! defined('ABSPATH') ) exit;
|
|
1783 |
*/
|
1784 |
function saswp_enqueue_amp_script(){
|
1785 |
|
1786 |
-
|
|
|
1787 |
$saswp_review_details = esc_sql ( get_post_meta(get_the_ID(), 'saswp_review_details', true));
|
1788 |
|
1789 |
-
$
|
1790 |
|
1791 |
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
1792 |
|
1793 |
-
$
|
1794 |
|
1795 |
}
|
1796 |
|
1797 |
-
if($sd_data['saswp-review-module']== 1 && $
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
width:auto;
|
1805 |
-
flex-wrap: wrap;
|
1806 |
-
margin-bottom: 20px;
|
1807 |
-
}
|
1808 |
-
.saswp-pc-wrap .saswp-lst span{
|
1809 |
-
font-size: 18px;
|
1810 |
-
font-weight: 500;
|
1811 |
-
margin-bottom: 10px;
|
1812 |
-
display: inline-block;
|
1813 |
-
line-height: 1.3;
|
1814 |
-
}
|
1815 |
-
.saswp-pc-wrap .saswp-lst{
|
1816 |
-
flex:1 0 42%;
|
1817 |
-
}
|
1818 |
-
.saswp-pc-wrap .saswp-lst ul{
|
1819 |
-
margin:0;
|
1820 |
-
}
|
1821 |
-
.saswp-pc-wrap .saswp-lst p{
|
1822 |
-
list-style-type: none;
|
1823 |
-
font-size: 15px;
|
1824 |
-
font-weight: lighter;
|
1825 |
-
line-height: 1.2;
|
1826 |
-
margin-bottom: 10px;
|
1827 |
-
position: relative;
|
1828 |
-
padding-left: 20px;
|
1829 |
-
color:#eee;
|
1830 |
-
}
|
1831 |
-
.saswp-pc-wrap .saswp-lst p:before{
|
1832 |
-
content: '';
|
1833 |
-
position: absolute;
|
1834 |
-
width: 8px;
|
1835 |
-
height: 8px;
|
1836 |
-
background-color: #ccc;
|
1837 |
-
left: 0px;
|
1838 |
-
top: 6px;
|
1839 |
-
border-radius: 10px;
|
1840 |
-
}
|
1841 |
-
.sgl .saswp-rvw {
|
1842 |
-
width: 100%;
|
1843 |
-
margin-bottom: 34px;
|
1844 |
-
font-size: 13px;
|
1845 |
-
border-bottom: 1px solid #ededed;
|
1846 |
-
}
|
1847 |
-
.saswp-rvw-hd span {
|
1848 |
-
background-color: #222;
|
1849 |
-
color: #fff;
|
1850 |
-
display: inline-block;
|
1851 |
-
font-size: 15px;
|
1852 |
-
line-height: 1.4;
|
1853 |
-
padding: 8px 12px 6px;
|
1854 |
-
margin: 26px 0px;
|
1855 |
-
}
|
1856 |
-
.saswp-rvw tbody{
|
1857 |
-
width:100%;
|
1858 |
-
display:inline-block;
|
1859 |
-
}
|
1860 |
-
.saswp-rvw td {
|
1861 |
-
padding: 7px 14px;
|
1862 |
-
}
|
1863 |
-
.sgl table td, .saswp-rvw td {
|
1864 |
-
border: 1px solid #ededed;
|
1865 |
-
}
|
1866 |
-
.saswp-rvw-sm span{
|
1867 |
-
background-color: #222;
|
1868 |
-
color: #fff;
|
1869 |
-
display: inline-block;
|
1870 |
-
padding: 8px 12px 6px;
|
1871 |
-
margin-bottom: 13px;
|
1872 |
-
position: relative;
|
1873 |
-
font-size: 15px;
|
1874 |
-
line-height: 1.2;
|
1875 |
-
}
|
1876 |
-
.saswp-rvw-fs {
|
1877 |
-
line-height: 1.5;
|
1878 |
-
font-size: 48px;
|
1879 |
-
font-weight: 600;
|
1880 |
-
margin-bottom: 5px;
|
1881 |
-
}
|
1882 |
-
.saswp-rvw-ov .ovs {
|
1883 |
-
font-size: 11px;
|
1884 |
-
font-weight:600;
|
1885 |
-
}
|
1886 |
-
.sgl .saswp-rvw tr td{
|
1887 |
-
background:#fff;
|
1888 |
-
width:100%;
|
1889 |
-
}
|
1890 |
-
.sgl .saswp-rvw tr:hover td {
|
1891 |
-
background-color: #fcfcfc;
|
1892 |
-
}
|
1893 |
-
.saswp-rvw .saswp-rvw-sm {
|
1894 |
-
padding: 21px 14px;
|
1895 |
-
}
|
1896 |
-
.str-ic{
|
1897 |
-
font-size: 18px;
|
1898 |
-
line-height: 1.2;
|
1899 |
-
}
|
1900 |
-
.saswp-rvw-str{
|
1901 |
-
display: inline-flex;
|
1902 |
-
width: 100%;
|
1903 |
-
}
|
1904 |
-
.saswp-rvw-ov{
|
1905 |
-
text-align:center;
|
1906 |
-
}
|
1907 |
.saswp-rvw-str .half-str{
|
1908 |
-
|
1909 |
-
width: 20px;
|
1910 |
-
height: 16px;
|
1911 |
-
background-repeat: no-repeat;
|
1912 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/half_star.png'); ?>);
|
1913 |
}
|
1914 |
.saswp-rvw-str .str-ic{
|
1915 |
-
|
1916 |
-
width: 20px;
|
1917 |
-
height: 16px;
|
1918 |
-
background-repeat: no-repeat;
|
1919 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/full_star.png'); ?>);
|
1920 |
}
|
1921 |
.saswp-rvw-str .df-clr{
|
1922 |
-
|
1923 |
-
width: 20px;
|
1924 |
-
height: 16px;
|
1925 |
-
background-repeat: no-repeat;
|
1926 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/blank_star.png'); ?>);
|
1927 |
}
|
1928 |
-
|
1929 |
-
|
1930 |
-
display:block;
|
1931 |
-
}
|
1932 |
-
.saswp-pc-wrap .saswp-lst{
|
1933 |
-
margin-bottom:20px;
|
1934 |
-
}
|
1935 |
-
}
|
1936 |
-
|
1937 |
-
<?php
|
1938 |
}
|
1939 |
|
1940 |
if((has_shortcode( @get_the_content(), 'saswp-reviews')) || is_active_widget( false, false, 'saswp_google_review_widget',true ) || (isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1) ){
|
1941 |
?>
|
1942 |
|
1943 |
-
|
1944 |
-
.saswp-g-review-header{
|
1945 |
-
margin-top: 50px;
|
1946 |
-
}
|
1947 |
-
.saswp-g-review-body{
|
1948 |
-
display:inline-grid;
|
1949 |
-
grid-template-columns: 1fr 300px;
|
1950 |
-
grid-gap:30px;
|
1951 |
-
margin-top:30px;
|
1952 |
-
width:100%;
|
1953 |
-
}
|
1954 |
-
.saswp-review-list{}
|
1955 |
-
.saswp-channel-list{
|
1956 |
-
margin-right: 15px;
|
1957 |
-
}
|
1958 |
-
.saswp-input-fields{
|
1959 |
-
display: inline-flex;
|
1960 |
-
align-items: center;
|
1961 |
-
margin-bottom: 8px;
|
1962 |
-
width: 100%;
|
1963 |
-
}
|
1964 |
-
.saswp-input-fields label{
|
1965 |
-
width: 130px;
|
1966 |
-
}
|
1967 |
-
.saswp-panel h3{
|
1968 |
-
font-size: 20px;
|
1969 |
-
line-height: 1.4;
|
1970 |
-
color: #222;
|
1971 |
-
text-align: center;
|
1972 |
-
margin: 10px 0px 20px 0px;
|
1973 |
-
}
|
1974 |
-
.saswp-input-fields a.button-primary{
|
1975 |
-
margin-top:10px;
|
1976 |
-
}
|
1977 |
-
.saswp-glg-review-body{
|
1978 |
-
display: grid;
|
1979 |
-
grid-template-columns: 100px 1fr;
|
1980 |
-
grid-gap: 20px;
|
1981 |
-
background: #fff;
|
1982 |
-
padding: 20px;
|
1983 |
-
box-shadow: 0px 0px 20px 1px #d2cccc;
|
1984 |
-
margin-bottom: 30px;
|
1985 |
-
}
|
1986 |
-
.saswp-g-plus{
|
1987 |
-
float: right;
|
1988 |
-
font-size: 15px;
|
1989 |
-
width: 20px;
|
1990 |
-
height: 20px;
|
1991 |
-
position: absolute;
|
1992 |
-
right: 0;
|
1993 |
-
top:4px;
|
1994 |
-
}
|
1995 |
-
.saswp-g-plus amp-img{
|
1996 |
-
width:100%;
|
1997 |
-
}
|
1998 |
-
.saswp-rtng{
|
1999 |
-
padding-left: 5px;
|
2000 |
-
font-size: 14px;
|
2001 |
-
}
|
2002 |
-
.saswp-pt-dt {
|
2003 |
-
font-size: 12px;
|
2004 |
-
color: #999;
|
2005 |
-
font-weight: 600;
|
2006 |
-
margin-top: 5px;
|
2007 |
-
display: inline-block;
|
2008 |
-
}
|
2009 |
-
.saswp-athr{
|
2010 |
-
font-size: 15px;
|
2011 |
-
line-height: 1.4;
|
2012 |
-
color: #000;
|
2013 |
-
font-weight: bold;
|
2014 |
-
display: inline-block;
|
2015 |
-
vertical-align: middle;
|
2016 |
-
}
|
2017 |
-
.saswp-str-rtng .saswp-rvw-str{
|
2018 |
-
display: inline-block;
|
2019 |
-
vertical-align: middle;
|
2020 |
-
padding-left: 10px;
|
2021 |
-
width: auto;
|
2022 |
-
}
|
2023 |
-
.amp-sidebar .saswp-str-rtng .saswp-rvw-str{padding:5px 0px 0px 0px;}
|
2024 |
-
.saswp-rv-cnt p{
|
2025 |
-
font-size: 16px;
|
2026 |
-
line-height: 1.6;
|
2027 |
-
color: #000;
|
2028 |
-
margin: 10px 0px 0px 0px;
|
2029 |
-
}
|
2030 |
-
.amp-sidebar .saswp-rv-img amp-img{max-width:50px;}
|
2031 |
-
.amp-sidebar .saswp-glg-review-body {
|
2032 |
-
display: inline-block;
|
2033 |
-
width:100%;
|
2034 |
-
}
|
2035 |
-
.amp-sidebar .saswp-rv-img{
|
2036 |
-
width:60px;
|
2037 |
-
float:left;
|
2038 |
-
}
|
2039 |
-
.amp-sidebar .saswp-rtng{display:block;}
|
2040 |
-
|
2041 |
-
.saswp-rvw-str .half-str{
|
2042 |
-
display:inline-block;
|
2043 |
-
width: 20px;
|
2044 |
-
height: 16px;
|
2045 |
-
background-repeat: no-repeat;
|
2046 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/half_star.png'); ?>);
|
2047 |
}
|
2048 |
-
.saswp-rvw-str .str-ic{
|
2049 |
-
display:inline-block;
|
2050 |
-
width: 20px;
|
2051 |
-
height: 16px;
|
2052 |
-
background-repeat: no-repeat;
|
2053 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/full_star.png'); ?>);
|
2054 |
}
|
2055 |
-
.saswp-rvw-str .df-clr{
|
2056 |
-
display:inline-block;
|
2057 |
-
width: 20px;
|
2058 |
-
height: 16px;
|
2059 |
-
background-repeat: no-repeat;
|
2060 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/blank_star.png'); ?>);
|
2061 |
}
|
2062 |
-
|
2063 |
-
@media(max-width:767px){
|
2064 |
-
.saswp-glg-review-body {
|
2065 |
-
grid-template-columns: 50px 1fr;
|
2066 |
-
}
|
2067 |
-
.saswp-rv-img img{
|
2068 |
-
max-width:50px;
|
2069 |
-
}
|
2070 |
-
}
|
2071 |
-
.widget .saswp-glg-review-body{
|
2072 |
-
display: inline-block;
|
2073 |
-
width: 100%;
|
2074 |
-
}
|
2075 |
-
.widget .saswp-rv-img{
|
2076 |
-
margin-bottom:12px;
|
2077 |
-
}
|
2078 |
-
.widget .saswp-rv-img img {
|
2079 |
-
max-width: 50px;
|
2080 |
-
}
|
2081 |
-
|
2082 |
-
.saswp-rv-txt{
|
2083 |
-
position: static;
|
2084 |
-
height: 80px;
|
2085 |
-
overflow-y: auto;
|
2086 |
-
font-size: 14px;
|
2087 |
-
line-height:1.6;
|
2088 |
-
text-align: left;
|
2089 |
-
padding: 0 2px 0 0;
|
2090 |
-
margin: 10px 0 0;
|
2091 |
-
}
|
2092 |
-
.saswp-rv-txt p{
|
2093 |
-
margin:0;
|
2094 |
-
}
|
2095 |
-
.saswp-rv-cnt::-webkit-scrollbar {
|
2096 |
-
width: 4px ;
|
2097 |
-
display:inline-block;
|
2098 |
-
}
|
2099 |
-
.saswp-rv-cnt::-webkit-scrollbar-thumb {
|
2100 |
-
-webkit-border-radius: 10px ;
|
2101 |
-
border-radius: 10px ;
|
2102 |
-
background: #ccc ;
|
2103 |
-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5) ;
|
2104 |
-
}
|
2105 |
-
.saswp-rv-cnt::-webkit-scrollbar-track {
|
2106 |
-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
2107 |
-
-webkit-border-radius: 4px;
|
2108 |
-
}
|
2109 |
-
.saswp-r5-rng{
|
2110 |
-
position: relative;
|
2111 |
-
}
|
2112 |
-
|
2113 |
<?php
|
|
|
|
|
|
|
|
|
2114 |
}
|
2115 |
-
|
2116 |
-
|
2117 |
}
|
2118 |
/**
|
2119 |
* Function to get author name
|
@@ -2498,12 +2222,12 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2498 |
$author_desc = get_the_author_meta( 'user_description' );
|
2499 |
|
2500 |
if(!$author_name && is_object($post)){
|
2501 |
-
|
2502 |
-
$
|
2503 |
-
$author_name = get_the_author_meta( 'display_name' , $author_id );
|
2504 |
-
|
2505 |
}
|
2506 |
|
|
|
|
|
2507 |
$author_image = array();
|
2508 |
|
2509 |
if(function_exists('get_avatar_data')){
|
@@ -2512,7 +2236,8 @@ if ( ! defined('ABSPATH') ) exit;
|
|
2512 |
|
2513 |
$author_details['@type'] = 'Person';
|
2514 |
$author_details['name'] = esc_attr($author_name);
|
2515 |
-
$author_details['description'] =
|
|
|
2516 |
|
2517 |
if(isset($author_image['url']) && isset($author_image['height']) && isset($author_image['width'])){
|
2518 |
|
@@ -2977,4 +2702,116 @@ function saswp_remove_anonymous_object_filter_or_action( $tag, $class, $method,
|
|
2977 |
}
|
2978 |
}
|
2979 |
}
|
2980 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* List of hooks used in this context
|
16 |
*/
|
17 |
+
add_action( 'admin_init', 'saswp_import_all_settings_and_schema',9);
|
18 |
add_action( 'wp_ajax_saswp_export_all_settings_and_schema', 'saswp_export_all_settings_and_schema');
|
19 |
+
add_action( 'plugins_loaded', 'saswp_defaultSettings' );
|
20 |
add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
|
21 |
+
add_action( 'amp_post_template_css','saswp_enqueue_amp_script');
|
22 |
|
23 |
|
24 |
//global variable to store List of labels starts here
|
69 |
|
70 |
global $wpdb;
|
71 |
|
72 |
+
$result = null;
|
73 |
$errorDesc = array();
|
74 |
$all_schema_post = array();
|
75 |
|
77 |
|
78 |
if($url){
|
79 |
|
80 |
+
$json_data = @file_get_contents($url);
|
81 |
|
82 |
if($json_data){
|
83 |
|
84 |
+
$json_array = json_decode($json_data, true);
|
|
|
85 |
|
86 |
+
$posts_data = $json_array['posts'];
|
87 |
+
|
88 |
+
if($posts_data){
|
89 |
+
|
90 |
+
foreach($posts_data as $data){
|
91 |
+
|
92 |
+
$all_schema_post = $data;
|
93 |
|
94 |
+
$schema_post = array();
|
95 |
|
96 |
if($all_schema_post && is_array($all_schema_post)){
|
97 |
// begin transaction
|
98 |
$wpdb->query('START TRANSACTION');
|
99 |
|
100 |
foreach($all_schema_post as $schema_post){
|
101 |
+
|
102 |
+
$post_meta = $schema_post['post_meta'];
|
103 |
|
104 |
+
if(saswp_post_exists($schema_post['post']['ID'])){
|
105 |
+
|
106 |
+
$post_id = wp_update_post($schema_post['post']);
|
107 |
+
|
108 |
+
}else{
|
109 |
+
|
110 |
+
unset($schema_post['post']['ID']);
|
111 |
+
|
112 |
+
$post_id = wp_insert_post($schema_post['post']);
|
113 |
+
|
114 |
+
if($post_meta){
|
115 |
+
|
116 |
+
foreach($post_meta as $key => $val){
|
117 |
+
|
118 |
+
$explod_key = explode("_",$key);
|
119 |
+
|
120 |
+
$exp_count = count($explod_key);
|
121 |
+
|
122 |
+
$explod_key[($exp_count-1)] = $post_id;
|
123 |
+
|
124 |
+
$explod_key = implode("_", $explod_key);
|
125 |
+
|
126 |
+
$post_meta[$explod_key] = $val;
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
}
|
133 |
+
|
134 |
+
foreach($post_meta as $key => $meta){
|
135 |
+
|
136 |
+
$meta = wp_unslash($meta);
|
137 |
|
138 |
+
if(is_array($meta)){
|
139 |
|
140 |
+
$meta = wp_unslash($meta);
|
141 |
+
update_post_meta($post_id, $key, $meta);
|
142 |
+
|
143 |
+
}else{
|
144 |
+
update_post_meta($post_id, $key, sanitize_text_field($meta));
|
145 |
+
}
|
146 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
+
|
149 |
+
if(is_wp_error($post_id)){
|
|
|
|
|
|
|
|
|
150 |
$errorDesc[] = $result->get_error_message();
|
151 |
}
|
152 |
}
|
153 |
|
154 |
+
}
|
155 |
+
|
156 |
+
}
|
157 |
+
|
158 |
+
}
|
159 |
+
//Saving settings data starts here
|
160 |
if(array_key_exists('sd_data', $json_array)){
|
161 |
+
|
162 |
+
$saswp_sd_data = $json_array['sd_data'];
|
163 |
+
|
164 |
+
foreach($saswp_sd_data as $key => $val){
|
165 |
+
|
166 |
+
if(is_array($val)){
|
167 |
+
|
168 |
+
$saswp_sd_data[$key] = $meta = array_map( 'sanitize_text_field' ,$val);
|
169 |
+
|
170 |
+
}else{
|
171 |
+
|
172 |
+
$saswp_sd_data[$key] = sanitize_text_field($val);
|
173 |
|
174 |
+
}
|
175 |
+
|
176 |
+
}
|
177 |
+
|
178 |
+
update_option('sd_data', $saswp_sd_data);
|
179 |
}
|
180 |
+
//Saving settings data ends here
|
181 |
update_option('saswp-file-upload_url','');
|
182 |
|
183 |
}
|
200 |
*/
|
201 |
function saswp_export_all_settings_and_schema(){
|
202 |
|
203 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
204 |
+
return;
|
205 |
+
}
|
206 |
+
if ( ! isset( $_GET['_wpnonce'] ) ){
|
207 |
+
return;
|
208 |
+
}
|
209 |
+
|
210 |
+
if ( !wp_verify_nonce( $_GET['_wpnonce'], '_wpnonce' ) ){
|
211 |
+
return;
|
212 |
+
}
|
|
|
|
|
|
|
|
|
|
|
213 |
|
214 |
+
$post_type = array('saswp_reviews', 'saswp', 'saswp-collections');
|
215 |
+
$export_data_all = array();
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
+
foreach($post_type as $type){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
+
$export_data = array();
|
220 |
+
|
221 |
+
$all_schema_post = get_posts(
|
222 |
+
|
223 |
+
array(
|
224 |
+
'post_type' => $type,
|
225 |
+
'posts_per_page' => -1,
|
226 |
+
'post_status' => 'any',
|
227 |
+
)
|
228 |
+
|
229 |
+
);
|
230 |
+
|
231 |
+
if($all_schema_post){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
|
233 |
+
foreach($all_schema_post as $schema){
|
234 |
+
|
235 |
+
$export_data[$schema->ID]['post'] = (array)$schema;
|
236 |
+
$post_meta = get_post_meta($schema->ID, $key='', true );
|
237 |
+
|
238 |
+
if($post_meta){
|
239 |
+
|
240 |
+
foreach ($post_meta as $key => $meta){
|
241 |
+
|
242 |
+
if(@unserialize($meta[0]) !== false){
|
243 |
+
$post_meta[$key] = @unserialize($meta[0]);
|
244 |
+
}else{
|
245 |
+
$post_meta[$key] = $meta[0];
|
246 |
+
}
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
}
|
251 |
+
|
252 |
+
$export_data[$schema->ID]['post_meta'] = $post_meta;
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
$export_data_all['posts'][$type] = $export_data;
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
|
261 |
+
}
|
262 |
|
263 |
+
$export_data_all['sd_data'] = get_option('sd_data');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
header('Content-type: application/json');
|
266 |
header('Content-disposition: attachment; filename=structuredatabackup.json');
|
267 |
echo json_encode($export_data_all);
|
268 |
+
|
269 |
+
wp_die();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
/**
|
272 |
* We are here fetching all schema and its settings from schema plugin
|
1783 |
*/
|
1784 |
function saswp_enqueue_amp_script(){
|
1785 |
|
1786 |
+
global $sd_data;
|
1787 |
+
|
1788 |
$saswp_review_details = esc_sql ( get_post_meta(get_the_ID(), 'saswp_review_details', true));
|
1789 |
|
1790 |
+
$saswp_rv_item_enable = 0;
|
1791 |
|
1792 |
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
1793 |
|
1794 |
+
$saswp_rv_item_enable = $saswp_review_details['saswp-review-item-enable'];
|
1795 |
|
1796 |
}
|
1797 |
|
1798 |
+
if($sd_data['saswp-review-module']== 1 && $saswp_rv_item_enable == 1){
|
1799 |
+
|
1800 |
+
$rating_module_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/rating-module.css';
|
1801 |
+
echo @file_get_contents($rating_module_css);
|
1802 |
+
|
1803 |
+
?>
|
1804 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1805 |
.saswp-rvw-str .half-str{
|
1806 |
+
|
|
|
|
|
|
|
1807 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/half_star.png'); ?>);
|
1808 |
}
|
1809 |
.saswp-rvw-str .str-ic{
|
1810 |
+
|
|
|
|
|
|
|
1811 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/full_star.png'); ?>);
|
1812 |
}
|
1813 |
.saswp-rvw-str .df-clr{
|
1814 |
+
|
|
|
|
|
|
|
1815 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/blank_star.png'); ?>);
|
1816 |
}
|
1817 |
+
|
1818 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1819 |
}
|
1820 |
|
1821 |
if((has_shortcode( @get_the_content(), 'saswp-reviews')) || is_active_widget( false, false, 'saswp_google_review_widget',true ) || (isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1) ){
|
1822 |
?>
|
1823 |
|
1824 |
+
.saswp-rvw-str .half-str{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1825 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/half_star.png'); ?>);
|
1826 |
}
|
1827 |
+
.saswp-rvw-str .str-ic{
|
|
|
|
|
|
|
|
|
1828 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/full_star.png'); ?>);
|
1829 |
}
|
1830 |
+
.saswp-rvw-str .df-clr{
|
|
|
|
|
|
|
|
|
1831 |
background-image: url(<?php echo esc_url(SASWP_DIR_URI.'/admin_section/images/blank_star.png'); ?>);
|
1832 |
}
|
1833 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1834 |
<?php
|
1835 |
+
|
1836 |
+
$rating_module_front_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/rating-module-front.css';
|
1837 |
+
echo @file_get_contents($rating_module_front_css);
|
1838 |
+
|
1839 |
}
|
1840 |
+
|
|
|
1841 |
}
|
1842 |
/**
|
1843 |
* Function to get author name
|
2222 |
$author_desc = get_the_author_meta( 'user_description' );
|
2223 |
|
2224 |
if(!$author_name && is_object($post)){
|
2225 |
+
$author_id = get_post_field ( 'post_author', $post->ID);
|
2226 |
+
$author_name = get_the_author_meta( 'display_name' , $author_id );
|
|
|
|
|
2227 |
}
|
2228 |
|
2229 |
+
$author_url = get_the_author_meta( 'url' , $author_id );
|
2230 |
+
|
2231 |
$author_image = array();
|
2232 |
|
2233 |
if(function_exists('get_avatar_data')){
|
2236 |
|
2237 |
$author_details['@type'] = 'Person';
|
2238 |
$author_details['name'] = esc_attr($author_name);
|
2239 |
+
$author_details['description'] = wp_strip_all_tags(strip_shortcodes($author_desc));
|
2240 |
+
$author_details['url'] = esc_url($author_url);
|
2241 |
|
2242 |
if(isset($author_image['url']) && isset($author_image['height']) && isset($author_image['width'])){
|
2243 |
|
2702 |
}
|
2703 |
}
|
2704 |
}
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
function saswp_get_field_note($pname){
|
2708 |
+
|
2709 |
+
$notes = array(
|
2710 |
+
'strong_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/strong-testimonials">Strong Testimonials</a>',
|
2711 |
+
'wordlift' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordlift/">WordLift</a>',
|
2712 |
+
'ampforwp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/accelerated-mobile-pages/">AMP for WP</a>',
|
2713 |
+
'ampbyautomatic' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/amp/">AMP</a>',
|
2714 |
+
'betteramp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">Better AMP</a>',
|
2715 |
+
'wpamp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/wp-amp-accelerated-mobile-pages-for-wordpress-and-woocommerce/16278608">WP AMP</a>',
|
2716 |
+
'kk_star_ratings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">kk Star Rating</a>',
|
2717 |
+
'wp_post_ratings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-postratings/">WP-PostRatings</a>',
|
2718 |
+
'bb_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bbpress/">bbPress</a>',
|
2719 |
+
'woocommerce' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>',
|
2720 |
+
'cooked' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/cooked/">Cooked</a>',
|
2721 |
+
'the_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/the-events-calendar/">The Events Calendar</a>',
|
2722 |
+
'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
|
2723 |
+
'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
|
2724 |
+
'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
|
2725 |
+
'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>',
|
2726 |
+
'the_seo_framework' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/autodescription/">The Seo Framework</a>',
|
2727 |
+
'seo_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-seopress/">SEOPress</a>',
|
2728 |
+
'aiosp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>',
|
2729 |
+
'squirrly_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/squirrly-seo/">Squirrly SEO</a>',
|
2730 |
+
'wp_recipe_maker' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-recipe-maker/">WP Recipe Maker</a>',
|
2731 |
+
'wp_ultimate_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-ultimate-recipe/">WP Ultimate Recipe</a>',
|
2732 |
+
'learn_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/learnpress/">Learn Press</a>',
|
2733 |
+
'learn_dash' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.learndash.com/pricing-and-purchase/">Learn Dash</a>',
|
2734 |
+
'lifter_lms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/lifterlms/">LifterLMS</a>',
|
2735 |
+
'wp_event_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-manager/">WP Event Manager</a>',
|
2736 |
+
'events_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/events-manager/">Events Manager</a>',
|
2737 |
+
'event_calendar_wd' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-calendar-wd/">Event Calendar WD</a>',
|
2738 |
+
'event_organiser' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-organiser/">Event Organiser</a>',
|
2739 |
+
'modern_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/modern-events-calendar-lite/">Modern Events Calendar Lite</a>',
|
2740 |
+
'flex_mls_idx' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/flexmls-idx/">FlexMLS IDX</a>',
|
2741 |
+
'woocommerce_membership' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Membership</a>',
|
2742 |
+
'woocommerce_bookings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Bookings</a>',
|
2743 |
+
'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
|
2744 |
+
'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
|
2745 |
+
'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
|
2746 |
+
'jannah' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
|
2747 |
+
'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
|
2748 |
+
'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
|
2749 |
+
'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
|
2750 |
+
'ht_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/culinier-food-recipe-wordpress-theme/11088564/">HT-Recipes</a>',
|
2751 |
+
'easy_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easy-testimonials">Easy Testimonials</a>',
|
2752 |
+
'bne_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bne-testimonials/">BNE Testimonials</a>',
|
2753 |
+
'testimonial_pro' => esc_html__('Testimonial Pro','schema-and-structured-data-for-wp').' <a target="_blank" href="https://shapedplugin.com/plugin/testimonial-pro/">Testimonial Pro</a>'
|
2754 |
+
|
2755 |
+
);
|
2756 |
+
|
2757 |
+
$active = saswp_compatible_active_list();
|
2758 |
+
|
2759 |
+
if(!isset($active[$pname])){
|
2760 |
+
|
2761 |
+
return $notes[$pname];
|
2762 |
+
|
2763 |
+
}
|
2764 |
+
|
2765 |
+
}
|
2766 |
+
|
2767 |
+
function saswp_get_category_link($term_id){
|
2768 |
+
|
2769 |
+
$url = get_category_link($term_id);
|
2770 |
+
|
2771 |
+
if ((function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint()) || function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
|
2772 |
+
|
2773 |
+
if(function_exists('ampforwp_url_controller')){
|
2774 |
+
|
2775 |
+
$url = ampforwp_url_controller( $url );
|
2776 |
+
|
2777 |
+
}
|
2778 |
+
|
2779 |
+
}
|
2780 |
+
|
2781 |
+
return $url;
|
2782 |
+
|
2783 |
+
}
|
2784 |
+
|
2785 |
+
function saswp_get_current_url(){
|
2786 |
+
|
2787 |
+
$link = "http";
|
2788 |
+
|
2789 |
+
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'){
|
2790 |
+
$link = "https";
|
2791 |
+
}
|
2792 |
+
|
2793 |
+
$link .= "://";
|
2794 |
+
$link .= $_SERVER['HTTP_HOST'];
|
2795 |
+
$link .= $_SERVER['REQUEST_URI'];
|
2796 |
+
|
2797 |
+
return $link;
|
2798 |
+
}
|
2799 |
+
|
2800 |
+
function saswp_has_slash($url){
|
2801 |
+
|
2802 |
+
$response = false;
|
2803 |
+
|
2804 |
+
if(strrev($url)[0]==='/') {
|
2805 |
+
$response = true;
|
2806 |
+
}
|
2807 |
+
|
2808 |
+
return $response;
|
2809 |
+
}
|
2810 |
+
|
2811 |
+
function saswp_remove_slash($url){
|
2812 |
+
|
2813 |
+
$url = rtrim($url, '/\\');
|
2814 |
+
|
2815 |
+
return $url;
|
2816 |
+
|
2817 |
+
}
|
admin_section/css/amp/rating-module-front.css
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*** Review Design CSS ****/
|
2 |
+
.saswp-g-review-header{
|
3 |
+
margin-top: 50px;
|
4 |
+
}
|
5 |
+
.saswp-g-review-body{
|
6 |
+
display:inline-grid;
|
7 |
+
grid-template-columns: 1fr 300px;
|
8 |
+
grid-gap:30px;
|
9 |
+
margin-top:30px;
|
10 |
+
width:100%;
|
11 |
+
}
|
12 |
+
.saswp-review-list{}
|
13 |
+
.saswp-channel-list{
|
14 |
+
margin-right: 15px;
|
15 |
+
}
|
16 |
+
.saswp-input-fields{
|
17 |
+
display: inline-flex;
|
18 |
+
align-items: center;
|
19 |
+
margin-bottom: 8px;
|
20 |
+
width: 100%;
|
21 |
+
}
|
22 |
+
.saswp-input-fields label{
|
23 |
+
width: 130px;
|
24 |
+
}
|
25 |
+
.saswp-panel h3{
|
26 |
+
font-size: 20px;
|
27 |
+
line-height: 1.4;
|
28 |
+
color: #222;
|
29 |
+
text-align: center;
|
30 |
+
margin: 10px 0px 20px 0px;
|
31 |
+
}
|
32 |
+
.saswp-input-fields a.button-primary{
|
33 |
+
margin-top:10px;
|
34 |
+
}
|
35 |
+
.saswp-glg-review-body{
|
36 |
+
display: grid;
|
37 |
+
grid-template-columns: 100px 1fr;
|
38 |
+
grid-gap: 20px;
|
39 |
+
background: #fff;
|
40 |
+
padding: 20px;
|
41 |
+
box-shadow: 0px 0px 20px 1px #d2cccc;
|
42 |
+
margin-bottom: 30px;
|
43 |
+
}
|
44 |
+
.saswp-g-plus{
|
45 |
+
float: right;
|
46 |
+
font-size: 15px;
|
47 |
+
width: 20px;
|
48 |
+
height: 20px;
|
49 |
+
position: absolute;
|
50 |
+
right: 0;
|
51 |
+
top:4px;
|
52 |
+
}
|
53 |
+
.saswp-g-plus amp-img{
|
54 |
+
width:100%;
|
55 |
+
}
|
56 |
+
.saswp-rtng{
|
57 |
+
padding-left: 5px;
|
58 |
+
font-size: 14px;
|
59 |
+
}
|
60 |
+
.saswp-pt-dt {
|
61 |
+
font-size: 12px;
|
62 |
+
color: #999;
|
63 |
+
font-weight: 600;
|
64 |
+
margin-top: 5px;
|
65 |
+
display: inline-block;
|
66 |
+
}
|
67 |
+
.saswp-athr{
|
68 |
+
font-size: 15px;
|
69 |
+
line-height: 1.4;
|
70 |
+
color: #000;
|
71 |
+
font-weight: bold;
|
72 |
+
display: inline-block;
|
73 |
+
vertical-align: middle;
|
74 |
+
}
|
75 |
+
.saswp-str-rtng .saswp-rvw-str{
|
76 |
+
display: inline-block;
|
77 |
+
vertical-align: middle;
|
78 |
+
padding-left: 10px;
|
79 |
+
width: auto;
|
80 |
+
}
|
81 |
+
.amp-sidebar .saswp-str-rtng .saswp-rvw-str{padding:5px 0px 0px 0px;}
|
82 |
+
.saswp-rv-cnt p{
|
83 |
+
font-size: 16px;
|
84 |
+
line-height: 1.6;
|
85 |
+
color: #000;
|
86 |
+
margin: 10px 0px 0px 0px;
|
87 |
+
}
|
88 |
+
.amp-sidebar .saswp-rv-img amp-img{max-width:50px;}
|
89 |
+
.amp-sidebar .saswp-glg-review-body {
|
90 |
+
display: inline-block;
|
91 |
+
width:100%;
|
92 |
+
}
|
93 |
+
.amp-sidebar .saswp-rv-img{
|
94 |
+
width:60px;
|
95 |
+
float:left;
|
96 |
+
}
|
97 |
+
.amp-sidebar .saswp-rtng{display:block;}
|
98 |
+
|
99 |
+
.saswp-rvw-str .half-str{
|
100 |
+
display:inline-block;
|
101 |
+
width: 20px;
|
102 |
+
height: 16px;
|
103 |
+
background-repeat: no-repeat;
|
104 |
+
}
|
105 |
+
.saswp-rvw-str .str-ic{
|
106 |
+
display:inline-block;
|
107 |
+
width: 20px;
|
108 |
+
height: 16px;
|
109 |
+
background-repeat: no-repeat;
|
110 |
+
}
|
111 |
+
.saswp-rvw-str .df-clr{
|
112 |
+
display:inline-block;
|
113 |
+
width: 20px;
|
114 |
+
height: 16px;
|
115 |
+
background-repeat: no-repeat;
|
116 |
+
}
|
117 |
+
|
118 |
+
@media(max-width:767px){
|
119 |
+
.saswp-glg-review-body {
|
120 |
+
grid-template-columns: 50px 1fr;
|
121 |
+
}
|
122 |
+
.saswp-rv-img img{
|
123 |
+
max-width:50px;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
.widget .saswp-glg-review-body{
|
127 |
+
display: inline-block;
|
128 |
+
width: 100%;
|
129 |
+
}
|
130 |
+
.widget .saswp-rv-img{
|
131 |
+
margin-bottom:12px;
|
132 |
+
}
|
133 |
+
.widget .saswp-rv-img img {
|
134 |
+
max-width: 50px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.saswp-rv-txt{
|
138 |
+
position: static;
|
139 |
+
height: 80px;
|
140 |
+
overflow-y: auto;
|
141 |
+
font-size: 14px;
|
142 |
+
line-height:1.6;
|
143 |
+
text-align: left;
|
144 |
+
padding: 0 2px 0 0;
|
145 |
+
margin: 10px 0 0;
|
146 |
+
}
|
147 |
+
.saswp-rv-txt p{
|
148 |
+
margin:0;
|
149 |
+
}
|
150 |
+
.saswp-rv-cnt::-webkit-scrollbar {
|
151 |
+
width: 4px ;
|
152 |
+
display:inline-block;
|
153 |
+
}
|
154 |
+
.saswp-rv-cnt::-webkit-scrollbar-thumb {
|
155 |
+
-webkit-border-radius: 10px ;
|
156 |
+
border-radius: 10px ;
|
157 |
+
background: #ccc ;
|
158 |
+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5) ;
|
159 |
+
}
|
160 |
+
.saswp-rv-cnt::-webkit-scrollbar-track {
|
161 |
+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
162 |
+
-webkit-border-radius: 4px;
|
163 |
+
}
|
164 |
+
.saswp-r5-rng{
|
165 |
+
position: relative;
|
166 |
+
}
|
admin_section/css/amp/rating-module.css
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.saswp-pc-wrap{
|
2 |
+
background-color: #004f74;
|
3 |
+
padding: 15px;
|
4 |
+
color: #fff;
|
5 |
+
display: flex;
|
6 |
+
width:auto;
|
7 |
+
flex-wrap: wrap;
|
8 |
+
margin-bottom: 20px;
|
9 |
+
}
|
10 |
+
.saswp-pc-wrap .saswp-lst span{
|
11 |
+
font-size: 18px;
|
12 |
+
font-weight: 500;
|
13 |
+
margin-bottom: 10px;
|
14 |
+
display: inline-block;
|
15 |
+
line-height: 1.3;
|
16 |
+
}
|
17 |
+
.saswp-pc-wrap .saswp-lst{
|
18 |
+
flex:1 0 42%;
|
19 |
+
}
|
20 |
+
.saswp-pc-wrap .saswp-lst ul{
|
21 |
+
margin:0;
|
22 |
+
}
|
23 |
+
.saswp-pc-wrap .saswp-lst p{
|
24 |
+
list-style-type: none;
|
25 |
+
font-size: 15px;
|
26 |
+
font-weight: lighter;
|
27 |
+
line-height: 1.2;
|
28 |
+
margin-bottom: 10px;
|
29 |
+
position: relative;
|
30 |
+
padding-left: 20px;
|
31 |
+
color:#eee;
|
32 |
+
}
|
33 |
+
.saswp-pc-wrap .saswp-lst p:before{
|
34 |
+
content: '';
|
35 |
+
position: absolute;
|
36 |
+
width: 8px;
|
37 |
+
height: 8px;
|
38 |
+
background-color: #ccc;
|
39 |
+
left: 0px;
|
40 |
+
top: 6px;
|
41 |
+
border-radius: 10px;
|
42 |
+
}
|
43 |
+
.sgl .saswp-rvw {
|
44 |
+
width: 100%;
|
45 |
+
margin-bottom: 34px;
|
46 |
+
font-size: 13px;
|
47 |
+
border-bottom: 1px solid #ededed;
|
48 |
+
}
|
49 |
+
.saswp-rvw-hd span {
|
50 |
+
background-color: #222;
|
51 |
+
color: #fff;
|
52 |
+
display: inline-block;
|
53 |
+
font-size: 15px;
|
54 |
+
line-height: 1.4;
|
55 |
+
padding: 8px 12px 6px;
|
56 |
+
margin: 26px 0px;
|
57 |
+
}
|
58 |
+
.saswp-rvw tbody{
|
59 |
+
width:100%;
|
60 |
+
display:inline-block;
|
61 |
+
}
|
62 |
+
.saswp-rvw td {
|
63 |
+
padding: 7px 14px;
|
64 |
+
}
|
65 |
+
.sgl table td, .saswp-rvw td {
|
66 |
+
border: 1px solid #ededed;
|
67 |
+
}
|
68 |
+
.saswp-rvw-sm span{
|
69 |
+
background-color: #222;
|
70 |
+
color: #fff;
|
71 |
+
display: inline-block;
|
72 |
+
padding: 8px 12px 6px;
|
73 |
+
margin-bottom: 13px;
|
74 |
+
position: relative;
|
75 |
+
font-size: 15px;
|
76 |
+
line-height: 1.2;
|
77 |
+
}
|
78 |
+
.saswp-rvw-fs {
|
79 |
+
line-height: 1.5;
|
80 |
+
font-size: 48px;
|
81 |
+
font-weight: 600;
|
82 |
+
margin-bottom: 5px;
|
83 |
+
}
|
84 |
+
.saswp-rvw-ov .ovs {
|
85 |
+
font-size: 11px;
|
86 |
+
font-weight:600;
|
87 |
+
}
|
88 |
+
.sgl .saswp-rvw tr td{
|
89 |
+
background:#fff;
|
90 |
+
width:100%;
|
91 |
+
}
|
92 |
+
.sgl .saswp-rvw tr:hover td {
|
93 |
+
background-color: #fcfcfc;
|
94 |
+
}
|
95 |
+
.saswp-rvw .saswp-rvw-sm {
|
96 |
+
padding: 21px 14px;
|
97 |
+
}
|
98 |
+
.str-ic{
|
99 |
+
font-size: 18px;
|
100 |
+
line-height: 1.2;
|
101 |
+
}
|
102 |
+
.saswp-rvw-str{
|
103 |
+
display: inline-flex;
|
104 |
+
width: 100%;
|
105 |
+
}
|
106 |
+
.saswp-rvw-ov{
|
107 |
+
text-align:center;
|
108 |
+
}
|
109 |
+
|
110 |
+
.saswp-rvw-str .half-str{
|
111 |
+
display:inline-block;
|
112 |
+
width: 20px;
|
113 |
+
height: 16px;
|
114 |
+
background-repeat: no-repeat;
|
115 |
+
|
116 |
+
}
|
117 |
+
.saswp-rvw-str .str-ic{
|
118 |
+
display:inline-block;
|
119 |
+
width: 20px;
|
120 |
+
height: 16px;
|
121 |
+
background-repeat: no-repeat;
|
122 |
+
|
123 |
+
}
|
124 |
+
.saswp-rvw-str .df-clr{
|
125 |
+
display:inline-block;
|
126 |
+
width: 20px;
|
127 |
+
height: 16px;
|
128 |
+
background-repeat: no-repeat;
|
129 |
+
}
|
130 |
+
@media(max-width:500px){
|
131 |
+
.saswp-pc-wrap{
|
132 |
+
display:block;
|
133 |
+
}
|
134 |
+
.saswp-pc-wrap .saswp-lst{
|
135 |
+
margin-bottom:20px;
|
136 |
+
}
|
137 |
+
}
|
admin_section/fields-generator.php
CHANGED
@@ -1,605 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Field Generator class
|
4 |
-
*
|
5 |
-
* @author Magazine3
|
6 |
-
* @category Admin
|
7 |
-
* @path google_review/google_review
|
8 |
-
* @Version 1.8
|
9 |
-
*/
|
10 |
-
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
-
|
14 |
-
/*
|
15 |
-
Metabox to show ads type such as custom and adsense
|
16 |
-
*/
|
17 |
-
class saswp_fields_generator {
|
18 |
-
|
19 |
-
public function saswp_tooltip_message($meta_field_id){
|
20 |
-
|
21 |
-
$tooltip_message = '';
|
22 |
-
|
23 |
-
switch ($meta_field_id) {
|
24 |
-
|
25 |
-
case 'saswp_kb_type':
|
26 |
-
//$tooltip_message = 'Test Message';
|
27 |
-
break;
|
28 |
-
|
29 |
-
default:
|
30 |
-
break;
|
31 |
-
}
|
32 |
-
|
33 |
-
return $tooltip_message;
|
34 |
-
}
|
35 |
-
/**
|
36 |
-
* Function to generate html element from the given elements array
|
37 |
-
* @param type $meta_fields
|
38 |
-
* @param type $settings
|
39 |
-
* @param type $field_type
|
40 |
-
* @since version 1.0
|
41 |
-
*/
|
42 |
-
public function saswp_field_generator( $meta_fields, $settings, $field_type = null ) {
|
43 |
-
|
44 |
-
$output = '';
|
45 |
-
$tooltip_message = '';
|
46 |
-
|
47 |
-
|
48 |
-
foreach ( $meta_fields as $meta_field ) {
|
49 |
-
|
50 |
-
$tooltip_message = $this->saswp_tooltip_message($meta_field['id']);
|
51 |
-
|
52 |
-
$class = "";
|
53 |
-
$note = "";
|
54 |
-
$proversion = false;
|
55 |
-
$hidden = array();
|
56 |
-
$attribute = array();
|
57 |
-
|
58 |
-
$on = 'Reviews';
|
59 |
-
$license_key = '';
|
60 |
-
$license_status = 'inactive';
|
61 |
-
$license_status_msg = '';
|
62 |
-
$rv_limits = '';
|
63 |
-
|
64 |
-
if(isset($settings[strtolower($on).'_addon_license_key'])){
|
65 |
-
$license_key = $settings[strtolower($on).'_addon_license_key'];
|
66 |
-
}
|
67 |
-
|
68 |
-
if(isset($settings[strtolower($on).'_addon_license_key_status'])){
|
69 |
-
$license_status = $settings[strtolower($on).'_addon_license_key_status'];
|
70 |
-
}
|
71 |
-
|
72 |
-
if(isset($settings[strtolower($on).'_addon_license_key_message'])){
|
73 |
-
$license_status_msg = $settings[strtolower($on).'_addon_license_key_message'];
|
74 |
-
}
|
75 |
-
|
76 |
-
if($license_status =='active'){
|
77 |
-
$rv_limits = get_option(strtolower($on).'_addon_reviews_limits');
|
78 |
-
}
|
79 |
-
|
80 |
-
if(array_key_exists('class', $meta_field)){
|
81 |
-
|
82 |
-
$class = $meta_field['class'];
|
83 |
-
|
84 |
-
}
|
85 |
-
if(array_key_exists('proversion', $meta_field)){
|
86 |
-
|
87 |
-
$proversion = $meta_field['proversion'];
|
88 |
-
|
89 |
-
}
|
90 |
-
if(array_key_exists('note', $meta_field)){
|
91 |
-
|
92 |
-
$note = $meta_field['note'];
|
93 |
-
|
94 |
-
}
|
95 |
-
if(array_key_exists('hidden', $meta_field)){
|
96 |
-
|
97 |
-
$hidden = $meta_field['hidden'];
|
98 |
-
|
99 |
-
}
|
100 |
-
if(array_key_exists('attributes', $meta_field)){
|
101 |
-
|
102 |
-
$attribute = $meta_field['attributes'];
|
103 |
-
|
104 |
-
}
|
105 |
-
if($tooltip_message){
|
106 |
-
|
107 |
-
$label = '<label class="saswp-tooltip" for="' . esc_attr($meta_field['id']) . '">' . esc_html__( $meta_field['label'], 'schema-and-structured-data-for-wp' ).' <span class="saswp-tooltiptext">'.esc_html__($tooltip_message, 'schema-and-structured-data-for-wp').'</span></label>';
|
108 |
-
|
109 |
-
}else{
|
110 |
-
|
111 |
-
$label = '<label class="saswp-tooltip" for="' . esc_attr($meta_field['id']) . '">' . esc_html__( $meta_field['label'], 'schema-and-structured-data-for-wp' ).' <span class="saswp-tooltiptext"></span></label>';
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
$attribute_str ='';
|
116 |
-
|
117 |
-
if(!empty($attribute)){
|
118 |
-
|
119 |
-
foreach ($attribute as $key => $attr ){
|
120 |
-
|
121 |
-
$attribute_str .=''.esc_attr($key).'="'.esc_attr($attr).'"';
|
122 |
-
|
123 |
-
}
|
124 |
-
|
125 |
-
}
|
126 |
-
|
127 |
-
switch ( $meta_field['type'] ) {
|
128 |
-
|
129 |
-
case 'media':
|
130 |
-
|
131 |
-
$mediavalue = array();
|
132 |
-
|
133 |
-
if(isset($settings[$meta_field['id']])){
|
134 |
-
|
135 |
-
$mediavalue = $settings[$meta_field['id']];
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
$image_pre = '';
|
140 |
-
if(saswp_remove_warnings($mediavalue, 'thumbnail', 'saswp_string')){
|
141 |
-
|
142 |
-
$image_pre = '<div class="saswp_image_thumbnail">
|
143 |
-
<img class="saswp_image_prev" src="'.esc_attr(saswp_remove_warnings($mediavalue, 'thumbnail', 'saswp_string')).'" />
|
144 |
-
<a data-id="'.esc_attr($meta_field['id']).'" href="#" class="saswp_prev_close">X</a>
|
145 |
-
</div>';
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
$input = sprintf(
|
150 |
-
'<fieldset><input %s class="%s" style="width: 80%%" id="%s" name="%s" type="text" value="%s">'
|
151 |
-
. '<input data-id="media" style="width: 19%%" class="button" id="%s_button" name="%s_button" type="button" value="Upload" />'
|
152 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_id" class="upload-id " name="sd_data['.esc_attr($meta_field['id']).'][id]" id="sd_data['.esc_attr($meta_field['id']).'][id]" value="'.esc_attr(saswp_remove_warnings($mediavalue, 'id', 'saswp_string')).'">'
|
153 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_height" class="upload-height" name="sd_data['.esc_attr($meta_field['id']).'][height]" id="sd_data['.esc_attr($meta_field['id']).'][height]" value="'.esc_attr(saswp_remove_warnings($mediavalue, 'height', 'saswp_string')).'">'
|
154 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_width" class="upload-width" name="sd_data['.esc_attr($meta_field['id']).'][width]" id="sd_data['.esc_attr($meta_field['id']).'][width]" value="'.esc_attr(saswp_remove_warnings($mediavalue, 'width', 'saswp_string')).'">'
|
155 |
-
. '<input type="hidden" data-id="'.esc_attr($meta_field['id']).'_thumbnail" class="upload-thumbnail" name="sd_data['.esc_attr($meta_field['id']).'][thumbnail]" id="sd_data['.esc_attr($meta_field['id']).'][thumbnail]" value="'.esc_attr(saswp_remove_warnings($mediavalue, 'thumbnail', 'saswp_string')).'">'
|
156 |
-
. '<div class="saswp_image_div_'.esc_attr($meta_field['id']).'">'
|
157 |
-
. $image_pre
|
158 |
-
. '</div>'
|
159 |
-
. '</fieldset>',
|
160 |
-
$attribute_str,
|
161 |
-
$class,
|
162 |
-
esc_attr($meta_field['id']),
|
163 |
-
esc_attr($meta_field['name']),
|
164 |
-
esc_url(saswp_remove_warnings($mediavalue, 'url', 'saswp_string')),
|
165 |
-
esc_attr($meta_field['id']),
|
166 |
-
esc_attr($meta_field['id'])
|
167 |
-
);
|
168 |
-
break;
|
169 |
-
case 'checkbox':
|
170 |
-
|
171 |
-
$hiddenvalue ="";
|
172 |
-
|
173 |
-
if(array_key_exists('id', $hidden) && isset($settings[$hidden['id']])){
|
174 |
-
|
175 |
-
$hiddenvalue = $settings[$hidden['id']];
|
176 |
-
|
177 |
-
}
|
178 |
-
$hiddenfield="";
|
179 |
-
|
180 |
-
if(!empty($hidden)){
|
181 |
-
|
182 |
-
$hiddenfield = sprintf(
|
183 |
-
'<input id="%s" name="%s" type="hidden" value="%s">',
|
184 |
-
esc_attr($hidden['id']),
|
185 |
-
esc_attr($hidden['name']),
|
186 |
-
esc_attr($hiddenvalue)
|
187 |
-
);
|
188 |
-
|
189 |
-
}
|
190 |
-
$message ='';
|
191 |
-
|
192 |
-
$input = sprintf(
|
193 |
-
'<input class="%s" id="%s" name="%s" type="checkbox" %s %s><p>'.$message.'</p>',
|
194 |
-
esc_attr($class),
|
195 |
-
esc_attr($meta_field['id']),
|
196 |
-
esc_attr($meta_field['name']),
|
197 |
-
$hiddenvalue == 1 ? 'checked' : '',
|
198 |
-
$attribute_str
|
199 |
-
);
|
200 |
-
$input .=$hiddenfield;
|
201 |
-
break;
|
202 |
-
case 'select':
|
203 |
-
$input = sprintf(
|
204 |
-
'<select class="%s" id="%s" name="%s">',
|
205 |
-
$class,
|
206 |
-
esc_attr($meta_field['id']),
|
207 |
-
esc_attr($meta_field['name'])
|
208 |
-
);
|
209 |
-
foreach ( $meta_field['options'] as $key => $value ) {
|
210 |
-
$settings_meta_field = '';
|
211 |
-
if(isset($settings[$meta_field['id']])){
|
212 |
-
$settings_meta_field = $settings[$meta_field['id']];
|
213 |
-
}
|
214 |
-
|
215 |
-
$input .= sprintf(
|
216 |
-
'<option %s value="%s">%s</option>',
|
217 |
-
$settings_meta_field == $key ? 'selected' : '',
|
218 |
-
$key,
|
219 |
-
esc_html__( $value, 'schema-and-structured-data-for-wp' )
|
220 |
-
);
|
221 |
-
}
|
222 |
-
$input .= '</select>';
|
223 |
-
break;
|
224 |
-
default:
|
225 |
-
|
226 |
-
switch ($meta_field['id']) {
|
227 |
-
|
228 |
-
case 'saswp-reviews-pro-api':
|
229 |
-
|
230 |
-
$pro_api = '<div class="" style="display:block;">
|
231 |
-
'.saswp_get_license_section_html($on, $license_key, $license_status, $license_status_msg, $lable=false, $rv_limits).'
|
232 |
-
</div>';
|
233 |
-
|
234 |
-
|
235 |
-
$input = $pro_api;
|
236 |
-
|
237 |
-
break;
|
238 |
-
|
239 |
-
case 'saswp-reviews-module-section':
|
240 |
-
|
241 |
-
$input = '<div class="saswp_rv_module_pro_notice">
|
242 |
-
<h2>Get Your 5 Stars Reviews on Google SERPs</h2>
|
243 |
-
<p class="saswp_desc">Automatically Fetch your customer reviews from 80+ Platforms and show them on your website with proper schema support. <a target="_blank" href="https://structured-data-for-wp.com/reviews-for-schema">Learn More...</a></p>
|
244 |
-
<div class="saswp_cmpny_lst">
|
245 |
-
<span class="saswp_lst saswp_avlbl">Integrations Avaliable</span>
|
246 |
-
<ul>
|
247 |
-
<li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/google-1-img.png">
|
248 |
-
<span class="saswp_cmpny">Google Reviews</span>
|
249 |
-
</li>
|
250 |
-
<li class="check-img"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/shopper-approved-img.png">
|
251 |
-
<span class="saswp_cmpny">Shopper Approved</span>
|
252 |
-
</li>
|
253 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/agoda-img.png">
|
254 |
-
<span class="saswp_cmpny">Agoda</span>
|
255 |
-
</li>
|
256 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/airbnb-img.png">
|
257 |
-
<span class="saswp_cmpny">Airbnb</span>
|
258 |
-
</li>
|
259 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/alternativeto-img.png">
|
260 |
-
<span>AlternativeTo</span>
|
261 |
-
</li>
|
262 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/amazon-img.png">
|
263 |
-
<span>Amazon</span>
|
264 |
-
</li>
|
265 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/angies-list-img.png">
|
266 |
-
<span>Angies List</span>
|
267 |
-
</li>
|
268 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/aliexpress-img.png">
|
269 |
-
<span>Ali Express</span>
|
270 |
-
</li>
|
271 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/appstore-img.png">
|
272 |
-
<span>App Store</span>
|
273 |
-
</li>
|
274 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/avvo-img.png">
|
275 |
-
<span>Avvo</span>
|
276 |
-
</li>
|
277 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/bbb-img.png">
|
278 |
-
<span>BBB</span>
|
279 |
-
</li>
|
280 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/bestbuy-img.png">
|
281 |
-
<span>Bestbuy</span>
|
282 |
-
</li>
|
283 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/booking-com-img.png">
|
284 |
-
<span>Booking.com</span>
|
285 |
-
</li>
|
286 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/capterra-img.png">
|
287 |
-
<span>Capterra</span>
|
288 |
-
</li>
|
289 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/cars-com-img.png">
|
290 |
-
<span>Cars.com</span>
|
291 |
-
</li>
|
292 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/cargurus-img.png">
|
293 |
-
<span>Cargurus</span>
|
294 |
-
</li>
|
295 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/clutch-img.png">
|
296 |
-
<span>Clutch</span>
|
297 |
-
</li>
|
298 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/citysearch-img.png">
|
299 |
-
<span>Citysearch</span>
|
300 |
-
</li>
|
301 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/consumeraffairs-img.png">
|
302 |
-
<span>Consumer Affairs</span>
|
303 |
-
</li>
|
304 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/creditkarma-img.png">
|
305 |
-
<span>CreditKarma</span>
|
306 |
-
</li>
|
307 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/customerlobby-img.png">
|
308 |
-
<span>CustomerLobby</span>
|
309 |
-
</li>
|
310 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/dealerrater-img.png">
|
311 |
-
<span>DealerRater</span>
|
312 |
-
</li>
|
313 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/ebay-img.png">
|
314 |
-
<span>Ebay</span>
|
315 |
-
</li>
|
316 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/edmunds-img.png">
|
317 |
-
<span>Edmunds</span>
|
318 |
-
</li>
|
319 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/etsy-img.png">
|
320 |
-
<span>Etsy</span>
|
321 |
-
</li>
|
322 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/expedia-img.png">
|
323 |
-
<span>Expedia</span>
|
324 |
-
</li>
|
325 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/facebook-1-img.png">
|
326 |
-
<span>Facebook</span>
|
327 |
-
</li>
|
328 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/flipkart-img.png">
|
329 |
-
<span>Flipkart</span>
|
330 |
-
</li>
|
331 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/foursquare-img.png">
|
332 |
-
<span>Foursquare</span>
|
333 |
-
</li>
|
334 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/g2crowd-img.png">
|
335 |
-
<span>G2Crowd</span>
|
336 |
-
</li>
|
337 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/gearbest-img.png">
|
338 |
-
<span>Gearbest</span>
|
339 |
-
</li>
|
340 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/glassdoor-img.png">
|
341 |
-
<span>Glassdoor</span>
|
342 |
-
</li>
|
343 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/healthgrades-img.png">
|
344 |
-
<span>Healthgrades</span>
|
345 |
-
</li>
|
346 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/homeadvisor-img.png">
|
347 |
-
<span>HomeAdvisor</span>
|
348 |
-
</li>
|
349 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/homestars-img.png">
|
350 |
-
<span>Homestars</span>
|
351 |
-
</li>
|
352 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/houzz-img.png">
|
353 |
-
<span>Houzz</span>
|
354 |
-
</li>
|
355 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/hotels-com-img.png">
|
356 |
-
<span>Hotels.com</span>
|
357 |
-
</li>
|
358 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/hungerstation-img.png">
|
359 |
-
<span>Hungerstation</span>
|
360 |
-
</li>
|
361 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/imdb-img.png">
|
362 |
-
<span>Imdb</span>
|
363 |
-
</li>
|
364 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/indeed-img.png">
|
365 |
-
<span>Indeed</span>
|
366 |
-
</li>
|
367 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/insiderpages-img.png">
|
368 |
-
<span>Insider Pages</span>
|
369 |
-
</li>
|
370 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/jet-img.png">
|
371 |
-
<span>Jet</span>
|
372 |
-
</li>
|
373 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/lawyers-com-img.png">
|
374 |
-
<span>Lawyers.com</span>
|
375 |
-
</li>
|
376 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/lendingtree-img.png">
|
377 |
-
<span>Lending Tree</span>
|
378 |
-
</li>
|
379 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/martindale-img.png">
|
380 |
-
<span>Martindale</span>
|
381 |
-
</li>
|
382 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/newegg-img.png">
|
383 |
-
<span>Newegg</span>
|
384 |
-
</li>
|
385 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/openrice-img.png">
|
386 |
-
<span>OpenRice</span>
|
387 |
-
</li>
|
388 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/opentable-img.png">
|
389 |
-
<span>Opentable</span>
|
390 |
-
</li>
|
391 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/playstore-img.png">
|
392 |
-
<span>Playstore</span>
|
393 |
-
</li>
|
394 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/producthunt-img.png">
|
395 |
-
<span>ProductHunt</span>
|
396 |
-
</li>
|
397 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/ratemds-img.png">
|
398 |
-
<span>RateMDs</span>
|
399 |
-
</li>
|
400 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/reserveout-img.png">
|
401 |
-
<span>Reserveout</span>
|
402 |
-
</li>
|
403 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/rottentomatoes-img.png">
|
404 |
-
<span>Rottentomatoes</span>
|
405 |
-
</li>
|
406 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/siftery-img.png">
|
407 |
-
<span>Siftery</span>
|
408 |
-
</li>
|
409 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/sitejabber-img.png">
|
410 |
-
<span>Sitejabber</span>
|
411 |
-
</li>
|
412 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/softwareadvice-img.png">
|
413 |
-
<span>SoftwareAdvice</span>
|
414 |
-
</li>
|
415 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/steam-img.png">
|
416 |
-
<span>Steam</span>
|
417 |
-
</li>
|
418 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/talabat-img.png">
|
419 |
-
<span>Talabat</span>
|
420 |
-
</li>
|
421 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/theknot-img.png">
|
422 |
-
<span>The Knot</span>
|
423 |
-
</li>
|
424 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/thumbtack-img.png">
|
425 |
-
<span>Thumbtack</span>
|
426 |
-
</li>
|
427 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/tripadvisor-img.png">
|
428 |
-
<span>TripAdvisor</span>
|
429 |
-
</li>
|
430 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trulia-img.png">
|
431 |
-
<span>Trulia</span>
|
432 |
-
</li>
|
433 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustedshops-img.png">
|
434 |
-
<span>TrustedShops</span>
|
435 |
-
</li>
|
436 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustpilot-img.png">
|
437 |
-
<span>Trustpilot</span>
|
438 |
-
</li>
|
439 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/trustradius-img.png">
|
440 |
-
<span>TrustRadius</span>
|
441 |
-
</li>
|
442 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/vitals-img.png">
|
443 |
-
<span>Vitals</span>
|
444 |
-
</li>
|
445 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/walmart-img.png">
|
446 |
-
<span>Walmart</span>
|
447 |
-
</li>
|
448 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/weddingwire-img.png">
|
449 |
-
<span>WeddingWire</span>
|
450 |
-
</li>
|
451 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/wish-img.png">
|
452 |
-
<span>Wish </span>
|
453 |
-
</li>
|
454 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/yelp-img.png">
|
455 |
-
<span>Yelp</span>
|
456 |
-
</li>
|
457 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/yellowpages-img.png">
|
458 |
-
<span>Yellow Pages</span>
|
459 |
-
</li>
|
460 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zillow-img.png">
|
461 |
-
<span>Zillow</span>
|
462 |
-
</li>
|
463 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zocdoc-img.png">
|
464 |
-
<span>ZocDoc</span>
|
465 |
-
</li>
|
466 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/zomato-img.png">
|
467 |
-
<span>Zomato</span>
|
468 |
-
</li>
|
469 |
-
<li><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/judge-me-img.png">
|
470 |
-
<span>Judge.me</span>
|
471 |
-
</li>
|
472 |
-
</ul>
|
473 |
-
</div>
|
474 |
-
<div class="saswp-rev-btn">
|
475 |
-
<span>With our API service, you can fetch reviews from anywhere you want! and we are always increasing the number of integrations. You can also request for an integration as well.</span>
|
476 |
-
<a target="_blank" href="https://structured-data-for-wp.com/reviews-for-schema">Get The Reviews Addon Now</a>
|
477 |
-
</div>
|
478 |
-
</div>';
|
479 |
-
|
480 |
-
break;
|
481 |
-
|
482 |
-
case 'saswp-google-place-section':
|
483 |
-
|
484 |
-
$location = '';
|
485 |
-
|
486 |
-
if(isset($settings['saswp_reviews_location_name']) && !empty($settings['saswp_reviews_location_name'])){
|
487 |
-
|
488 |
-
$rv_loc = $settings['saswp_reviews_location_name'];
|
489 |
-
$rv_blocks = isset($settings['saswp_reviews_location_blocks'])? $settings['saswp_reviews_location_blocks']:array();
|
490 |
-
|
491 |
-
$i=0;
|
492 |
-
|
493 |
-
foreach($rv_loc as $rvl){
|
494 |
-
|
495 |
-
if($rvl){
|
496 |
-
|
497 |
-
$blocks_fields = apply_filters('saswp_modify_blocks_field', '<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" value="5" disabled="disabled">', isset($rv_blocks[$i])? $rv_blocks[$i]: 5);
|
498 |
-
|
499 |
-
$location .= '<tr>'
|
500 |
-
. '<td style="width:12%;"><strong>'.esc_html__( 'Place Id', 'schema-and-structured-data-for-wp' ).'</strong></td>'
|
501 |
-
. '<td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value="'. esc_attr($rvl).'"></td>'
|
502 |
-
. '<td style="width:10%;"><strong>'.esc_html__( 'Reviews', 'schema-and-structured-data-for-wp' ).'</strong></td>'
|
503 |
-
. '<td style="width:10%;">'.$blocks_fields.'</td>'
|
504 |
-
. '<td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'.esc_html__( 'Fetch', 'schema-and-structured-data-for-wp' ).'</a></td>'
|
505 |
-
. '<td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td>'
|
506 |
-
. '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
|
507 |
-
. '</tr>';
|
508 |
-
}
|
509 |
-
$i++;
|
510 |
-
}
|
511 |
-
|
512 |
-
}
|
513 |
-
|
514 |
-
$reviews = '<div class="saswp-g-reviews-settings saswp-knowledge-label">'
|
515 |
-
. '<table class="saswp-g-reviews-settings-table" style="width:100%">'
|
516 |
-
. $location
|
517 |
-
. '</table>'
|
518 |
-
. '<div>'
|
519 |
-
. '<a class="button button-default saswp-add-g-location-btn">'.esc_html__( 'Add Location', 'schema-and-structured-data-for-wp' ).'</a>'
|
520 |
-
. '<p><a target="_blank" href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder">'.esc_html__( 'Place ID Finder', 'schema-and-structured-data-for-wp' ).'</a></p>'
|
521 |
-
. '</div>'
|
522 |
-
. '</div>';
|
523 |
-
|
524 |
-
$input = $reviews;
|
525 |
-
|
526 |
-
break;
|
527 |
-
|
528 |
-
case 'saswp-shopper-approved-section':
|
529 |
-
|
530 |
-
$reviews = '<div class="saswp-s-approved-reviews-settings saswp-knowledge-label">'
|
531 |
-
. '<table class="saswp-s-reviews-settings-table" style="width:100%">'
|
532 |
-
. '<tr>'
|
533 |
-
. '<td style="width:12%;"><strong>'.esc_html__( 'Site Id', 'schema-and-structured-data-for-wp' ).'</strong></td>'
|
534 |
-
. '<td style="width:10%;"><input class="saswp-g-location-field" id="saswp_s_approved_site_id" name="sd_data[saswp_s_approved_site_id]" type="text" value="'.$settings['saswp_s_approved_site_id'].'"></td>'
|
535 |
-
. '<td style="width:10%;"><strong>'.esc_html__( 'Token', 'schema-and-structured-data-for-wp' ).'</strong></td>'
|
536 |
-
. '<td style="width:20%;"><input class="saswp-g-blocks-field" id="saswp_s_approved_token" name="sd_data[saswp_s_approved_token]" type="text" value="'.$settings['saswp_s_approved_token'].'"></td>'
|
537 |
-
. '<td style="width:5%;"><strong>'.esc_html__( 'Reviews', 'schema-and-structured-data-for-wp' ).'</strong></td>'
|
538 |
-
. '<td style="width:15%;"><input class="saswp-g-blocks-field" id="saswp_s_approved_reviews" name="sd_data[saswp_s_approved_reviews]" type="number" min="1" max="500" value="'.$settings['saswp_s_approved_reviews'].'"></td>'
|
539 |
-
. '<td style="width:10%;"><a class="button button-default saswp-fetch-s-approved-reviews">'.esc_html__( 'Fetch', 'schema-and-structured-data-for-wp' ).'</a></td>'
|
540 |
-
. '<td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td>'
|
541 |
-
. '</tr>'
|
542 |
-
. '</table>'
|
543 |
-
. '<div>'
|
544 |
-
. '</div>'
|
545 |
-
. '</div>';
|
546 |
-
|
547 |
-
$input = $reviews;
|
548 |
-
|
549 |
-
break;
|
550 |
-
|
551 |
-
|
552 |
-
default:
|
553 |
-
|
554 |
-
$stng_meta_field = '';
|
555 |
-
|
556 |
-
if(isset($settings[$meta_field['id']])){
|
557 |
-
|
558 |
-
$stng_meta_field = $settings[$meta_field['id']];
|
559 |
-
|
560 |
-
}
|
561 |
-
|
562 |
-
$input = sprintf(
|
563 |
-
'<input class="%s" %s id="%s" name="%s" type="%s" value="%s" %s>',
|
564 |
-
$class,
|
565 |
-
$meta_field['type'] !== 'color' ? 'style="width: 100%"' : '',
|
566 |
-
esc_attr(saswp_remove_warnings($meta_field, 'id', 'saswp_string')),
|
567 |
-
esc_attr(saswp_remove_warnings($meta_field, 'name', 'saswp_string')),
|
568 |
-
esc_attr(saswp_remove_warnings($meta_field, 'type', 'saswp_string')),
|
569 |
-
esc_attr($stng_meta_field),
|
570 |
-
$attribute_str
|
571 |
-
);
|
572 |
-
|
573 |
-
break;
|
574 |
-
}
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
}
|
579 |
-
$reviews = $pro_api = $toggle_button = '';
|
580 |
-
|
581 |
-
if($meta_field['id'] == 'saswp_google_place_api_key'){
|
582 |
-
|
583 |
-
}
|
584 |
-
|
585 |
-
$allowed_html = saswp_expanded_allowed_tags();
|
586 |
-
|
587 |
-
if($meta_field['id'] == 'saswp-reviews-module-section'){
|
588 |
-
$output .= '<li class="saswp-rev-mod">'
|
589 |
-
. '<div class="saswp-knowledge-label">'.$label.'</div>'
|
590 |
-
. '<div class="saswp-knowledge-field">'.$input.'<p class="">'.$note.'</p></div>'
|
591 |
-
|
592 |
-
. '</li>';
|
593 |
-
}else{
|
594 |
-
$output .= '<li>'
|
595 |
-
. '<div class="saswp-knowledge-label">'.$label.'</div>'
|
596 |
-
. '<div class="saswp-knowledge-field">'.$input.'<p class="">'.$note.'</p></div>'
|
597 |
-
|
598 |
-
. '</li>';
|
599 |
-
}
|
600 |
-
|
601 |
-
}
|
602 |
-
|
603 |
-
echo '<div><div class="saswp-settings-list"><ul>' . wp_kses($output, $allowed_html) . '</ul></div></div>';
|
604 |
-
}
|
605 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin_section/js/amp/collection-front.js
DELETED
File without changes
|
admin_section/js/main-script.js
CHANGED
@@ -607,108 +607,7 @@ return false;
|
|
607 |
}else{
|
608 |
$("#saswp-for-wordpress").val(0);
|
609 |
}
|
610 |
-
break;
|
611 |
-
case 'saswp-facebook-enable-checkbox':
|
612 |
-
|
613 |
-
if ($(this).is(':checked')) {
|
614 |
-
$("#saswp-facebook-enable").val(1);
|
615 |
-
$("#sd_facebook").show();
|
616 |
-
}else{
|
617 |
-
$("#saswp-facebook-enable").val(0);
|
618 |
-
$("#sd_facebook").hide();
|
619 |
-
}
|
620 |
-
break;
|
621 |
-
case 'saswp-twitter-enable-checkbox':
|
622 |
-
|
623 |
-
if ($(this).is(':checked')) {
|
624 |
-
$("#saswp-twitter-enable").val(1);
|
625 |
-
$("#sd_twitter").show();
|
626 |
-
}else{
|
627 |
-
$("#saswp-twitter-enable").val(0);
|
628 |
-
$("#sd_twitter").hide();
|
629 |
-
}
|
630 |
-
break;
|
631 |
-
case 'saswp-google-plus-enable-checkbox':
|
632 |
-
|
633 |
-
if ($(this).is(':checked')) {
|
634 |
-
$("#saswp-google-plus-enable").val(1);
|
635 |
-
$("#sd_google_plus").show();
|
636 |
-
}else{
|
637 |
-
$("#saswp-google-plus-enable").val(0);
|
638 |
-
$("#sd_google_plus").hide();
|
639 |
-
}
|
640 |
-
break;
|
641 |
-
case 'saswp-instagram-enable-checkbox':
|
642 |
-
|
643 |
-
if ($(this).is(':checked')) {
|
644 |
-
$("#saswp-instagram-enable").val(1);
|
645 |
-
$("#sd_instagram").show();
|
646 |
-
}else{
|
647 |
-
$("#saswp-instagram-enable").val(0);
|
648 |
-
$("#sd_instagram").hide();
|
649 |
-
}
|
650 |
-
break;
|
651 |
-
case 'saswp-youtube-enable-checkbox':
|
652 |
-
|
653 |
-
if ($(this).is(':checked')) {
|
654 |
-
$("#sd_youtube").show();
|
655 |
-
$("#saswp-youtube-enable").val(1);
|
656 |
-
}else{
|
657 |
-
$("#saswp-youtube-enable").val(0);
|
658 |
-
$("#sd_youtube").hide();
|
659 |
-
}
|
660 |
-
break;
|
661 |
-
case 'saswp-linkedin-enable-checkbox':
|
662 |
-
|
663 |
-
if ($(this).is(':checked')) {
|
664 |
-
$("#saswp-linkedin-enable").val(1);
|
665 |
-
$("#sd_linkedin").show();
|
666 |
-
}else{
|
667 |
-
$("#saswp-linkedin-enable").val(0);
|
668 |
-
$("#sd_linkedin").hide();
|
669 |
-
}
|
670 |
-
break;
|
671 |
-
case 'saswp-pinterest-enable-checkbox':
|
672 |
-
|
673 |
-
if ($(this).is(':checked')) {
|
674 |
-
$("#saswp-pinterest-enable").val(1);
|
675 |
-
$("#sd_pinterest").show();
|
676 |
-
}else{
|
677 |
-
$("#saswp-pinterest-enable").val(0);
|
678 |
-
$("#sd_pinterest").hide();
|
679 |
-
}
|
680 |
-
break;
|
681 |
-
case 'saswp-soundcloud-enable-checkbox':
|
682 |
-
|
683 |
-
if ($(this).is(':checked')) {
|
684 |
-
$("#saswp-soundcloud-enable").val(1);
|
685 |
-
$("#sd_soundcloud").show();
|
686 |
-
}else{
|
687 |
-
$("#saswp-soundcloud-enable").val(0);
|
688 |
-
$("#sd_soundcloud").hide();
|
689 |
-
}
|
690 |
-
break;
|
691 |
-
case 'saswp-tumblr-enable-checkbox':
|
692 |
-
|
693 |
-
if ($(this).is(':checked')) {
|
694 |
-
$("#saswp-tumblr-enable").val(1);
|
695 |
-
$("#sd_tumblr").show();
|
696 |
-
}else{
|
697 |
-
$("#saswp-tumblr-enable").val(0);
|
698 |
-
$("#sd_tumblr").hide();
|
699 |
-
}
|
700 |
-
break;
|
701 |
-
case 'saswp-yelp-enable-checkbox':
|
702 |
-
|
703 |
-
if ($(this).is(':checked')) {
|
704 |
-
$("#saswp-yelp-enable").val(1);
|
705 |
-
$("#sd_yelp").show();
|
706 |
-
}else{
|
707 |
-
$("#saswp-yelp-enable").val(0);
|
708 |
-
$("#sd_yelp").hide();
|
709 |
-
}
|
710 |
-
break;
|
711 |
-
|
712 |
case 'saswp-for-amp-checkbox':
|
713 |
|
714 |
if ($(this).is(':checked')) {
|
@@ -1225,6 +1124,26 @@ return false;
|
|
1225 |
|
1226 |
break;
|
1227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
case 'saswp-betteramp-checkbox':
|
1229 |
saswp_compatibliy_notes(current, id);
|
1230 |
if ($(this).is(':checked')) {
|
@@ -1319,8 +1238,7 @@ return false;
|
|
1319 |
$(document).on("click", ".saswp_prev_close", function(e){
|
1320 |
e.preventDefault();
|
1321 |
|
1322 |
-
var id = $(this).attr('data-id');
|
1323 |
-
console.log(id);
|
1324 |
$(this).parent().remove();
|
1325 |
$("#"+id).val('');
|
1326 |
$("input[data-id='"+id+"_id']").val('');
|
@@ -1451,19 +1369,20 @@ return false;
|
|
1451 |
|
1452 |
$(".saswp-send-query").on("click", function(e){
|
1453 |
e.preventDefault();
|
1454 |
-
var message
|
1455 |
-
|
|
|
|
|
1456 |
$.ajax({
|
1457 |
type: "POST",
|
1458 |
url:ajaxurl,
|
1459 |
dataType: "json",
|
1460 |
-
data:{action:"saswp_send_query_message", message:message, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1461 |
success:function(response){
|
1462 |
if(response['status'] =='t'){
|
1463 |
$(".saswp-query-success").show();
|
1464 |
$(".saswp-query-error").hide();
|
1465 |
-
}else{
|
1466 |
-
console.log('dd');
|
1467 |
$(".saswp-query-success").hide();
|
1468 |
$(".saswp-query-error").show();
|
1469 |
}
|
@@ -1473,7 +1392,20 @@ return false;
|
|
1473 |
}
|
1474 |
});
|
1475 |
}else{
|
1476 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1477 |
}
|
1478 |
|
1479 |
});
|
@@ -1597,9 +1529,7 @@ return false;
|
|
1597 |
//Review js starts here
|
1598 |
|
1599 |
$(document).on("click", ".saswp-add-more-item",function(e){
|
1600 |
-
e.preventDefault();
|
1601 |
-
var rows = $('.saswp-review-item-list-table tr').length;
|
1602 |
-
console.log(rows);
|
1603 |
var html = '<tr class="saswp-review-item-tr">';
|
1604 |
html += '<td>Review Item Feature</td>';
|
1605 |
html += '<td><input type="text" name="saswp-review-item-feature[]"></td>';
|
@@ -2052,12 +1982,10 @@ return false;
|
|
2052 |
$(".saswp-rating-div").rateYo({
|
2053 |
|
2054 |
rating: saswp_reviews_data.rating_val,
|
2055 |
-
halfStar: true,
|
2056 |
-
//normalFill: "#ffd700",
|
2057 |
readOnly: saswp_reviews_data.readonly,
|
2058 |
onSet: function (rating, rateYoInstance) {
|
2059 |
-
|
2060 |
-
console.log(rating);
|
2061 |
}
|
2062 |
|
2063 |
});
|
@@ -2066,6 +1994,7 @@ return false;
|
|
2066 |
//rating ends here
|
2067 |
|
2068 |
$("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
|
|
|
2069 |
var current = $(this);
|
2070 |
|
2071 |
current.parent().find('.saswp-phone-validation').remove();
|
607 |
}else{
|
608 |
$("#saswp-for-wordpress").val(0);
|
609 |
}
|
610 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
case 'saswp-for-amp-checkbox':
|
612 |
|
613 |
if ($(this).is(':checked')) {
|
1124 |
|
1125 |
break;
|
1126 |
|
1127 |
+
case 'saswp-strong-testimonials-checkbox':
|
1128 |
+
saswp_compatibliy_notes(current, id);
|
1129 |
+
if ($(this).is(':checked')) {
|
1130 |
+
$("#saswp-strong-testimonials").val(1);
|
1131 |
+
}else{
|
1132 |
+
$("#saswp-strong-testimonials").val(0);
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
break;
|
1136 |
+
|
1137 |
+
case 'saswp-wordlift-checkbox':
|
1138 |
+
saswp_compatibliy_notes(current, id);
|
1139 |
+
if ($(this).is(':checked')) {
|
1140 |
+
$("#saswp-wordlift").val(1);
|
1141 |
+
}else{
|
1142 |
+
$("#saswp-wordlift").val(0);
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
break;
|
1146 |
+
|
1147 |
case 'saswp-betteramp-checkbox':
|
1148 |
saswp_compatibliy_notes(current, id);
|
1149 |
if ($(this).is(':checked')) {
|
1238 |
$(document).on("click", ".saswp_prev_close", function(e){
|
1239 |
e.preventDefault();
|
1240 |
|
1241 |
+
var id = $(this).attr('data-id');
|
|
|
1242 |
$(this).parent().remove();
|
1243 |
$("#"+id).val('');
|
1244 |
$("input[data-id='"+id+"_id']").val('');
|
1369 |
|
1370 |
$(".saswp-send-query").on("click", function(e){
|
1371 |
e.preventDefault();
|
1372 |
+
var message = $("#saswp_query_message").val();
|
1373 |
+
var premium_cus = $("#saswp_query_premium_cus").val();
|
1374 |
+
|
1375 |
+
if($.trim(message) !='' && premium_cus){
|
1376 |
$.ajax({
|
1377 |
type: "POST",
|
1378 |
url:ajaxurl,
|
1379 |
dataType: "json",
|
1380 |
+
data:{action:"saswp_send_query_message", premium_cus:premium_cus,message:message, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
|
1381 |
success:function(response){
|
1382 |
if(response['status'] =='t'){
|
1383 |
$(".saswp-query-success").show();
|
1384 |
$(".saswp-query-error").hide();
|
1385 |
+
}else{
|
|
|
1386 |
$(".saswp-query-success").hide();
|
1387 |
$(".saswp-query-error").show();
|
1388 |
}
|
1392 |
}
|
1393 |
});
|
1394 |
}else{
|
1395 |
+
|
1396 |
+
if($.trim(message) =='' && premium_cus ==''){
|
1397 |
+
alert('Please enter the message and select customer type');
|
1398 |
+
}else{
|
1399 |
+
|
1400 |
+
if(premium_cus ==''){
|
1401 |
+
alert('Select Customer type');
|
1402 |
+
}
|
1403 |
+
if($.trim(message) == ''){
|
1404 |
+
alert('Please enter the message');
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
}
|
1408 |
+
|
1409 |
}
|
1410 |
|
1411 |
});
|
1529 |
//Review js starts here
|
1530 |
|
1531 |
$(document).on("click", ".saswp-add-more-item",function(e){
|
1532 |
+
e.preventDefault();
|
|
|
|
|
1533 |
var html = '<tr class="saswp-review-item-tr">';
|
1534 |
html += '<td>Review Item Feature</td>';
|
1535 |
html += '<td><input type="text" name="saswp-review-item-feature[]"></td>';
|
1982 |
$(".saswp-rating-div").rateYo({
|
1983 |
|
1984 |
rating: saswp_reviews_data.rating_val,
|
1985 |
+
halfStar: true,
|
|
|
1986 |
readOnly: saswp_reviews_data.readonly,
|
1987 |
onSet: function (rating, rateYoInstance) {
|
1988 |
+
$(this).next().val(rating);
|
|
|
1989 |
}
|
1990 |
|
1991 |
});
|
1994 |
//rating ends here
|
1995 |
|
1996 |
$("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){
|
1997 |
+
|
1998 |
var current = $(this);
|
1999 |
|
2000 |
current.parent().find('.saswp-phone-validation').remove();
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_attached_rv=[];jQuery(document).ready(function(s){if(s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show("Attach reviews to this schema type","#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("review-id")),s(this).is(":checked")?saswp_attached_rv.push(e):saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),s(".saswp-attached-rv-count").text(saswp_attached_rv.length+" Reviews Attached"),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(".saswp-add-rv-loop").length,t=a/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",offset:a,paged:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var a="";e.result&&(s.each(e.result,function(s,e){var t="";saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(t="checked"),a+='<div class="saswp-add-rv-loop" review-id="'+e.saswp_review_id+'">',a+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+t+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>',a+="</div>"}),s(".saswp-add-rv-automatic-list").append(a)),e.message&&(s(".saswp-rv-not-found").removeClass("saswp_hide"),s(".saswp-load-more-rv").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),o=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),c=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(p||o)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:p,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==p&&alert("Please enter reviews api key"),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};e=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,e){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){e.element.pointer("close")}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":s(this).is(":checked")?(s("#saswp-facebook-enable").val(1),s("#sd_facebook").show()):(s("#saswp-facebook-enable").val(0),s("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":s(this).is(":checked")?(s("#saswp-twitter-enable").val(1),s("#sd_twitter").show()):(s("#saswp-twitter-enable").val(0),s("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":s(this).is(":checked")?(s("#saswp-google-plus-enable").val(1),s("#sd_google_plus").show()):(s("#saswp-google-plus-enable").val(0),s("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":s(this).is(":checked")?(s("#saswp-instagram-enable").val(1),s("#sd_instagram").show()):(s("#saswp-instagram-enable").val(0),s("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":s(this).is(":checked")?(s("#sd_youtube").show(),s("#saswp-youtube-enable").val(1)):(s("#saswp-youtube-enable").val(0),s("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":s(this).is(":checked")?(s("#saswp-linkedin-enable").val(1),s("#sd_linkedin").show()):(s("#saswp-linkedin-enable").val(0),s("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":s(this).is(":checked")?(s("#saswp-pinterest-enable").val(1),s("#sd_pinterest").show()):(s("#saswp-pinterest-enable").val(0),s("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":s(this).is(":checked")?(s("#saswp-soundcloud-enable").val(1),s("#sd_soundcloud").show()):(s("#saswp-soundcloud-enable").val(0),s("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":s(this).is(":checked")?(s("#saswp-tumblr-enable").val(1),s("#sd_tumblr").show()):(s("#saswp-tumblr-enable").val(0),s("#sd_tumblr").hide());break;case"saswp-yelp-enable-checkbox":s(this).is(":checked")?(s("#saswp-yelp-enable").val(1),s("#sd_yelp").show()):(s("#saswp-yelp-enable").val(0),s("#sd_yelp").hide());break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tagyeem").val(1):s("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");console.log(a),s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id");if(s(this).is(":checked"))var i=1;else i=0;s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),o=s("#"+i+"_addon_license_key").val();t&&i&&o?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val();""!=s.trim(a)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(console.log("dd"),s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):alert("Please enter the message")}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),s(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),s(".saswp-modify_schema_post_enable").on("click",function(e){var a=s(this);a.addClass("updating-message"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){a.remove(),s(".saswp-add-custom-schema-div").remove(),s("#post_specific .inside").append(e),a.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();var a=s(".saswp-review-item-list-table tr").length;console.log(a);s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),o=s(this).attr("div_type"),p=s("saswp_specific_"+t+" , .saswp-"+o+"-table-div").length,c=s("saswp_specific_"+t+" , .saswp-"+o+"-table-div:nth-child("+p+")").attr("data-id");(c=++c)||(c=0),saswp_get_post_specific_schema_fields(a,c,i,o,t,i+"_")}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),o="",p=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(o+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(o+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(o),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,o+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(o),saswpCustomSelect2())},"json"):"custom_field"==t?(o+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',o+="</select></td>",o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2()):"fixed_image"==t?(o+="<td>",o+="<fieldset>",o+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',o+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+c+'[height]" id="'+p+'_height" value="">',o+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+c+'[width]" id="'+p+'_width" value="">',o+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+c+'[thumbnail]" id="'+p+'_thumbnail" value="">',o+='<div class="saswp_image_div_'+p+'">',o+="</div>",o+="</fieldset>",o+="</td>",o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2()):(o+="<td></td>",o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var o=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:o,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"saswp_reviews"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.collections_page_url+"' id='' class='page-title-action'>Collections</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().val(e),console.log(e)}}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var i,o,p=s("#saswp_collection_id").val();p&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:p,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(i=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",i.innerHTML="Copied!",document.body.appendChild(i);var c=document.getElementById("motivatebox");c&&c.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(o),i.style.left=e.pageX-10+"px",i.style.top=e.pageY+15+"px",i.style.opacity=1,o=setTimeout(function(){i.style.opacity=0},500)}(s))},!1)});
|
1 |
+
var saswp_attached_rv=[];jQuery(document).ready(function(s){if(s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show("Attach reviews to this schema type","#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("review-id")),s(this).is(":checked")?saswp_attached_rv.push(e):saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),s(".saswp-attached-rv-count").text(saswp_attached_rv.length+" Reviews Attached"),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(".saswp-add-rv-loop").length,t=a/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",offset:a,paged:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var a="";e.result&&(s.each(e.result,function(s,e){var t="";saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(t="checked"),a+='<div class="saswp-add-rv-loop" review-id="'+e.saswp_review_id+'">',a+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+t+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>',a+="</div>"}),s(".saswp-add-rv-automatic-list").append(a)),e.message&&(s(".saswp-rv-not-found").removeClass("saswp_hide"),s(".saswp-load-more-rv").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),o=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),c=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(p||o)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:p,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==p&&alert("Please enter reviews api key"),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};e=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,e){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){e.element.pointer("close")}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tagyeem").val(1):s("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id");if(s(this).is(":checked"))var i=1;else i=0;s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),o=s("#"+i+"_addon_license_key").val();t&&i&&o?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&t?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:t,message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==t?alert("Please enter the message and select customer type"):(""==t&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),s(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),s(".saswp-modify_schema_post_enable").on("click",function(e){var a=s(this);a.addClass("updating-message"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){a.remove(),s(".saswp-add-custom-schema-div").remove(),s("#post_specific .inside").append(e),a.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),o=s(this).attr("div_type"),p=s("saswp_specific_"+t+" , .saswp-"+o+"-table-div").length,c=s("saswp_specific_"+t+" , .saswp-"+o+"-table-div:nth-child("+p+")").attr("data-id");(c=++c)||(c=0),saswp_get_post_specific_schema_fields(a,c,i,o,t,i+"_")}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),o="",p=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(o+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(o+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(o),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,o+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(o),saswpCustomSelect2())},"json"):"custom_field"==t?(o+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',o+="</select></td>",o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2()):"fixed_image"==t?(o+="<td>",o+="<fieldset>",o+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',o+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+c+'[height]" id="'+p+'_height" value="">',o+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+c+'[width]" id="'+p+'_width" value="">',o+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+c+'[thumbnail]" id="'+p+'_thumbnail" value="">',o+='<div class="saswp_image_div_'+p+'">',o+="</div>",o+="</fieldset>",o+="</td>",o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2()):(o+="<td></td>",o+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(o),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var o=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:o,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"saswp_reviews"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.collections_page_url+"' id='' class='page-title-action'>Collections</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().val(e)}}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var i,o,p=s("#saswp_collection_id").val();p&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:p,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(i=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",i.innerHTML="Copied!",document.body.appendChild(i);var c=document.getElementById("motivatebox");c&&c.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(o),i.style.left=e.pageX-10+"px",i.style.top=e.pageY+15+"px",i.style.opacity=1,o=setTimeout(function(){i.style.opacity=0},500)}(s))},!1)});
|
admin_section/settings.php
CHANGED
@@ -1271,8 +1271,8 @@ function saswp_import_callback(){
|
|
1271 |
|
1272 |
</ul>
|
1273 |
<?php
|
1274 |
-
|
1275 |
-
|
1276 |
?>
|
1277 |
<ul>
|
1278 |
<li>
|
@@ -2167,6 +2167,30 @@ function saswp_compatibility_page_callback(){
|
|
2167 |
'name' => 'sd_data[saswp-testimonial-pro]',
|
2168 |
)
|
2169 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2170 |
|
2171 |
$flex_lmx = array(
|
2172 |
'label' => 'FlexMLS IDX Plugin',
|
@@ -2272,6 +2296,8 @@ function saswp_compatibility_page_callback(){
|
|
2272 |
$easy_testimonials,
|
2273 |
$bne_testimonials,
|
2274 |
$testimonial_pro,
|
|
|
|
|
2275 |
$flex_lmx
|
2276 |
|
2277 |
);
|
@@ -2421,7 +2447,15 @@ function saswp_support_page_callback(){
|
|
2421 |
<br>
|
2422 |
<span class="saswp-query-success saswp_hide"><?php echo esc_html__('Message sent successfully, Please wait we will get back to you shortly', 'schema-and-structured-data-for-wp'); ?></span>
|
2423 |
<span class="saswp-query-error saswp_hide"><?php echo esc_html__('Message not sent. please check your network connection', 'schema-and-structured-data-for-wp'); ?></span>
|
2424 |
-
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2425 |
<li><button class="button saswp-send-query"><?php echo esc_html__('Send Message', 'schema-and-structured-data-for-wp'); ?></button></li>
|
2426 |
</ul>
|
2427 |
|
@@ -2512,62 +2546,4 @@ function saswp_enqueue_style_js( $hook ) {
|
|
2512 |
wp_style_add_data( 'saswp-main-css', 'rtl', 'replace' );
|
2513 |
|
2514 |
}
|
2515 |
-
add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
|
2516 |
-
|
2517 |
-
function saswp_get_field_note($pname){
|
2518 |
-
|
2519 |
-
$notes = array(
|
2520 |
-
'ampforwp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/accelerated-mobile-pages/">AMP for WP</a>',
|
2521 |
-
'ampbyautomatic' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/amp/">AMP</a>',
|
2522 |
-
'betteramp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">Better AMP</a>',
|
2523 |
-
'wpamp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/wp-amp-accelerated-mobile-pages-for-wordpress-and-woocommerce/16278608">WP AMP</a>',
|
2524 |
-
'kk_star_ratings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/kk-star-ratings/">kk Star Rating</a>',
|
2525 |
-
'wp_post_ratings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-postratings/">WP-PostRatings</a>',
|
2526 |
-
'bb_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bbpress/">bbPress</a>',
|
2527 |
-
'woocommerce' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>',
|
2528 |
-
'cooked' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/cooked/">Cooked</a>',
|
2529 |
-
'the_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/the-events-calendar/">The Events Calendar</a>',
|
2530 |
-
'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
|
2531 |
-
'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
|
2532 |
-
'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
|
2533 |
-
'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>',
|
2534 |
-
'the_seo_framework' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/autodescription/">The Seo Framework</a>',
|
2535 |
-
'seo_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-seopress/">SEOPress</a>',
|
2536 |
-
'aiosp' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in One SEO Pack</a>',
|
2537 |
-
'squirrly_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/squirrly-seo/">Squirrly SEO</a>',
|
2538 |
-
'wp_recipe_maker' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-recipe-maker/">WP Recipe Maker</a>',
|
2539 |
-
'wp_ultimate_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-ultimate-recipe/">WP Ultimate Recipe</a>',
|
2540 |
-
'learn_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/learnpress/">Learn Press</a>',
|
2541 |
-
'learn_dash' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.learndash.com/pricing-and-purchase/">Learn Dash</a>',
|
2542 |
-
'lifter_lms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/lifterlms/">LifterLMS</a>',
|
2543 |
-
'wp_event_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-manager/">WP Event Manager</a>',
|
2544 |
-
'events_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/events-manager/">Events Manager</a>',
|
2545 |
-
'event_calendar_wd' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-calendar-wd/">Event Calendar WD</a>',
|
2546 |
-
'event_organiser' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/event-organiser/">Event Organiser</a>',
|
2547 |
-
'modern_events_calendar' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/modern-events-calendar-lite/">Modern Events Calendar Lite</a>',
|
2548 |
-
'flex_mls_idx' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/flexmls-idx/">FlexMLS IDX</a>',
|
2549 |
-
'woocommerce_membership' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Membership</a>',
|
2550 |
-
'woocommerce_bookings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Bookings</a>',
|
2551 |
-
'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
|
2552 |
-
'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
|
2553 |
-
'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
|
2554 |
-
'jannah' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
|
2555 |
-
'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
|
2556 |
-
'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
|
2557 |
-
'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
|
2558 |
-
'ht_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/culinier-food-recipe-wordpress-theme/11088564/">HT-Recipes</a>',
|
2559 |
-
'easy_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easy-testimonials">Easy Testimonials</a>',
|
2560 |
-
'bne_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bne-testimonials/">BNE Testimonials</a>',
|
2561 |
-
'testimonial_pro' => esc_html__('Testimonial Pro','schema-and-structured-data-for-wp').' <a target="_blank" href="https://shapedplugin.com/plugin/testimonial-pro/">Testimonial Pro</a>'
|
2562 |
-
|
2563 |
-
);
|
2564 |
-
|
2565 |
-
$active = saswp_compatible_active_list();
|
2566 |
-
|
2567 |
-
if(!isset($active[$pname])){
|
2568 |
-
|
2569 |
-
return $notes[$pname];
|
2570 |
-
|
2571 |
-
}
|
2572 |
-
|
2573 |
-
}
|
1271 |
|
1272 |
</ul>
|
1273 |
<?php
|
1274 |
+
echo '<h2>'.esc_html__('Import / Export','schema-and-structured-data-for-wp').'</h2>';
|
1275 |
+
$url = wp_nonce_url(admin_url('admin-ajax.php?action=saswp_export_all_settings_and_schema'), '_wpnonce');
|
1276 |
?>
|
1277 |
<ul>
|
1278 |
<li>
|
2167 |
'name' => 'sd_data[saswp-testimonial-pro]',
|
2168 |
)
|
2169 |
);
|
2170 |
+
$strong_testimonials = array(
|
2171 |
+
'label' => 'Strong Testimonials',
|
2172 |
+
'id' => 'saswp-strong-testimonials-checkbox',
|
2173 |
+
'name' => 'saswp-strong-testimonials-checkbox',
|
2174 |
+
'type' => 'checkbox',
|
2175 |
+
'class' => 'checkbox saswp-checkbox',
|
2176 |
+
'note' => saswp_get_field_note('strong_testimonials'),
|
2177 |
+
'hidden' => array(
|
2178 |
+
'id' => 'saswp-strong-testimonials',
|
2179 |
+
'name' => 'sd_data[saswp-strong-testimonials]',
|
2180 |
+
)
|
2181 |
+
);
|
2182 |
+
$WordLift = array(
|
2183 |
+
'label' => 'WordLift',
|
2184 |
+
'id' => 'saswp-wordlift-checkbox',
|
2185 |
+
'name' => 'saswp-wordlift-checkbox',
|
2186 |
+
'type' => 'checkbox',
|
2187 |
+
'class' => 'checkbox saswp-checkbox',
|
2188 |
+
'note' => saswp_get_field_note('wordlift'),
|
2189 |
+
'hidden' => array(
|
2190 |
+
'id' => 'saswp-wordlift',
|
2191 |
+
'name' => 'sd_data[saswp-wordlift]',
|
2192 |
+
)
|
2193 |
+
);
|
2194 |
|
2195 |
$flex_lmx = array(
|
2196 |
'label' => 'FlexMLS IDX Plugin',
|
2296 |
$easy_testimonials,
|
2297 |
$bne_testimonials,
|
2298 |
$testimonial_pro,
|
2299 |
+
// $strong_testimonials,
|
2300 |
+
$WordLift,
|
2301 |
$flex_lmx
|
2302 |
|
2303 |
);
|
2447 |
<br>
|
2448 |
<span class="saswp-query-success saswp_hide"><?php echo esc_html__('Message sent successfully, Please wait we will get back to you shortly', 'schema-and-structured-data-for-wp'); ?></span>
|
2449 |
<span class="saswp-query-error saswp_hide"><?php echo esc_html__('Message not sent. please check your network connection', 'schema-and-structured-data-for-wp'); ?></span>
|
2450 |
+
</li>
|
2451 |
+
<li>
|
2452 |
+
<strong><?php echo esc_html__('Are you a premium customer ?', 'schema-and-structured-data-for-wp'); ?></strong>
|
2453 |
+
<select id="saswp_query_premium_cus" name="saswp_query_premium_cus">
|
2454 |
+
<option value=""><?php echo esc_html__('Select', 'schema-and-structured-data-for-wp'); ?></option>
|
2455 |
+
<option value="yes"><?php echo esc_html__('Yes', 'schema-and-structured-data-for-wp'); ?></option>
|
2456 |
+
<option value="no"><?php echo esc_html__('No', 'schema-and-structured-data-for-wp'); ?></option>
|
2457 |
+
</select>
|
2458 |
+
</li>
|
2459 |
<li><button class="button saswp-send-query"><?php echo esc_html__('Send Message', 'schema-and-structured-data-for-wp'); ?></button></li>
|
2460 |
</ul>
|
2461 |
|
2546 |
wp_style_add_data( 'saswp-main-css', 'rtl', 'replace' );
|
2547 |
|
2548 |
}
|
2549 |
+
add_action( 'admin_enqueue_scripts', 'saswp_enqueue_style_js' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin_section/structure_admin.php
CHANGED
@@ -630,7 +630,7 @@ if(is_admin()){
|
|
630 |
|
631 |
function saswp_select_callback($post) {
|
632 |
|
633 |
-
$data_group_array =
|
634 |
$data_group_array = is_array($data_group_array)? array_values($data_group_array): array();
|
635 |
|
636 |
if ( empty( $data_group_array ) ) {
|
@@ -1274,23 +1274,32 @@ function saswp_send_query_message(){
|
|
1274 |
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
1275 |
return;
|
1276 |
}
|
|
|
|
|
|
|
|
|
1277 |
|
1278 |
-
$
|
1279 |
-
|
|
|
1280 |
|
1281 |
-
$message =
|
|
|
|
|
1282 |
|
1283 |
if($user){
|
1284 |
|
1285 |
$user_data = $user->data;
|
1286 |
$user_email = $user_data->user_email;
|
1287 |
//php mailer variables
|
1288 |
-
$sendto
|
1289 |
-
$subject
|
1290 |
-
|
1291 |
-
'
|
|
|
|
|
1292 |
// Load WP components, no themes.
|
1293 |
-
$sent = wp_mail($sendto, $subject,
|
1294 |
|
1295 |
if($sent){
|
1296 |
|
@@ -1303,9 +1312,8 @@ function saswp_send_query_message(){
|
|
1303 |
}
|
1304 |
|
1305 |
}
|
1306 |
-
|
1307 |
-
|
1308 |
-
wp_die();
|
1309 |
}
|
1310 |
|
1311 |
add_action('wp_ajax_saswp_send_query_message', 'saswp_send_query_message');
|
630 |
|
631 |
function saswp_select_callback($post) {
|
632 |
|
633 |
+
$data_group_array = get_post_meta($post->ID, 'data_group_array', true );
|
634 |
$data_group_array = is_array($data_group_array)? array_values($data_group_array): array();
|
635 |
|
636 |
if ( empty( $data_group_array ) ) {
|
1274 |
if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
|
1275 |
return;
|
1276 |
}
|
1277 |
+
$customer_type = 'Are you a premium customer ? No';
|
1278 |
+
$message = sanitize_textarea_field($_POST['message']);
|
1279 |
+
$premium_cus = sanitize_textarea_field($_POST['premium_cus']);
|
1280 |
+
$user = wp_get_current_user();
|
1281 |
|
1282 |
+
if($premium_cus == 'yes'){
|
1283 |
+
$customer_type = 'Are you a premium customer ? Yes';
|
1284 |
+
}
|
1285 |
|
1286 |
+
$message = '<p>'.$message.'</p><br><br>'
|
1287 |
+
. $customer_type
|
1288 |
+
. '<br><br>'.'Query from plugin support tab';
|
1289 |
|
1290 |
if($user){
|
1291 |
|
1292 |
$user_data = $user->data;
|
1293 |
$user_email = $user_data->user_email;
|
1294 |
//php mailer variables
|
1295 |
+
$sendto = 'team@magazine3.com';
|
1296 |
+
$subject = "Schema Customer Query";
|
1297 |
+
|
1298 |
+
$headers[] = 'Content-Type: text/html; charset=UTF-8';
|
1299 |
+
$headers[] = 'From: '. esc_attr($user_email);
|
1300 |
+
$headers[] = 'Reply-To: ' . esc_attr($user_email);
|
1301 |
// Load WP components, no themes.
|
1302 |
+
$sent = wp_mail($sendto, $subject, $message, $headers);
|
1303 |
|
1304 |
if($sent){
|
1305 |
|
1312 |
}
|
1313 |
|
1314 |
}
|
1315 |
+
|
1316 |
+
wp_die();
|
|
|
1317 |
}
|
1318 |
|
1319 |
add_action('wp_ajax_saswp_send_query_message', 'saswp_send_query_message');
|
core/array-list/compatibility-list.php
CHANGED
@@ -4,6 +4,18 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
4 |
|
5 |
return array(
|
6 |
'plugins' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
'ampforwp' => array(
|
8 |
'name' => 'AMPforWP',
|
9 |
'free' => 'accelerated-mobile-pages/accelerated-moblie-pages.php',
|
4 |
|
5 |
return array(
|
6 |
'plugins' => array(
|
7 |
+
'strong_testimonials' => array(
|
8 |
+
'name' => 'Strong Testimonials',
|
9 |
+
'free' => 'strong-testimonials/strong-testimonials.php',
|
10 |
+
'opt_name' => 'saswp-strong-testimonials',
|
11 |
+
'part_in' => 'free',
|
12 |
+
),
|
13 |
+
'wordlift' => array(
|
14 |
+
'name' => 'WordLift',
|
15 |
+
'free' => 'wordlift/wordlift.php',
|
16 |
+
'opt_name' => 'saswp-wordlift',
|
17 |
+
'part_in' => 'free',
|
18 |
+
),
|
19 |
'ampforwp' => array(
|
20 |
'name' => 'AMPforWP',
|
21 |
'free' => 'accelerated-mobile-pages/accelerated-moblie-pages.php',
|
core/array-list/schema-properties.php
CHANGED
@@ -703,9 +703,9 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
703 |
),
|
704 |
array(
|
705 |
'label' => 'Organization Logo',
|
706 |
-
'id'
|
707 |
-
'type'
|
708 |
-
'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
|
709 |
),
|
710 |
array(
|
711 |
'label' => 'Speakable',
|
703 |
),
|
704 |
array(
|
705 |
'label' => 'Organization Logo',
|
706 |
+
'id' => 'saswp_article_organization_logo_'.$schema_id,
|
707 |
+
'type' => 'media',
|
708 |
+
'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
|
709 |
),
|
710 |
array(
|
711 |
'label' => 'Speakable',
|
core/queries_function.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
function saswp_post_exists($id){
|
8 |
+
|
9 |
+
global $wpdb;
|
10 |
+
$post_exists = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE id = '" . $id . "'", 'ARRAY_A');
|
11 |
+
return $post_exists;
|
12 |
+
|
13 |
+
}
|
modules/reviews/reviews_collection.php
CHANGED
@@ -243,21 +243,27 @@ class SASWP_Reviews_Collection {
|
|
243 |
|
244 |
$collection = array();
|
245 |
$total_collection = array();
|
|
|
246 |
$dots = $f_interval = $f_visibility = $arrow = 1;
|
247 |
-
$g_type = '';
|
248 |
|
249 |
$collection_data = get_post_meta($attr['id'], $key='', true);
|
250 |
|
251 |
-
$
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
|
255 |
if(isset($collection_data['saswp_gallery_arrow'][0])){
|
256 |
|
257 |
$arrow = $collection_data['saswp_gallery_arrow'][0];
|
258 |
}
|
259 |
-
|
260 |
-
|
261 |
if(isset($collection_data['saswp_gallery_dots'][0])){
|
262 |
$dots = $collection_data['saswp_gallery_dots'][0];
|
263 |
}
|
@@ -274,9 +280,14 @@ class SASWP_Reviews_Collection {
|
|
274 |
$f_visibility = $collection_data['saswp_fomo_visibility'][0];
|
275 |
}
|
276 |
|
277 |
-
$
|
278 |
-
|
|
|
279 |
|
|
|
|
|
|
|
|
|
280 |
if($platform_id){
|
281 |
|
282 |
foreach ($platform_id as $key => $val){
|
243 |
|
244 |
$collection = array();
|
245 |
$total_collection = array();
|
246 |
+
$platform_id = array();
|
247 |
$dots = $f_interval = $f_visibility = $arrow = 1;
|
248 |
+
$g_type = $design = $cols = $sorting = '';
|
249 |
|
250 |
$collection_data = get_post_meta($attr['id'], $key='', true);
|
251 |
|
252 |
+
if(isset($collection_data['saswp_collection_design'][0])){
|
253 |
+
$design = $collection_data['saswp_collection_design'][0];
|
254 |
+
$this->_design = $design;
|
255 |
+
}
|
256 |
+
|
257 |
+
if(isset($collection_data['saswp_collection_cols'][0])){
|
258 |
+
|
259 |
+
$cols = $collection_data['saswp_collection_cols'][0];
|
260 |
+
}
|
261 |
|
262 |
if(isset($collection_data['saswp_gallery_arrow'][0])){
|
263 |
|
264 |
$arrow = $collection_data['saswp_gallery_arrow'][0];
|
265 |
}
|
266 |
+
|
|
|
267 |
if(isset($collection_data['saswp_gallery_dots'][0])){
|
268 |
$dots = $collection_data['saswp_gallery_dots'][0];
|
269 |
}
|
280 |
$f_visibility = $collection_data['saswp_fomo_visibility'][0];
|
281 |
}
|
282 |
|
283 |
+
if(isset($collection_data['saswp_collection_sorting'][0])){
|
284 |
+
$sorting = $collection_data['saswp_collection_sorting'][0];
|
285 |
+
}
|
286 |
|
287 |
+
if(isset($collection_data['saswp_platform_ids'][0])){
|
288 |
+
$platform_id = unserialize($collection_data['saswp_platform_ids'][0]);
|
289 |
+
}
|
290 |
+
|
291 |
if($platform_id){
|
292 |
|
293 |
foreach ($platform_id as $key => $val){
|
modules/reviews/reviews_form.php
CHANGED
@@ -41,13 +41,17 @@ class SASWP_Reviews_Form {
|
|
41 |
}
|
42 |
|
43 |
public function saswp_review_form_blacklist_sanitizer($data){
|
|
|
|
|
|
|
|
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
return $data;
|
52 |
|
53 |
}
|
@@ -64,124 +68,62 @@ class SASWP_Reviews_Form {
|
|
64 |
return self::$instance;
|
65 |
}
|
66 |
|
|
|
|
|
67 |
public function saswp_save_review_form_data(){
|
68 |
|
69 |
$form_data = $_POST;
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
$rv_link = $form_data['saswp_review_link'];
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
$rv_link = ampforwp_url_controller($rv_link);
|
78 |
-
|
79 |
-
header("access-control-allow-credentials:true");
|
80 |
-
header("access-control-allow-headers:Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token");
|
81 |
-
header("Access-Control-Allow-Origin:".$_SERVER['HTTP_ORIGIN']);
|
82 |
-
$siteUrl = parse_url( get_site_url() );
|
83 |
-
header("AMP-Access-Control-Allow-Source-Origin:".$siteUrl['scheme'] . '://' . $siteUrl['host']);
|
84 |
-
header("Content-Type:application/json;charset=utf-8");
|
85 |
-
|
86 |
-
if(!wp_verify_nonce($form_data['saswp_review_nonce'], 'saswp_review_form')){
|
87 |
-
header("AMP-Redirect-To: ".$rv_link);
|
88 |
-
header("Access-Control-Expose-Headers: AMP-Redirect-To, AMP-Access-Control-Allow-Source-Origin");
|
89 |
-
echo json_decode(array('message'=> 'Nonce MisMatch'));
|
90 |
-
die;
|
91 |
-
}
|
92 |
-
|
93 |
-
}else{
|
94 |
-
|
95 |
-
if(!wp_verify_nonce($form_data['saswp_review_nonce'], 'saswp_review_form')){
|
96 |
-
wp_redirect( $rv_link );
|
97 |
-
exit;
|
98 |
-
}
|
99 |
-
|
100 |
}
|
|
|
|
|
101 |
|
102 |
-
$
|
103 |
-
$postarr = array();
|
104 |
-
|
105 |
-
if(is_user_logged_in()){
|
106 |
-
|
107 |
-
$current_user = wp_get_current_user();
|
108 |
-
$postarr['post_author'] = $current_user->ID;
|
109 |
-
$rv_image = get_avatar_url($current_user->ID, array('size' => 300));
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
$rv_text = sanitize_textarea_field($form_data['saswp_review_text']);
|
114 |
-
$rv_name = sanitize_text_field($form_data['saswp_reviewer_name']);
|
115 |
-
$rv_rating = intval($form_data['saswp_review_rating']);
|
116 |
-
$rv_place_id = intval($form_data['saswp_place_id']);
|
117 |
-
$rv_date = date('Y-m-d');
|
118 |
-
$rv_time = date("h:i:sa");
|
119 |
-
|
120 |
-
if($rv_rating){
|
121 |
-
|
122 |
-
$postarr = array(
|
123 |
-
'post_title' => $rv_name,
|
124 |
-
'post_status' => 'pending',
|
125 |
-
'post_name' => $rv_name,
|
126 |
-
'post_type' => 'saswp_reviews',
|
127 |
-
|
128 |
-
);
|
129 |
-
|
130 |
-
$post_id = wp_insert_post( $postarr );
|
131 |
-
|
132 |
-
$term = get_term_by( 'slug','self', 'platform' );
|
133 |
-
|
134 |
-
if($rv_image){
|
135 |
-
|
136 |
-
$image_details = saswp_get_attachment_details($rv_image);
|
137 |
|
138 |
-
$
|
139 |
-
|
140 |
-
|
141 |
-
'
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
$review_meta = array(
|
147 |
-
'saswp_review_platform' => $term->term_id,
|
148 |
-
'saswp_review_location_id' => $rv_place_id,
|
149 |
-
'saswp_review_time' => $rv_time,
|
150 |
-
'saswp_review_date' => $rv_date,
|
151 |
-
'saswp_review_rating' => $rv_rating,
|
152 |
-
'saswp_review_text' => $rv_text,
|
153 |
-
'saswp_reviewer_lang' => null,
|
154 |
-
'saswp_reviewer_name' => $rv_name,
|
155 |
-
'saswp_review_link' => $rv_link,
|
156 |
-
'saswp_reviewer_image' => $rv_image ? $rv_image : SASWP_DIR_URI.'/admin_section/images/default_user.jpg',
|
157 |
-
'saswp_reviewer_image_detail' => $media_detail
|
158 |
-
);
|
159 |
-
|
160 |
-
if($post_id && !empty($review_meta) && is_array($review_meta)){
|
161 |
-
|
162 |
-
foreach ($review_meta as $key => $val){
|
163 |
-
update_post_meta($post_id, $key, $val);
|
164 |
}
|
165 |
-
|
166 |
-
}
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
-
}
|
183 |
-
|
184 |
-
|
|
|
185 |
}
|
186 |
|
187 |
}
|
41 |
}
|
42 |
|
43 |
public function saswp_review_form_blacklist_sanitizer($data){
|
44 |
+
|
45 |
+
if(function_exists('ampforwp_is_amp_endpoint')){
|
46 |
+
|
47 |
+
require_once SASWP_PLUGIN_DIR_PATH .'core/3rd-party/class-amp-review-form-blacklist.php';
|
48 |
|
49 |
+
unset($data['AMPFORWP_Blacklist_Sanitizer']);
|
50 |
+
unset($data['AMP_Blacklist_Sanitizer']);
|
51 |
+
$data[ 'AMP_Review_Form_Blacklist' ] = array();
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
return $data;
|
56 |
|
57 |
}
|
68 |
return self::$instance;
|
69 |
}
|
70 |
|
71 |
+
|
72 |
+
|
73 |
public function saswp_save_review_form_data(){
|
74 |
|
75 |
$form_data = $_POST;
|
76 |
|
77 |
+
$headers = getallheaders();
|
78 |
+
$is_amp = false;
|
79 |
+
$rv_link = $form_data['saswp_review_link'];
|
80 |
+
if(isset($headers['AMP-Same-Origin'])){
|
81 |
+
$is_amp = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
+
|
84 |
+
if($form_data['action'] == 'saswp_review_form'){
|
85 |
|
86 |
+
if(!wp_verify_nonce($form_data['saswp_review_nonce'], 'saswp_review_form')){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
+
if($is_amp){
|
89 |
+
header("AMP-Redirect-To: ".$rv_link);
|
90 |
+
header("Access-Control-Expose-Headers: AMP-Redirect-To, AMP-Access-Control-Allow-Source-Origin");
|
91 |
+
echo json_decode(array('message'=> 'Nonce MisMatch'));die;
|
92 |
+
}else{
|
93 |
+
wp_redirect( $rv_link );
|
94 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
|
|
|
|
96 |
|
97 |
+
}
|
98 |
+
|
99 |
+
if($is_amp){
|
100 |
+
|
101 |
+
header("access-control-allow-credentials:true");
|
102 |
+
header("access-control-allow-headers:Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token");
|
103 |
+
header("Access-Control-Allow-Origin:".$_SERVER['HTTP_ORIGIN']);
|
104 |
+
$siteUrl = parse_url( get_site_url() );
|
105 |
+
header("AMP-Access-Control-Allow-Source-Origin:".$siteUrl['scheme'] . '://' . $siteUrl['host']);
|
106 |
+
header("Content-Type:application/json;charset=utf-8");
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
$response = $this->_service->saswp_review_form_process_data($form_data);
|
111 |
+
|
112 |
+
if($response){
|
113 |
+
|
114 |
+
if($is_amp){
|
115 |
+
header("AMP-Redirect-To: ".$rv_link);
|
116 |
+
header("Access-Control-Expose-Headers: AMP-Redirect-To, AMP-Access-Control-Allow-Source-Origin");
|
117 |
+
}else{
|
118 |
+
wp_redirect( $rv_link );
|
119 |
+
exit;
|
120 |
+
}
|
121 |
+
}
|
122 |
|
123 |
+
}
|
124 |
+
|
125 |
+
if($is_amp){
|
126 |
+
wp_die();
|
127 |
}
|
128 |
|
129 |
}
|
modules/reviews/reviews_service.php
CHANGED
@@ -24,6 +24,81 @@ class saswp_reviews_service {
|
|
24 |
add_action ('amp_post_template_footer', array($this, 'saswp_fetched_reviews_schema_markup'),99);
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
public function saswp_fetched_reviews_schema_markup(){
|
28 |
|
29 |
global $sd_data, $saswp_post_reviews;
|
@@ -589,8 +664,13 @@ class saswp_reviews_service {
|
|
589 |
|
590 |
if($term->slug == 'self'){
|
591 |
|
592 |
-
$default_logo = $service_object->saswp_get_publisher(true);
|
593 |
-
|
|
|
|
|
|
|
|
|
|
|
594 |
|
595 |
}else{
|
596 |
$review_data['saswp_review_platform_icon'] = SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png';
|
24 |
add_action ('amp_post_template_footer', array($this, 'saswp_fetched_reviews_schema_markup'),99);
|
25 |
}
|
26 |
|
27 |
+
public function saswp_review_form_process_data($form_data){
|
28 |
+
|
29 |
+
$rv_image = '';
|
30 |
+
$postarr = array();
|
31 |
+
|
32 |
+
if(is_user_logged_in()){
|
33 |
+
|
34 |
+
$current_user = wp_get_current_user();
|
35 |
+
$postarr['post_author'] = $current_user->ID;
|
36 |
+
$rv_image = get_avatar_url($current_user->ID, array('size' => 300));
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
$rv_text = sanitize_textarea_field($form_data['saswp_review_text']);
|
41 |
+
$rv_name = sanitize_text_field($form_data['saswp_reviewer_name']);
|
42 |
+
$rv_rating = intval($form_data['saswp_review_rating']);
|
43 |
+
$rv_place_id = intval($form_data['saswp_place_id']);
|
44 |
+
$rv_link = sanitize_text_field($form_data['saswp_review_link']);
|
45 |
+
$rv_date = date('Y-m-d');
|
46 |
+
$rv_time = date("h:i:sa");
|
47 |
+
|
48 |
+
if($rv_rating){
|
49 |
+
|
50 |
+
$postarr = array(
|
51 |
+
'post_title' => $rv_name,
|
52 |
+
'post_status' => 'pending',
|
53 |
+
'post_name' => $rv_name,
|
54 |
+
'post_type' => 'saswp_reviews',
|
55 |
+
|
56 |
+
);
|
57 |
+
|
58 |
+
$post_id = wp_insert_post( $postarr );
|
59 |
+
|
60 |
+
$term = get_term_by( 'slug','self', 'platform' );
|
61 |
+
|
62 |
+
if($rv_image){
|
63 |
+
|
64 |
+
$image_details = saswp_get_attachment_details($rv_image);
|
65 |
+
|
66 |
+
$media_detail = array(
|
67 |
+
'width' => $image_details[0][0],
|
68 |
+
'height' => $image_details[0][1],
|
69 |
+
'thumbnail' => $rv_image,
|
70 |
+
);
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
$review_meta = array(
|
75 |
+
'saswp_review_platform' => $term->term_id,
|
76 |
+
'saswp_review_location_id' => $rv_place_id,
|
77 |
+
'saswp_review_time' => $rv_time,
|
78 |
+
'saswp_review_date' => $rv_date,
|
79 |
+
'saswp_review_rating' => $rv_rating,
|
80 |
+
'saswp_review_text' => $rv_text,
|
81 |
+
'saswp_reviewer_lang' => null,
|
82 |
+
'saswp_reviewer_name' => $rv_name,
|
83 |
+
'saswp_review_link' => $rv_link,
|
84 |
+
'saswp_reviewer_image' => $rv_image ? $rv_image : SASWP_DIR_URI.'/admin_section/images/default_user.jpg',
|
85 |
+
'saswp_reviewer_image_detail' => $media_detail
|
86 |
+
);
|
87 |
+
|
88 |
+
if($post_id && !empty($review_meta) && is_array($review_meta)){
|
89 |
+
|
90 |
+
foreach ($review_meta as $key => $val){
|
91 |
+
update_post_meta($post_id, $key, $val);
|
92 |
+
}
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
return $post_id;
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
public function saswp_fetched_reviews_schema_markup(){
|
103 |
|
104 |
global $sd_data, $saswp_post_reviews;
|
664 |
|
665 |
if($term->slug == 'self'){
|
666 |
|
667 |
+
$default_logo = $service_object->saswp_get_publisher(true);
|
668 |
+
|
669 |
+
if(isset($default_logo['url'])){
|
670 |
+
|
671 |
+
$review_data['saswp_review_platform_icon'] = $default_logo['url'];
|
672 |
+
|
673 |
+
}
|
674 |
|
675 |
}else{
|
676 |
$review_data['saswp_review_platform_icon'] = SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png';
|
modules/reviews/reviews_setup.php
CHANGED
@@ -137,14 +137,17 @@ function saswp_reviews_custom_columns_set( $column, $post_id ) {
|
|
137 |
|
138 |
$service_object = new saswp_output_service();
|
139 |
$default_logo = $service_object->saswp_get_publisher(true);
|
|
|
|
|
140 |
|
141 |
-
|
|
|
|
|
142 |
|
143 |
}else{
|
144 |
echo '<span class="saswp-g-plus"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png'.'" alt="Icon" /></span>';
|
145 |
}
|
146 |
-
|
147 |
-
|
148 |
}
|
149 |
|
150 |
break;
|
137 |
|
138 |
$service_object = new saswp_output_service();
|
139 |
$default_logo = $service_object->saswp_get_publisher(true);
|
140 |
+
|
141 |
+
if(isset($default_logo['url'])){
|
142 |
|
143 |
+
echo '<span class="saswp-g-plus"><img src="'.esc_url($default_logo['url']).'" alt="Icon" /></span>';
|
144 |
+
|
145 |
+
}
|
146 |
|
147 |
}else{
|
148 |
echo '<span class="saswp-g-plus"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png'.'" alt="Icon" /></span>';
|
149 |
}
|
150 |
+
|
|
|
151 |
}
|
152 |
|
153 |
break;
|
modules/reviews/reviews_widget.php
CHANGED
@@ -78,12 +78,12 @@ class Saswp_Reviews_Widget extends WP_Widget {
|
|
78 |
|
79 |
$title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'Review Title', 'schema-and-structured-data-for-wp' );
|
80 |
$ads = ! empty( $instance['g_review'] ) ? $instance['g_review'] : esc_html__( 'review list to be display', 'schema-and-structured-data-for-wp' );?>
|
81 |
-
|
82 |
-
|
83 |
<?php esc_attr_e( 'Reviews :', 'schema-and-structured-data-for-wp' ); ?>
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
<?php
|
88 |
}
|
89 |
|
78 |
|
79 |
$title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'Review Title', 'schema-and-structured-data-for-wp' );
|
80 |
$ads = ! empty( $instance['g_review'] ) ? $instance['g_review'] : esc_html__( 'review list to be display', 'schema-and-structured-data-for-wp' );?>
|
81 |
+
<p>
|
82 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'g_review' ) ); ?>">
|
83 |
<?php esc_attr_e( 'Reviews :', 'schema-and-structured-data-for-wp' ); ?>
|
84 |
+
</label>
|
85 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'g_review' )); ?>" name="<?php echo esc_attr( $this->get_field_name( 'g_review' ) ); ?>" type="text" placeholder="review count" value="<?php echo (isset($instance['g_review']) ? $instance['g_review'] : 5); ?>">
|
86 |
+
</p>
|
87 |
<?php
|
88 |
}
|
89 |
|
output/compatibility.php
CHANGED
@@ -103,6 +103,24 @@ class saswp_output_compatibility{
|
|
103 |
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
public function saswp_soledad_override(){
|
107 |
|
108 |
saswp_remove_anonymous_object_filter_or_action(
|
@@ -133,6 +151,12 @@ class saswp_output_compatibility{
|
|
133 |
|
134 |
}
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
public function saswp_easy_testimonials_override(){
|
137 |
|
138 |
add_filter('easy_testimonials_json_ld', '__return_false');
|
@@ -382,6 +406,12 @@ class saswp_output_compatibility{
|
|
382 |
public function wpamp_on_activation(){
|
383 |
$this->saswp_update_option_on_compatibility_activation('saswp-wpamp');
|
384 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
public function saswp_update_option_on_compatibility_activation($opt_name){
|
386 |
$defaults = get_option('sd_data');
|
387 |
$defaults[$opt_name] = 1;
|
103 |
|
104 |
}
|
105 |
|
106 |
+
public function saswp_wordlift_override(){
|
107 |
+
|
108 |
+
saswp_remove_anonymous_object_filter_or_action(
|
109 |
+
'wp_head',
|
110 |
+
'Wordlift_Term_JsonLd_Adapter',
|
111 |
+
'wp_head',
|
112 |
+
'action'
|
113 |
+
);
|
114 |
+
|
115 |
+
saswp_remove_anonymous_object_filter_or_action(
|
116 |
+
'wp_head',
|
117 |
+
'Wordlift_Jsonld_Service',
|
118 |
+
'wp_head',
|
119 |
+
'action'
|
120 |
+
);
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
public function saswp_soledad_override(){
|
125 |
|
126 |
saswp_remove_anonymous_object_filter_or_action(
|
151 |
|
152 |
}
|
153 |
|
154 |
+
public function saswp_strong_testimonials_override(){
|
155 |
+
|
156 |
+
//code to be written
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
public function saswp_easy_testimonials_override(){
|
161 |
|
162 |
add_filter('easy_testimonials_json_ld', '__return_false');
|
406 |
public function wpamp_on_activation(){
|
407 |
$this->saswp_update_option_on_compatibility_activation('saswp-wpamp');
|
408 |
}
|
409 |
+
public function wordlift_on_activation(){
|
410 |
+
$this->saswp_update_option_on_compatibility_activation('saswp-wordlift');
|
411 |
+
}
|
412 |
+
public function strong_testimonials_on_activation(){
|
413 |
+
$this->saswp_update_option_on_compatibility_activation('saswp-strong-testimonials');
|
414 |
+
}
|
415 |
public function saswp_update_option_on_compatibility_activation($opt_name){
|
416 |
$defaults = get_option('sd_data');
|
417 |
$defaults[$opt_name] = 1;
|
output/function.php
CHANGED
@@ -1314,6 +1314,12 @@ function saswp_get_bne_testimonials_data($atts, $testimo_str){
|
|
1314 |
|
1315 |
}
|
1316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1317 |
function saswp_get_testomonial_pro(){
|
1318 |
|
1319 |
$testimonial = array();
|
1314 |
|
1315 |
}
|
1316 |
|
1317 |
+
function saswp_get_strong_testimonials(){
|
1318 |
+
|
1319 |
+
//tomorrow will do it
|
1320 |
+
|
1321 |
+
}
|
1322 |
+
|
1323 |
function saswp_get_testomonial_pro(){
|
1324 |
|
1325 |
$testimonial = array();
|
output/output.php
CHANGED
@@ -413,7 +413,11 @@ function saswp_schema_output() {
|
|
413 |
$input1['@id'] = trailingslashit(get_permalink()).'#Book';
|
414 |
|
415 |
$service = new saswp_output_service();
|
416 |
-
$
|
|
|
|
|
|
|
|
|
417 |
|
418 |
unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8']);
|
419 |
|
@@ -762,9 +766,13 @@ function saswp_schema_output() {
|
|
762 |
'author' => saswp_get_author_details()
|
763 |
);
|
764 |
|
765 |
-
$service
|
766 |
-
$
|
767 |
-
|
|
|
|
|
|
|
|
|
768 |
unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8']);
|
769 |
|
770 |
if(!empty($publisher)){
|
@@ -1345,6 +1353,23 @@ function saswp_schema_output() {
|
|
1345 |
}
|
1346 |
|
1347 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1348 |
|
1349 |
}
|
1350 |
|
@@ -1493,6 +1518,8 @@ function saswp_woocommerce_category_schema(){
|
|
1493 |
$service = new saswp_output_service();
|
1494 |
$category_loop = new WP_Query( $query_string );
|
1495 |
|
|
|
|
|
1496 |
$i = 1;
|
1497 |
|
1498 |
if ( $category_loop->have_posts() ):
|
@@ -1501,8 +1528,14 @@ function saswp_woocommerce_category_schema(){
|
|
1501 |
$category_posts = array();
|
1502 |
$category_posts['@type'] = 'ListItem';
|
1503 |
$category_posts['position'] = $i;
|
1504 |
-
$category_posts['item'] = $service->saswp_schema_markup_generator('Product');
|
1505 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
unset($category_posts['item']['@id']);
|
1507 |
unset($category_posts['item']['@context']);
|
1508 |
$list_item[] = $category_posts;
|
@@ -1581,7 +1614,7 @@ function saswp_archive_output(){
|
|
1581 |
if(isset($sd_data['sd_default_image'])){
|
1582 |
|
1583 |
$archive_image['@type'] = 'ImageObject';
|
1584 |
-
$archive_image['url'] = esc_url($sd_data['sd_default_image']['url']);
|
1585 |
$archive_image['width'] = esc_attr($sd_data['sd_default_image_width']);
|
1586 |
$archive_image['height'] = esc_attr($sd_data['sd_default_image_height']);
|
1587 |
}
|
413 |
$input1['@id'] = trailingslashit(get_permalink()).'#Book';
|
414 |
|
415 |
$service = new saswp_output_service();
|
416 |
+
$woo_markp = $service->saswp_schema_markup_generator($schema_type);
|
417 |
+
|
418 |
+
if($woo_markp){
|
419 |
+
$input1 = array_merge($input1, $woo_markp);
|
420 |
+
}
|
421 |
|
422 |
unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8']);
|
423 |
|
766 |
'author' => saswp_get_author_details()
|
767 |
);
|
768 |
|
769 |
+
$service = new saswp_output_service();
|
770 |
+
$woo_markp = $service->saswp_schema_markup_generator($schema_type);
|
771 |
+
|
772 |
+
if($woo_markp){
|
773 |
+
$input1 = array_merge($input1, $woo_markp);
|
774 |
+
}
|
775 |
+
|
776 |
unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8']);
|
777 |
|
778 |
if(!empty($publisher)){
|
1353 |
}
|
1354 |
|
1355 |
}
|
1356 |
+
|
1357 |
+
|
1358 |
+
// Testomonial Pro
|
1359 |
+
$strong_testimonials = saswp_get_strong_testimonials();
|
1360 |
+
|
1361 |
+
if($strong_testimonials){
|
1362 |
+
|
1363 |
+
$input1 = array_merge($input1,$strong_testimonials['rating']);
|
1364 |
+
|
1365 |
+
if(isset($input1['review'])){
|
1366 |
+
$input1 = array_merge($input1['review'],$strong_testimonials['reviews']);
|
1367 |
+
}else{
|
1368 |
+
$input1['review'] = $strong_testimonials['reviews'];
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
}
|
1372 |
+
|
1373 |
|
1374 |
}
|
1375 |
|
1518 |
$service = new saswp_output_service();
|
1519 |
$category_loop = new WP_Query( $query_string );
|
1520 |
|
1521 |
+
$current_url = saswp_get_current_url();
|
1522 |
+
|
1523 |
$i = 1;
|
1524 |
|
1525 |
if ( $category_loop->have_posts() ):
|
1528 |
$category_posts = array();
|
1529 |
$category_posts['@type'] = 'ListItem';
|
1530 |
$category_posts['position'] = $i;
|
1531 |
+
$category_posts['item'] = $service->saswp_schema_markup_generator('Product');
|
1532 |
+
|
1533 |
+
if(saswp_has_slash($current_url)){
|
1534 |
+
$category_posts['item']['url'] = trailingslashit(saswp_get_category_link($term->term_id)). "#product_".$i;
|
1535 |
+
}else{
|
1536 |
+
$category_posts['item']['url'] = saswp_remove_slash(saswp_get_category_link($term->term_id)). "#product_".$i;
|
1537 |
+
}
|
1538 |
+
|
1539 |
unset($category_posts['item']['@id']);
|
1540 |
unset($category_posts['item']['@context']);
|
1541 |
$list_item[] = $category_posts;
|
1614 |
if(isset($sd_data['sd_default_image'])){
|
1615 |
|
1616 |
$archive_image['@type'] = 'ImageObject';
|
1617 |
+
$archive_image['url'] = isset($sd_data['sd_default_image']['url']) ? esc_url($sd_data['sd_default_image']['url']):'';
|
1618 |
$archive_image['width'] = esc_attr($sd_data['sd_default_image_width']);
|
1619 |
$archive_image['height'] = esc_attr($sd_data['sd_default_image_height']);
|
1620 |
}
|
output/service.php
CHANGED
@@ -2783,7 +2783,7 @@ Class saswp_output_service{
|
|
2783 |
$input1 = array(
|
2784 |
'@context' => saswp_context_url(),
|
2785 |
'@type' => $schema_type,
|
2786 |
-
'@id' => trailingslashit(saswp_get_permalink()).'#
|
2787 |
'url' => trailingslashit(saswp_get_permalink()),
|
2788 |
'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
|
2789 |
'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
|
@@ -2861,8 +2861,8 @@ Class saswp_output_service{
|
|
2861 |
}else{
|
2862 |
|
2863 |
$input1['@context'] = saswp_context_url();
|
2864 |
-
$input1['@type'] =
|
2865 |
-
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#
|
2866 |
}
|
2867 |
|
2868 |
if(!isset($input1['review'])){
|
2783 |
$input1 = array(
|
2784 |
'@context' => saswp_context_url(),
|
2785 |
'@type' => $schema_type,
|
2786 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#'.$schema_type,
|
2787 |
'url' => trailingslashit(saswp_get_permalink()),
|
2788 |
'name' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string'),
|
2789 |
'sku' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string'),
|
2861 |
}else{
|
2862 |
|
2863 |
$input1['@context'] = saswp_context_url();
|
2864 |
+
$input1['@type'] = $schema_type;
|
2865 |
+
$input1['@id'] = trailingslashit(saswp_get_permalink()).'#'.$schema_type;
|
2866 |
}
|
2867 |
|
2868 |
if(!isset($input1['review'])){
|
output/single.php
CHANGED
@@ -166,7 +166,7 @@ function saswp_post_specific_schema_output() {
|
|
166 |
|
167 |
if( 'Book' === $schema_type){
|
168 |
|
169 |
-
$input1 = saswp_book_schema_markup($schema_id, $all_post_meta);
|
170 |
|
171 |
$input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
|
172 |
|
@@ -545,6 +545,22 @@ function saswp_post_specific_schema_output() {
|
|
545 |
}
|
546 |
|
547 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
|
549 |
}
|
550 |
|
166 |
|
167 |
if( 'Book' === $schema_type){
|
168 |
|
169 |
+
$input1 = saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta);
|
170 |
|
171 |
$input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
|
172 |
|
545 |
}
|
546 |
|
547 |
}
|
548 |
+
|
549 |
+
// Testomonial Pro
|
550 |
+
$testomonial_pro = saswp_get_testomonial_pro();
|
551 |
+
|
552 |
+
if($testomonial_pro){
|
553 |
+
|
554 |
+
$input1 = array_merge($input1,$testomonial_pro['rating']);
|
555 |
+
|
556 |
+
if(isset($input1['review'])){
|
557 |
+
$input1 = array_merge($input1['review'],$testomonial_pro['reviews']);
|
558 |
+
}else{
|
559 |
+
$input1['review'] = $testomonial_pro['reviews'];
|
560 |
+
}
|
561 |
+
|
562 |
+
}
|
563 |
+
|
564 |
|
565 |
}
|
566 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -118,6 +118,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= 1.9.18 (14 Dec 2019) =
|
122 |
|
123 |
* Major Feature: Added review form to submit user review from the post. Use the shortcode to show form [saswp-reviews-form] #538
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 1.9.19
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.9.19 (18 Dec 2019) =
|
122 |
+
|
123 |
+
* Fixed: Author URL is missing #665
|
124 |
+
* Fixed: SoftwareApplication is being changed to Product schema type #669
|
125 |
+
* Fixed: AMP By Automatic compatibility issue (Image is not visible on post/page when SASWP is activated) #671
|
126 |
+
* Fixed: All values provided for url must point to the same page. #653
|
127 |
+
* Added: Ask if they are a customer in Email sending via Option panel #647
|
128 |
+
* Added: Compatibility with WordLift plugin. #625
|
129 |
+
* Enhancement: Updated Export/Import feature #595
|
130 |
+
|
131 |
= 1.9.18 (14 Dec 2019) =
|
132 |
|
133 |
* Major Feature: Added review form to submit user review from the post. Use the shortcode to show form [saswp-reviews-form] #538
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
@@ -95,6 +95,7 @@ require_once SASWP_DIR_NAME.'/modules/reviews/reviews_collection.php';
|
|
95 |
require_once SASWP_DIR_NAME.'/modules/reviews/reviews_form.php';
|
96 |
require_once SASWP_DIR_NAME.'/core/array-list/schema-properties.php';
|
97 |
require_once SASWP_DIR_NAME.'/core/global.php';
|
|
|
98 |
//Module files load
|
99 |
require_once SASWP_DIR_NAME.'/modules/gutenberg/includes/class-gutenberg.php';
|
100 |
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.19
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
+
define('SASWP_VERSION', '1.9.19');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
95 |
require_once SASWP_DIR_NAME.'/modules/reviews/reviews_form.php';
|
96 |
require_once SASWP_DIR_NAME.'/core/array-list/schema-properties.php';
|
97 |
require_once SASWP_DIR_NAME.'/core/global.php';
|
98 |
+
require_once SASWP_DIR_NAME.'/core/queries_function.php';
|
99 |
//Module files load
|
100 |
require_once SASWP_DIR_NAME.'/modules/gutenberg/includes/class-gutenberg.php';
|
101 |
|