All In One Schema Rich Snippets - Version 1.5.5

Version Description

  • Fix: Schema markup displayed before the post content or hidden when page content is built using a page builder plugin.
Download this release

Release Info

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

Code changes from version 1.5.4 to 1.5.5

Files changed (3) hide show
  1. functions.php +13 -93
  2. index.php +5 -3
  3. readme.txt +5 -2
functions.php CHANGED
@@ -111,14 +111,7 @@ function display_rich_snippet($content) {
111
  $review .= "</div>
112
  </div><div style='clear:both;'></div>";
113
 
114
- if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
115
- {
116
- if( is_single() || is_page() )
117
- {
118
- echo $review;
119
- }
120
- }
121
- else { return ( is_single() || is_page() ) ? $content.$review : $content; }
122
  }
123
  else if($type == '2')
124
  {
@@ -224,15 +217,7 @@ function display_rich_snippet($content) {
224
  <meta itemprop="description" content="Event">
225
  <div class="snippet-clear"></div>';
226
 
227
- if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
228
- {
229
- if( is_single() || is_page() )
230
- {
231
- echo $event;
232
- }
233
-
234
- }
235
- else { return ( is_single() || is_page() ) ? $content.$event : $content; }
236
  }
237
  else if($type == '4')
238
  {
@@ -282,15 +267,7 @@ function display_rich_snippet($content) {
282
  </span>';
283
  $organization .= '</div><div style="clear:both;"></div>';
284
 
285
- if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
286
- {
287
- if( is_single() || is_page() )
288
- {
289
- echo $organization;
290
- }
291
-
292
- }
293
- else { return ( is_single() || is_page() ) ? $content.$organization : $content; }
294
  }
295
  else if($type == '5')
296
  {
@@ -389,14 +366,7 @@ function display_rich_snippet($content) {
389
  }
390
  $people .= '</div>
391
  </div></div><div class="snippet-clear"></div>';
392
- if ( class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
393
- {
394
- if( is_single() || is_page() )
395
- {
396
- echo $people;
397
- }
398
- }
399
- else { return ( is_single() || is_page() ) ? $content.$people : $content; }
400
  }
401
  else if($type == '6')
402
  {
@@ -498,15 +468,7 @@ function display_rich_snippet($content) {
498
  $product .= '</div>
499
  </div></div><div class="snippet-clear"></div>';
500
 
501
- if ( class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
502
- {
503
- if( is_single() || is_page() )
504
- {
505
- echo $product;
506
- }
507
-
508
- }
509
- else { return ( is_single() || is_page() ) ? $content.$product : $content; }
510
  }
511
  else if($type == '7')
512
  {
@@ -605,15 +567,7 @@ function display_rich_snippet($content) {
605
  $recipe .= '</div>
606
  </div></div><div class="snippet-clear"></div>';
607
 
608
- if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
609
- {
610
- if( is_single() || is_page() )
611
- {
612
- echo $recipe;
613
- }
614
-
615
- }
616
- else { return ( is_single() || is_page() ) ? $content.$recipe : $content; }
617
  }
618
  else if($type == '8')
619
  {
@@ -717,15 +671,7 @@ function display_rich_snippet($content) {
717
  $software .= '</div>
718
  </div></div><div class="snippet-clear"></div>';
719
 
720
- if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
721
- {
722
- if( is_single() || is_page() )
723
- {
724
- echo $software;
725
- }
726
-
727
- }
728
- else { return ( is_single() || is_page() ) ? $content.$software : $content; }
729
  }
730
  else if($type == '9')
731
  {
@@ -790,15 +736,7 @@ function display_rich_snippet($content) {
790
  $video .= '</div>
791
  </div></div><div class="snippet-clear"></div>';
792
 
793
- if ( class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
794
- {
795
- if( is_single() || is_page() )
796
- {
797
- echo $video;
798
- }
799
-
800
- }
801
- else { return ( is_single() || is_page() ) ? $content.$video : $content; }
802
  }
803
  else if($type == '10')
804
  {
@@ -901,15 +839,7 @@ function display_rich_snippet($content) {
901
  </div></div><div class="snippet-clear"></div>';
902
 
903
 
904
- if ( class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
905
- {
906
- if( is_single() || is_page() )
907
- {
908
- echo $article;
909
- }
910
- }
911
-
912
- else { return ( is_single() || is_page() ) ? $content.$article : $content; }
913
  }else if($type == '11')
914
  {
915
  global $post;
@@ -1038,25 +968,15 @@ function display_rich_snippet($content) {
1038
 
1039
  $service .= '</div></div></div><div class="snippet-clear"></div>';
1040
 
1041
- if ( class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled() )
1042
- {
1043
- if( is_single() || is_page() )
1044
- {
1045
- echo $service;
1046
- }
1047
-
1048
- }
1049
- else { return ( is_single() || is_page() ) ? $content.$service : $content; }
1050
  }
1051
  else {
1052
  return $content;
1053
  }
1054
  }
1055
- if ( class_exists( 'FLBuilderLoader' ) )
1056
- {
1057
- add_filter('fl_builder_after_render_content','display_rich_snippet');
1058
- }
1059
- else{ add_filter('the_content','display_rich_snippet'); }
1060
 
1061
 
1062
  require_once(plugin_dir_path( __FILE__ ).'meta-boxes.php');
111
  $review .= "</div>
112
  </div><div style='clear:both;'></div>";
113
 
114
+ return ( is_single() || is_page() ) ? $content.$review : $content;
 
 
 
 
 
 
 
115
  }
116
  else if($type == '2')
117
  {
217
  <meta itemprop="description" content="Event">
218
  <div class="snippet-clear"></div>';
219
 
220
+ return ( is_single() || is_page() ) ? $content.$event : $content;
 
 
 
 
 
 
 
 
221
  }
222
  else if($type == '4')
223
  {
267
  </span>';
268
  $organization .= '</div><div style="clear:both;"></div>';
269
 
270
+ return ( is_single() || is_page() ) ? $content.$organization : $content;
 
 
 
 
 
 
 
 
271
  }
272
  else if($type == '5')
273
  {
366
  }
367
  $people .= '</div>
368
  </div></div><div class="snippet-clear"></div>';
369
+ return ( is_single() || is_page() ) ? $content.$people : $content;
 
 
 
 
 
 
 
370
  }
371
  else if($type == '6')
372
  {
468
  $product .= '</div>
469
  </div></div><div class="snippet-clear"></div>';
470
 
471
+ return ( is_single() || is_page() ) ? $content.$product : $content;
 
 
 
 
 
 
 
 
472
  }
473
  else if($type == '7')
474
  {
567
  $recipe .= '</div>
568
  </div></div><div class="snippet-clear"></div>';
569
 
570
+ return ( is_single() || is_page() ) ? $content.$recipe : $content;
 
 
 
 
 
 
 
 
571
  }
572
  else if($type == '8')
573
  {
671
  $software .= '</div>
672
  </div></div><div class="snippet-clear"></div>';
673
 
674
+ return ( is_single() || is_page() ) ? $content.$software : $content;
 
 
 
 
 
 
 
 
675
  }
676
  else if($type == '9')
677
  {
736
  $video .= '</div>
737
  </div></div><div class="snippet-clear"></div>';
738
 
739
+ return ( is_single() || is_page() ) ? $content.$video : $content;
 
 
 
 
 
 
 
 
740
  }
741
  else if($type == '10')
742
  {
839
  </div></div><div class="snippet-clear"></div>';
840
 
841
 
842
+ return ( is_single() || is_page() ) ? $content.$article : $content;
 
 
 
 
 
 
 
 
843
  }else if($type == '11')
844
  {
845
  global $post;
968
 
969
  $service .= '</div></div></div><div class="snippet-clear"></div>';
970
 
971
+ return ( is_single() || is_page() ) ? $content.$service : $content;
 
 
 
 
 
 
 
 
972
  }
973
  else {
974
  return $content;
975
  }
976
  }
977
+
978
+
979
+ add_filter('the_content','display_rich_snippet', 90);
 
 
980
 
981
 
982
  require_once(plugin_dir_path( __FILE__ ).'meta-boxes.php');
index.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.brainstormforce.com
5
  Author: Brainstorm Force
6
  Author URI: https://www.brainstormforce.com
7
  Description: Welcome to the All In One Schema Rich Snippet! You can now easily add schema markup on various pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services etc.
8
- Version: 1.5.4
9
  Text Domain: rich-snippets
10
  License: GPL2
11
  */
@@ -93,7 +93,8 @@ if ( !class_exists( "RichSnippets" ) )
93
  wp_enqueue_style( 'star_style' );
94
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js','', '0.9.1' );
95
  wp_enqueue_script( 'bsf-scripts' );
96
- wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery', 'media-upload', 'media-editor' ), '1.0' );
 
97
  wp_enqueue_script( 'bsf-scripts-media' );
98
  wp_enqueue_script('jquery-ui-datepicker');
99
  if(!function_exists('vc_map'))
@@ -112,7 +113,8 @@ if ( !class_exists( "RichSnippets" ) )
112
  wp_enqueue_style( 'star_style' );
113
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
114
  wp_enqueue_script( 'bsf-scripts' );
115
- wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery', 'media-upload', 'media-editor' ), '1.0' );
 
116
  wp_enqueue_script( 'bsf-scripts-media' );
117
  wp_enqueue_script('jquery-ui-datepicker');
118
  if(!function_exists('vc_map'))
5
  Author: Brainstorm Force
6
  Author URI: https://www.brainstormforce.com
7
  Description: Welcome to the All In One Schema Rich Snippet! You can now easily add schema markup on various pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services etc.
8
+ Version: 1.5.5
9
  Text Domain: rich-snippets
10
  License: GPL2
11
  */
93
  wp_enqueue_style( 'star_style' );
94
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js','', '0.9.1' );
95
  wp_enqueue_script( 'bsf-scripts' );
96
+ wp_enqueue_media();
97
+ wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
98
  wp_enqueue_script( 'bsf-scripts-media' );
99
  wp_enqueue_script('jquery-ui-datepicker');
100
  if(!function_exists('vc_map'))
113
  wp_enqueue_style( 'star_style' );
114
  wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
115
  wp_enqueue_script( 'bsf-scripts' );
116
+ wp_enqueue_media();
117
+ wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
118
  wp_enqueue_script( 'bsf-scripts-media' );
119
  wp_enqueue_script('jquery-ui-datepicker');
120
  if(!function_exists('vc_map'))
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce, yawalkarm
3
  Donate link: https://www.brainstormforce.com
4
  Tags: schema markup, structured data, rich snippets, schema.org, Microdata, schema
5
  Requires at least: 3.7
6
- Tested up to: 4.9.8
7
- Stable tag: 1.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
@@ -80,6 +80,9 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et
80
 
81
  == Changelog ==
82
 
 
 
 
83
  = 1.5.4 =
84
  * Improvement: Dashboard UI Updated.
85
  * Fix: Removed publisher logo width-height meta tags.
3
  Donate link: https://www.brainstormforce.com
4
  Tags: schema markup, structured data, rich snippets, schema.org, Microdata, schema
5
  Requires at least: 3.7
6
+ Tested up to: 5.0
7
+ Stable tag: 1.5.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
80
 
81
  == Changelog ==
82
 
83
+ = 1.5.5 =
84
+ * Fix: Schema markup displayed before the post content or hidden when page content is built using a page builder plugin.
85
+
86
  = 1.5.4 =
87
  * Improvement: Dashboard UI Updated.
88
  * Fix: Removed publisher logo width-height meta tags.