All In One Schema Rich Snippets - Version 1.4.0

Version Description

  • Added new service schema
  • Minor CSS fixes
Download this release

Release Info

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

Code changes from version 1.3.0 to 1.4.0

Files changed (10) hide show
  1. README.md +155 -37
  2. admin/index.php +71 -1
  3. css/style.css +1 -0
  4. functions.php +107 -0
  5. index.php +2 -1
  6. init.php +1 -1
  7. js/toggle.js +10 -0
  8. meta-boxes.php +57 -1
  9. readme.txt +160 -191
  10. settings.php +17 -1
README.md CHANGED
@@ -1,37 +1,155 @@
1
-
2
- # All in One Schema.org Rich Snippets
3
-
4
-
5
- ## What is a Rich Snippet?
6
-
7
- It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
8
-
9
- [See Examples of Rich Snippets Here.](http://www.seomoz.org/blog/schema-examples/)
10
-
11
- ## How does a Rich Snippet help?
12
-
13
- * It gives search engines only the important & precise information to display in search result snippets.
14
- Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
15
-
16
- * See what difference it makes in CTR (Click Through Rate)
17
- * Helps you rank higher in search results
18
- * Helps Facebook display proper information when users share your links on Facebook
19
-
20
- ### Supported Content Types -
21
-
22
- This plugin supports the following types of Schemas:
23
-
24
- * Review
25
- * Event
26
- * People
27
- * Product
28
- * Recipe
29
- * Software Application
30
- * Video
31
- * Articles
32
-
33
- ### Future release would include -
34
-
35
- * Breadcrumbs
36
- * Local Business
37
- * Books
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # All In One Schema.org Rich Snippets #
2
+ **Contributors:** brainstormforce, yawalkarm
3
+ **Donate link:** https://www.brainstormforce.com
4
+ **Tags:** Review, Event, People, Product, Recipe, Software Application, Video, Article, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
+ **Requires at least:** 3.7
6
+ **Tested up to:** 4.4.2
7
+ **Stable tag:** 1.4.0
8
+ **License:** GPLv2 or later
9
+ **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
+ Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
11
+
12
+ ## Description ##
13
+
14
+ ### What is a Rich Snippet? ###
15
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
16
+ [See Examples of Rich Snippets Here.](https://www.brainstormforce.com/schema-rich-snippets/ "Rich Snippets Examples")
17
+
18
+ ### How does a Rich Snippet help? ###
19
+ - It gives search engines only the important & precise information to display in search result snippets.
20
+ - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
21
+ - [See what difference it makes](https://www.brainstormforce.com/schema-rich-snippets/ "See the difference") in CTR (Click Through Rate)
22
+ - Helps you rank higher in search results
23
+ - Helps Facebook display proper information when users share your links on Facebook
24
+ > **Curious, how does this plugin work?**
25
+
26
+
27
+ ### Supported Content Types - ###
28
+ This plugin supports the following types of Schemas:
29
+ * Review
30
+ * Event
31
+ * People
32
+ * Product
33
+ * Recipe
34
+ * Software Application
35
+ * Video
36
+ * Articles
37
+
38
+ ### Future release would include - ###
39
+ * Breadcrumbs
40
+ * Local Business
41
+ * Books
42
+ ### Want to contribute to the plugin? ###
43
+ **You may now contribute to the plugin on Github:** [All in one Schema.org Rich Snippets on Github](https://github.com/brainstormforce/All-In-One-Schema.org-Rich-Snippets "Contribute on Github")
44
+
45
+ ## Installation ##
46
+
47
+ ### Through Dashboard ###
48
+ 1. Go to Plugins -> Add New -> Search for "All in One Schema.org Rich Snippets" Or Upload the plugins zip file
49
+ ### Through FTP ###
50
+ 1. Upload the plugin into `wp-content/plugins` directory
51
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
52
+ 3. That's It.
53
+ Now go and create a new post. There you will find a meta box, select the type of post from dropdown and fill out the details, publish the post.
54
+ Google will start showing rich snippets in the search results, as soon as your post is crawled.
55
+
56
+ You can test the rich snippet on Google Webmasters Rich Snippets Testing Tool
57
+
58
+ ## Frequently Asked Questions ##
59
+
60
+ ### What is a Rich Snippet? ###
61
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
62
+ ### How does a Rich Snippet help? ###
63
+ - It gives search engines only the important & precise information to display in search result snippets.
64
+ - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
65
+ - [See what difference it makes](https://www.brainstormforce.com/schema-rich-snippets/ "See the difference") in CTR (Click Through Rate)
66
+ - Helps you rank higher in search results
67
+ - Helps Facebook display proper information when users share your links on Facebook
68
+
69
+ ### Which Content Types are Supported? ###
70
+ This plugin currently supports almost all of the content types that are released by Schema.org at one place.
71
+ Review, Event, People, Product, Recipe, Software Application, Video, Articles etc.
72
+
73
+ ## Changelog ##
74
+
75
+ ### 1.4.0 ###
76
+ * Added new service schema
77
+ * Minor CSS fixes
78
+
79
+ ### 1.3.0 ###
80
+ * Improvement: Updated markup data to meet Google Structured data guidelines
81
+ * Fixed: WordPress 4.4 compatibility
82
+ * Fixed: Admin UI on small screens
83
+
84
+ ### 1.2.0 ###
85
+ * Improvement: WordPress 4.0 compatibility
86
+ * Fixed: Colorpicker breaking other plugins colorpicker settings.
87
+
88
+ ### 1.1.9 ###
89
+ * Fixed: Image uploading in meta issue resolved.
90
+ * Fixed: Compatibility with WordPress 3.9
91
+
92
+ ### 1.1.8 ###
93
+ * Fixed: CSS and JS now loads on the page / post where rich snippets are configured.
94
+
95
+ ### 1.1.7 ###
96
+ * Improvement: Added "Test Rich Snippets" menu in admin bar for testing rich snippets in Google Webmasters Tools
97
+ * Fixed: retina.js issue resolved
98
+ * Removed unnecessary code
99
+
100
+ ### 1.1.6 ###
101
+ * Improvement: Compatibility with WordPres 3.8
102
+ * Fixed: Admin CSS breaking tabs in WP 3.8
103
+ * Added - reference post url field in "contact developers" form on settings page
104
+
105
+ ### 1.1.5 ###
106
+ * Improvement: Replaced rating 'count' with 'votes' on products - as directed by Google
107
+ * Fixed: Article snippet not displaying accurate when snippet title is blank
108
+ * Fixed: Recipe string 'Published on' can be changed.
109
+
110
+ ### 1.1.4 ###
111
+ * Fixed: Illegal string offset `user_rating` Warning
112
+
113
+ ### 1.1.3 ###
114
+ * Improvement : Network Activation
115
+
116
+ ### 1.1.2 ###
117
+ * Fixed: Edit media functionality.
118
+
119
+ ### 1.1.1 ###
120
+ * Added: Article type
121
+ * Added: Compatibility with WooThemes Plugins and themes
122
+ * Added: New Media Manager for uploading images in metabox
123
+
124
+ ### 1.1.0 ###
125
+ * Added: Admin options
126
+ * Fixed: Ratings on recipe, products and software application
127
+ * Improvement: Admin options for customizing everything
128
+ * Improvement: New snippet box design with responsive layout
129
+
130
+ ### 1.0.4 ###
131
+ * Fixed: Rating on Comments
132
+ * Fixed: On deleting any deactivated plugin
133
+ * Fixed: Error message comming on commenting
134
+ * Fixed: On post save draft
135
+
136
+ ### 1.0.3 ###
137
+ * Clean up the code
138
+ * Fixed: Plugin activation error
139
+ * Fixed: Error on editing theme and plugin files.
140
+ * Removed : Breadcrumbs
141
+
142
+ ### 1.0.2 ###
143
+ * Added: RDFa Breadcrumbs Plugin is now a part of All in One Schema.org Rich Snippets !
144
+ * Added: Star rating and review for recipe
145
+ * Fized: Recipe type
146
+ * Fixed: Post update error
147
+
148
+ ### 1.0.1 ###
149
+ * Minor Bugs Fixes
150
+
151
+ ### 1.0 ###
152
+ * Initial Release.
153
+
154
+ ## Upgrade Notice ##
155
+ **Note:** Minor bug fixes. Update the plugin to enjoy bug free blogging!
admin/index.php CHANGED
@@ -31,7 +31,9 @@ function rich_snippet_dashboard() {
31
  $args_recipe = get_option('bsf_recipe');
32
  $args_soft = get_option('bsf_software');
33
  $args_video = get_option('bsf_video');
34
- $args_article = get_option('bsf_article');
 
 
35
  $args_color = get_option('bsf_custom');
36
  echo '<div class="wrap">';
37
  echo '<div id="star-icons-32" class="icon32"></div><h2>'.__("All in One Schema.org Rich Snippets - Dashboard","rich-snippets").'</h2>';
@@ -415,6 +417,58 @@ function rich_snippet_dashboard() {
415
  </div>
416
  </div>
417
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  <!-- Post blox -->
419
 
420
  </div>
@@ -645,6 +699,18 @@ if(isset($_POST['article_submit']))
645
  $status = update_option('bsf_article',$args);
646
  displayStatus($status);
647
  }
 
 
 
 
 
 
 
 
 
 
 
 
648
  function displayStatus($status) {
649
  if($status)
650
  {
@@ -678,6 +744,8 @@ if(isset($_GET['action']))
678
 
679
  if($option_to_reset == 'article')
680
  delete_option('bsf_article');
 
 
681
 
682
  if($option_to_reset == 'color')
683
  delete_option('bsf_custom');
@@ -704,6 +772,8 @@ function bsf_reset_options($option_to_reset)
704
  add_video_option();
705
  if($option_to_reset == 'article')
706
  add_article_option();
 
 
707
  if($option_to_reset == 'color')
708
  add_color_option();
709
 
31
  $args_recipe = get_option('bsf_recipe');
32
  $args_soft = get_option('bsf_software');
33
  $args_video = get_option('bsf_video');
34
+ $args_article = get_option('bsf_article');
35
+ $args_service = get_option('bsf_service');
36
+
37
  $args_color = get_option('bsf_custom');
38
  echo '<div class="wrap">';
39
  echo '<div id="star-icons-32" class="icon32"></div><h2>'.__("All in One Schema.org Rich Snippets - Dashboard","rich-snippets").'</h2>';
417
  </div>
418
  </div>
419
  </div>
420
+ <div class="postbox closed">
421
+ <div class="handlediv" title="Click to toggle"><br></div>
422
+ <h3 class="hndle"><span>'.__("Service","rich-snippets").'</span></h3>
423
+ <div class="inside">
424
+ <div class="table">
425
+ <p>'.__("Strings to be displayed on frontend for <strong>Service Rich Snippets &mdash;</strong>","rich-snippets").'</p>
426
+ <form id="bsf_service_form" method="post">
427
+ <table class="bsf_metabox">
428
+ <tbody>
429
+ <tr>
430
+ <td align="right"><strong><label>'.__("Rich Snippet Title :","rich-snippets").'</label></strong></td>
431
+ <td><input class="bsf_text_medium" type="text" name="snippet_title" value="'.$args_service["snippet_title"].'"/></td>
432
+ </tr>
433
+ <tr>
434
+ <td align="right"><strong><label>'.__("Service Type :","rich-snippets").'</label></strong></td>
435
+ <td><input class="bsf_text_medium" type="text" name="service_type" value="'.$args_service["service_type"].'"/></td>
436
+ </tr>
437
+ <tr>
438
+ <td align="right"><strong><label>'.__("Area :","rich-snippets").'</label></strong></td>
439
+ <td><input class="bsf_text_medium" type="text" name="service_area" value="'.$args_service["service_area"].'"/></td>
440
+ </tr>
441
+ <tr>
442
+ <td align="right"><strong><label>'.__("Description :","rich-snippets").'</label></strong></td>
443
+ <td><input class="bsf_text_medium" type="text" name="service_desc" value="'.$args_service["service_desc"].'"/></td>
444
+ </tr>
445
+ <tr>
446
+ <td align="right"><strong><label>'.__("Provider Name :","rich-snippets").'</label></strong></td>
447
+ <td><input class="bsf_text_medium" type="text" name="service_provider_name" value="'.$args_service["service_provider_name"].'"/></td>
448
+ </tr>
449
+ <tr>
450
+ <td align="right"><strong><label>'.__("URL :","rich-snippets").'</label></strong></td>
451
+ <td><input class="bsf_text_medium" type="text" name="service_channel" value="'.$args_service["service_channel"].'"/></td>
452
+ </tr>
453
+ <tr>
454
+ <td align="right"><strong><label>'.__("URL Text :","rich-snippets").'</label></strong></td>
455
+ <td><input class="bsf_text_medium" type="text" name="service_url_link" value="'.$args_service["service_url_link"].'"/></td>
456
+ </tr>
457
+ <tr>
458
+ <td align="right"><strong><label>'.__("Service Rating :","rich-snippets").'</label></strong></td>
459
+ <td><input class="bsf_text_medium" type="text" name="service_rating" value="'.$args_service["service_rating"].'"/></td>
460
+ </tr>
461
+ <tr><td colspan="2"></td></tr>
462
+ <tr>
463
+ <td></td>
464
+ <td><input type="submit" class="button-primary" name="service_submit" value="'.__("Update ").'"/>&nbsp;&nbsp;&nbsp;<a class="button-primary" href="?page=rich_snippet_dashboard&amp;action=reset&options=service">'.__('Reset ','rich-snippets').'</a></td>
465
+ </tr>
466
+ </tbody>
467
+ </table>
468
+ </form>
469
+ </div>
470
+ </div>
471
+ </div>
472
  <!-- Post blox -->
473
 
474
  </div>
699
  $status = update_option('bsf_article',$args);
700
  displayStatus($status);
701
  }
702
+ if(isset($_POST['service_submit']))
703
+ {
704
+ foreach(array('snippet_title','service_type','service_area','service_desc','service_provider_name','service_rating','service_channel','service_url_link') as $option)
705
+ {
706
+ if(isset($_POST[$option]))
707
+ {
708
+ $args[$option] = $_POST[$option];
709
+ }
710
+ }
711
+ $status = update_option('bsf_service',$args);
712
+ displayStatus($status);
713
+ }
714
  function displayStatus($status) {
715
  if($status)
716
  {
744
 
745
  if($option_to_reset == 'article')
746
  delete_option('bsf_article');
747
+ if($option_to_reset == 'service')
748
+ delete_option('bsf_service');
749
 
750
  if($option_to_reset == 'color')
751
  delete_option('bsf_custom');
772
  add_video_option();
773
  if($option_to_reset == 'article')
774
  add_article_option();
775
+ if($option_to_reset == 'service')
776
+ add_service_option();
777
  if($option_to_reset == 'color')
778
  add_color_option();
779
 
css/style.css CHANGED
@@ -36,6 +36,7 @@ td .tbl-bdf-td{
36
  float: left;
37
  width: 600px;
38
  clear: both;
 
39
  }
40
  .snippet-markup {
41
  float: left;
36
  float: left;
37
  width: 600px;
38
  clear: both;
39
+ box-sizing: content-box;
40
  }
41
  .snippet-markup {
42
  float: left;
functions.php CHANGED
@@ -848,6 +848,113 @@ function display_rich_snippet($content) {
848
  $article .= '</div>
849
  </div></div><div class="snippet-clear"></div>';
850
  return ( is_single() || is_page() ) ? $article : $content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
851
  }
852
  else {
853
  return $content;
848
  $article .= '</div>
849
  </div></div><div class="snippet-clear"></div>';
850
  return ( is_single() || is_page() ) ? $article : $content;
851
+ }else if($type == '11')
852
+ {
853
+ global $post;
854
+ $service = $content;
855
+ $args_service = get_option('bsf_service');
856
+ $service_type = get_post_meta( $post->ID, '_bsf_service_type', true );
857
+ $service_area = get_post_meta( $post->ID, '_bsf_service_area', true );
858
+ $service_desc = get_post_meta( $post->ID, '_bsf_service_desc', true );
859
+ $service_image = get_post_meta( $post->ID, '_bsf_service_image', true );
860
+ $service_provider_name = get_post_meta( $post->ID, '_bsf_service_provider', true );
861
+ $service_rating = get_post_meta( $post->ID, '_bsf_service_rating', true );
862
+ $service_rating_switch = get_post_meta( $post->ID, '_bsf_service_rating_switch', true );
863
+ $service_channel = get_permalink( $post->ID );
864
+ $service_url_link = $args_service['service_url_link'] != ''? $args_service['service_url_link'] : "Click Here For More Info";
865
+
866
+
867
+ $service .= '<div id="snippet-box" style="background:'.$args_color["snippet_box_bg"].'; color:'.$args_color["snippet_box_color"].'; border:1px solid '.$args_color["snippet_border"].';">';
868
+ if($args_service['snippet_title'] != "" )
869
+ {
870
+ $service .= '<div class="snippet-title" style="background:'.$args_color["snippet_title_bg"].'; color:'.$args_color["snippet_title_color"].'; border-bottom:1px solid '.$args_color["snippet_border"].';">'.$args_service['snippet_title'];
871
+ if ( $service_rating_switch == 'enable' ) {
872
+ $service .= bsf_do_rating();
873
+ }
874
+ $service .= '</div>';
875
+ }
876
+ $service .= '<div itemscope itemtype="http://schema.org/Service">';
877
+ if(trim($service_image) != "")
878
+ {
879
+ $service .= '<div class="snippet-image">';
880
+ $service .= '<img itemprop="image" width="180" src="'.$service_image.'"/>';
881
+ $service .= '</div>';
882
+ }
883
+ else
884
+ {
885
+ $service .= '<script type="text/javascript">
886
+ jQuery(document).ready(function() {
887
+ jQuery(".snippet-label-img").addClass("snippet-clear");
888
+ });
889
+ </script>';
890
+ }
891
+ $service .= '<div class="aio-info">';
892
+
893
+ if( average_rating() > 0 ){
894
+ if($args_service['service_rating'] != "")
895
+ {
896
+ $service .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
897
+ $service .= '<div class="snippet-label-img">'.$args_service['service_rating'].'</div>';
898
+ $service .= '<div class="snippet-data-img">';
899
+ $service .= '<span itemprop="ratingValue">'.average_rating().'</span>';
900
+ $service .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
901
+ }
902
+ }
903
+
904
+
905
+ if(trim($service_type) != "")
906
+ {
907
+ if($args_service['service_type'] != "")
908
+ $service .= '<div class="snippet-label-img">'.$args_service['service_type'].'</div>';
909
+
910
+ $service .= '<div class="snippet-data-img">
911
+ <span itemprop="serviceType">'.$service_type.'</span>
912
+ </div>
913
+ <div class="snippet-clear"></div>';
914
+ }
915
+
916
+ if(trim($service_provider_name) != "")
917
+ {
918
+ if($args_service['service_provider_name'] != "")
919
+ $service .= '<div class="snippet-label-img">'.$args_service['service_provider_name'].'</div>';
920
+
921
+ $service .= '<div class="snippet-data-img" itemprop="provider" itemscope itemtype="https://schema.org/LocalBusiness">
922
+ <span itemprop="name">'.$service_provider_name.'</span>
923
+ </div>
924
+ <div class="snippet-clear"></div>';
925
+ }
926
+
927
+ if(trim($service_area) != "")
928
+ {
929
+ if($args_service['service_area'] != "")
930
+ $service .= '<div class="snippet-label-img">'.$args_service['service_area'].'</div>';
931
+
932
+ $service .= '<div class="snippet-data-img" itemprop="areaServed" itemscope itemtype="http://schema.org/State">
933
+ <span itemprop="name">'.$service_area.'</span>
934
+ </div><div class="snippet-clear"></div>';
935
+ }
936
+
937
+ if(trim($service_desc) != "")
938
+ {
939
+ if($args_service['service_desc'] != "")
940
+ $service .= '<div class="snippet-label-img">'.$args_service['service_desc'].'</div>';
941
+
942
+ $service .= '<div class="snippet-data-img"><span itemprop="description">'.$service_desc.'</span></div><div class="snippet-clear"></div>';
943
+ }
944
+
945
+ if(trim($service_channel) != "")
946
+ {
947
+ if($args_service['service_channel'] != "")
948
+ $service .= '<div class="snippet-label-img">'.$args_service['service_channel'].'</div>';
949
+
950
+ $service .= '<div class="snippet-data-img" itemprop="availableChannel" itemscope itemtype="https://schema.org/ServiceChannel">
951
+ <a itemprop="URL" href="'.$service_channel.'">'.$service_url_link.' </a>
952
+ </div><div class="snippet-clear"></div>';
953
+ }
954
+
955
+
956
+ $service .= '</div></div></div><div class="snippet-clear"></div>';
957
+ return ( is_single() || is_page() ) ? $service : $content;
958
  }
959
  else {
960
  return $content;
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: The All in One Rich Snippets gives the power to the blog author to control the rich snippets to be shown in the search results by the search engines.
8
- Version: 1.3.0
9
  Text Domain: rich-snippets
10
  License: GPL2
11
  */
@@ -158,6 +158,7 @@ if ( !class_exists( "RichSnippets" ) )
158
  add_software_option();
159
  add_video_option();
160
  add_article_option();
 
161
  add_color_option();
162
  }
163
  function submit_request()
5
  Author: Brainstorm Force
6
  Author URI: https://www.brainstormforce.com
7
  Description: The All in One Rich Snippets gives the power to the blog author to control the rich snippets to be shown in the search results by the search engines.
8
+ Version: 1.4.0
9
  Text Domain: rich-snippets
10
  License: GPL2
11
  */
158
  add_software_option();
159
  add_video_option();
160
  add_article_option();
161
+ add_service_option();
162
  add_color_option();
163
  }
164
  function submit_request()
init.php CHANGED
@@ -205,7 +205,7 @@ class bsf_Meta_Box {
205
  echo '<div class="', $field['class'],'"><ul>';
206
  $i = 1;
207
  foreach ($field['options'] as $option) {
208
- if( $field['class'] == "star review" || $field['class'] == "star product" || $field['class'] == "star software")
209
  $class = "star";
210
  else
211
  $class = $field['class'];
205
  echo '<div class="', $field['class'],'"><ul>';
206
  $i = 1;
207
  foreach ($field['options'] as $option) {
208
+ if( $field['class'] == "star review" || $field['class'] == "star product" || $field['class'] == "star software" || $field['class'] == "star service" )
209
  $class = "star";
210
  else
211
  $class = $field['class'];
js/toggle.js CHANGED
@@ -16,6 +16,8 @@ function hidden() {
16
  jQuery(".software").hide();
17
  jQuery(".video").hide();
18
  jQuery(".article").hide();
 
 
19
  }
20
  //Function to expand the updated snippet block
21
  function expand_default(selected) {
@@ -60,6 +62,10 @@ function expand_default(selected) {
60
  {
61
  jQuery(".article").show(500);
62
  }
 
 
 
 
63
  }
64
  jQuery("#_bsf_post_type").change(function() {
65
  hidden();
@@ -104,5 +110,9 @@ function expand_default(selected) {
104
  {
105
  jQuery(".article").show(500);
106
  }
 
 
 
 
107
  });
108
  });
16
  jQuery(".software").hide();
17
  jQuery(".video").hide();
18
  jQuery(".article").hide();
19
+ jQuery(".service").hide();
20
+
21
  }
22
  //Function to expand the updated snippet block
23
  function expand_default(selected) {
62
  {
63
  jQuery(".article").show(500);
64
  }
65
+ else if(selected == '11')
66
+ {
67
+ jQuery(".service").show(500);
68
+ }
69
  }
70
  jQuery("#_bsf_post_type").change(function() {
71
  hidden();
110
  {
111
  jQuery(".article").show(500);
112
  }
113
+ else if(type == '11')
114
+ {
115
+ jQuery(".service").show(500);
116
+ }
117
  });
118
  });
meta-boxes.php CHANGED
@@ -31,6 +31,8 @@ function bsf_metaboxes( array $meta_boxes ) {
31
  array( 'name' => __('Software Application','rich-snippets'), 'value' => '8', ),
32
  array( 'name' => __('Video','rich-snippets'), 'value' => '9', ),
33
  array( 'name' => __('Article','rich-snippets'), 'value' => '10', ),
 
 
34
  ),
35
  ),
36
  // Meta Settings for Item Review
@@ -677,7 +679,61 @@ function bsf_metaboxes( array $meta_boxes ) {
677
  'type' => 'file',
678
  ),
679
 
680
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
681
  ),
682
  );
683
  // Add other metaboxes as needed
31
  array( 'name' => __('Software Application','rich-snippets'), 'value' => '8', ),
32
  array( 'name' => __('Video','rich-snippets'), 'value' => '9', ),
33
  array( 'name' => __('Article','rich-snippets'), 'value' => '10', ),
34
+ array( 'name' => __('Service','rich-snippets'), 'value' => '11', ),
35
+
36
  ),
37
  ),
38
  // Meta Settings for Item Review
679
  'type' => 'file',
680
  ),
681
 
682
+
683
+ // Meta Settings for Service
684
+ array(
685
+ 'name' => __('Rich Snippets - Service','rich-snippets'),
686
+ 'desc' => __('Please provide the following information.','rich-snippets'),
687
+ 'id' => $prefix . 'service',
688
+ 'class' => 'service',
689
+ 'type' => 'title',
690
+ ),
691
+ array(
692
+ 'name' => __('Image','rich-snippets'),
693
+ 'desc' => __('Upload or select image from gallery. Medium size is recommended (300px X 300px)','rich-snippets'),
694
+ 'id' => $prefix . 'service_image',
695
+ 'class' => 'service',
696
+ 'type' => 'file',
697
+ ),
698
+ array(
699
+ 'name' => __('Service Type','rich-snippets'),
700
+ 'desc' => __('Enter the service type','rich-snippets'),
701
+ 'id' => $prefix . 'service_type',
702
+ 'class' => 'service',
703
+ 'type' => 'text',
704
+ ),
705
+ array(
706
+ 'name' => __('Service Served Area','rich-snippets'),
707
+ 'desc' => __('Enter the area where service is available','rich-snippets'),
708
+ 'id' => $prefix . 'service_area',
709
+ 'class' => 'service',
710
+ 'type' => 'text',
711
+ ),
712
+ array(
713
+ 'name' => __('Short Description','rich-snippets'),
714
+ 'desc' => __('Enter the description about service (About 30 Words)','rich-snippets'),
715
+ 'id' => $prefix . 'service_desc',
716
+ 'class' => 'service',
717
+ 'type' => 'textarea_small',
718
+ ),
719
+ array(
720
+ 'name' => __('Provider Name','rich-snippets'),
721
+ 'desc' => __('Enter the service provider name','rich-snippets'),
722
+ 'id' => $prefix . 'service_provider',
723
+ 'class' => 'service',
724
+ 'type' => 'text',
725
+ ),
726
+ array(
727
+ 'name' => __('Enable/Disable Rating','rich-snippets'),
728
+ 'desc' => __('.','rich-snippets'),
729
+ 'id' => $prefix . 'service_rating_switch',
730
+ 'class' => 'service',
731
+ 'type' => 'select',
732
+ 'options' => array(
733
+ array('name' => __('Disable','rich-snippets'), 'value' => ''),
734
+ array('name' => __('Enable','rich-snippets'), 'value' => 'enable'),
735
+ ),
736
+ ),
737
  ),
738
  );
739
  // Add other metaboxes as needed
readme.txt CHANGED
@@ -1,192 +1,161 @@
1
- === All In One Schema.org Rich Snippets ===
2
- Contributors: brainstormforce, yawalkarm
3
- Donate link: http://bsf.io/pay
4
- Tags: Review, Event, People, Product, Recipe, Software Application, Video, Article, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
- Requires at least: 3.7
6
- Tested up to: 4.4
7
- Stable tag: 1.3.0
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
11
-
12
- == Description ==
13
-
14
- = What is a Rich Snippet? =
15
- It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
16
- [See Examples of Rich Snippets Here.](http://www.seomoz.org/blog/schema-examples/ "Rich Snippets Examples")
17
-
18
- = How does a Rich Snippet help? =
19
- - It gives search engines only the important & precise information to display in search result snippets.
20
- - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
21
- - [See what difference it makes](http://dashburst.com/google-search-what-are-rich-snippets/ "See the difference") in CTR (Click Through Rate)
22
- - Helps you rank higher in search results
23
- - Helps Facebook display proper information when users share your links on Facebook
24
-
25
- **Curious, how does this plugin work?**
26
-
27
-
28
- = Supported Content Types - =
29
- This plugin supports the following types of Schemas:
30
-
31
- * Review
32
- * Event
33
- * People
34
- * Product
35
- * Recipe
36
- * Software Application
37
- * Video
38
- * Articles
39
-
40
- = Future release would include - =
41
- * Breadcrumbs
42
- * Local Business
43
- * Books
44
- = Want to contribute to the plugin? =
45
- You may now contribute to the plugin on Github: [All in one Schema.org Rich Snippets on Github](https://github.com/brainstormforce/All-In-One-Schema.org-Rich-Snippets "Contribute on Github")
46
-
47
- == Installation ==
48
-
49
- = Through Dashboard =
50
- 1. Go to Plugins -> Add New -> Search for "All in One Schema.org Rich Snippets" Or Upload the plugins zip file
51
- = Through FTP =
52
- 1. Upload the plugin into `wp-content/plugins` directory
53
- 2. Activate the plugin through the 'Plugins' menu in WordPress
54
- 3. That's It.
55
- Now go and create a new post. There you will find a meta box, select the type of post from dropdown and fill out the details, publish the post.
56
- Google will start showing rich snippets in the search results, as soon as your post is crawled.
57
-
58
- You can test the rich snippet on Google Webmasters Rich Snippets Testing Tool
59
-
60
- == Release Notes ==
61
- What's new in this version 1.1.8
62
- From the very beginning - one of the major thing we are known for is our designs. It always has been one of our major focus. In fact you can say design is our DNA. However, in previous versions on AIOSRS, we felt it was missing somehow.
63
-
64
- We have received requests for article rich snippets from a huge no. of our users. So, we have added the Article type in this new update.
65
-
66
- Also, we observed most of the people did not want the MicroData box visible to users but only to search engines and requested the feature. However as this is against Google's guidelines, we gave a though to an alternative. Rather than people using the plugin only for 'displaying rich snippets in search results' and 'comporting on front end design' - why not design the plugin in a way that people would want the plugin for displaying a beautiful post summary and rich snippets would come with that? Wouldn't that be awesome?
67
-
68
- So with this update, we stared trying the same thing; and with of course with feedbacks from our beloved users, we look forward making it even better.
69
-
70
- In brief, new things in updated version -
71
- * Redesigned Front End
72
- * Fully Responsive
73
- * Retina Ready
74
- * Options Panel to make settings and control front end display
75
- * Options Panel to make settings and control strings (Flexibility for admin & also helpful for sites in other languages)
76
- * Setting to make images look better
77
- Some of the other non design things -
78
- * Better reviews and ratings functionality
79
- * 100% MicroData. Rolled out RDFa completely
80
- * and many other small but important things
81
-
82
- Thanks [Nitin](http://profiles.wordpress.org/yawalkarm/ "Nitin Yawalkar") & Pratik for your major contributions
83
-
84
- ******************** ******************** ********************
85
- Next scheduled version will include -
86
- - Even simpler, shorter, typographic and more beautiful design of MicroData box. May be like this https://moqups.com/brainstormforce/5P0EaLtt
87
- - Redesigned admin panel
88
- - Refined MicroData input options
89
- - Support for more post types (Local Business, etc)
90
- Cheers & Regards,
91
- Sujay
92
-
93
- == Frequently Asked Questions ==
94
-
95
- = What is a Rich Snippet? =
96
- It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
97
- = How does a Rich Snippet help? =
98
- - It gives search engines only the important & precise information to display in search result snippets.
99
- - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
100
- - [See what difference it makes](http://dashburst.com/google-search-what-are-rich-snippets/ "See the difference") in CTR (Click Through Rate)
101
- - Helps you rank higher in search results
102
- - Helps Facebook display proper information when users share your links on Facebook
103
-
104
- = Which Content Types are Supported? =
105
- This plugin currently supports almost all of the content types that are released by Schema.org at one place.
106
- Review, Event, People, Product, Recipe, Software Application, Video, Articles etc.
107
-
108
- == Screenshots ==
109
- 1. Meta box in post-new under the editor screen.
110
- 2. Select content type from dropdown
111
- 3. Fill the details as much as you can
112
- 4. Test the post or page URL in Google Rich Snippets Testing
113
-
114
- == Changelog ==
115
-
116
- = 1.3.0 =
117
- * Improvement: Updated markup data to meet Google Structured data guidelines
118
- * Fixed: WordPress 4.4 compatibility
119
- * Fixed: Admin UI on small screens
120
-
121
- = 1.2.0 =
122
- * Improvement: WordPress 4.0 compatibility
123
- * Fixed: Colorpicker breaking other plugins colorpicker settings.
124
-
125
- = 1.1.9 =
126
- * Fixed: Image uploading in meta issue resolved.
127
- * Fixed: Compatibility with WordPress 3.9
128
-
129
- = 1.1.8 =
130
- * Fixed: CSS and JS now loads on the page / post where rich snippets are configured.
131
-
132
- = 1.1.7 =
133
- * Improvement: Added "Test Rich Snippets" menu in admin bar for testing rich snippets in Google Webmasters Tools
134
- * Fixed: retina.js issue resolved
135
- * Removed unnecessary code
136
-
137
- = 1.1.6 =
138
- * Improvement: Compatibility with WordPres 3.8
139
- * Fixed: Admin CSS breaking tabs in WP 3.8
140
- * Added - reference post url field in "contact developers" form on settings page
141
-
142
- = 1.1.5 =
143
- * Improvement: Replaced rating 'count' with 'votes' on products - as directed by Google
144
- * Fixed: Article snippet not displaying accurate when snippet title is blank
145
- * Fixed: Recipe string 'Published on' can be changed.
146
-
147
- = 1.1.4 =
148
- * Fixed: Illegal string offset `user_rating` Warning
149
-
150
- = 1.1.3 =
151
- * Improvement : Network Activation
152
-
153
- = 1.1.2 =
154
- * Fixed: Edit media functionality.
155
-
156
- = 1.1.1 =
157
- * Added: Article type
158
- * Added: Compatibility with WooThemes Plugins and themes
159
- * Added: New Media Manager for uploading images in metabox
160
-
161
- = 1.1.0 =
162
- * Added: Admin options
163
- * Fixed: Ratings on recipe, products and software application
164
- * Improvement: Admin options for customizing everything
165
- * Improvement: New snippet box design with responsive layout
166
-
167
- = 1.0.4 =
168
- * Fixed: Rating on Comments
169
- * Fixed: On deleting any deactivated plugin
170
- * Fixed: Error message comming on commenting
171
- * Fixed: On post save draft
172
-
173
- = 1.0.3 =
174
- * Clean up the code
175
- * Fixed: Plugin activation error
176
- * Fixed: Error on editing theme and plugin files.
177
- * Removed : Breadcrumbs
178
-
179
- = 1.0.2 =
180
- * Added: RDFa Breadcrumbs Plugin is now a part of All in One Schema.org Rich Snippets !
181
- * Added: Star rating and review for recipe
182
- * Fized: Recipe type
183
- * Fixed: Post update error
184
-
185
- = 1.0.1 =
186
- * Minor Bugs Fixes
187
-
188
- = 1.0 =
189
- * Initial Release.
190
-
191
- == Upgrade Notice ==
192
  Note: Minor bug fixes. Update the plugin to enjoy bug free blogging!
1
+ === All In One Schema.org Rich Snippets ===
2
+ Contributors: brainstormforce, yawalkarm
3
+ Donate link: https://www.brainstormforce.com
4
+ Tags: Review, Event, People, Product, Recipe, Software Application, Video, Article, rdfa, rich snippet, schema.org, schema, microdata, microformat, SERP, Google, Yahoo, Bing
5
+ Requires at least: 3.7
6
+ Tested up to: 4.4.2
7
+ Stable tag: 1.4.0
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+ Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
11
+
12
+ == Description ==
13
+
14
+ = What is a Rich Snippet? =
15
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
16
+ [See Examples of Rich Snippets Here.](https://www.brainstormforce.com/schema-rich-snippets/ "Rich Snippets Examples")
17
+
18
+ = How does a Rich Snippet help? =
19
+ - It gives search engines only the important & precise information to display in search result snippets.
20
+ - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
21
+ - [See what difference it makes](https://www.brainstormforce.com/schema-rich-snippets/ "See the difference") in CTR (Click Through Rate)
22
+ - Helps you rank higher in search results
23
+ - Helps Facebook display proper information when users share your links on Facebook
24
+ > **Curious, how does this plugin work?**
25
+
26
+
27
+ = Supported Content Types - =
28
+ This plugin supports the following types of Schemas:
29
+ * Review
30
+ * Event
31
+ * People
32
+ * Product
33
+ * Recipe
34
+ * Software Application
35
+ * Video
36
+ * Articles
37
+
38
+ = Future release would include - =
39
+ * Breadcrumbs
40
+ * Local Business
41
+ * Books
42
+ = Want to contribute to the plugin? =
43
+ You may now contribute to the plugin on Github: [All in one Schema.org Rich Snippets on Github](https://github.com/brainstormforce/All-In-One-Schema.org-Rich-Snippets "Contribute on Github")
44
+
45
+ == Installation ==
46
+
47
+ = Through Dashboard =
48
+ 1. Go to Plugins -> Add New -> Search for "All in One Schema.org Rich Snippets" Or Upload the plugins zip file
49
+ = Through FTP =
50
+ 1. Upload the plugin into `wp-content/plugins` directory
51
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
52
+ 3. That's It.
53
+ Now go and create a new post. There you will find a meta box, select the type of post from dropdown and fill out the details, publish the post.
54
+ Google will start showing rich snippets in the search results, as soon as your post is crawled.
55
+
56
+ You can test the rich snippet on Google Webmasters Rich Snippets Testing Tool
57
+
58
+ == Frequently Asked Questions ==
59
+
60
+ = What is a Rich Snippet? =
61
+ It is basically a short summary of your page in the search results of Google, Yahoo, Bing and sometimes in the News feed of Facebook in nice format with star ratings, author photo, image, etc.
62
+ = How does a Rich Snippet help? =
63
+ - It gives search engines only the important & precise information to display in search result snippets.
64
+ - Rich Snippets are very interactive (photos, star ratings, price, author, etc.) to let you stand out from competition
65
+ - [See what difference it makes](https://www.brainstormforce.com/schema-rich-snippets/ "See the difference") in CTR (Click Through Rate)
66
+ - Helps you rank higher in search results
67
+ - Helps Facebook display proper information when users share your links on Facebook
68
+
69
+ = Which Content Types are Supported? =
70
+ This plugin currently supports almost all of the content types that are released by Schema.org at one place.
71
+ Review, Event, People, Product, Recipe, Software Application, Video, Articles etc.
72
+
73
+ == Screenshots ==
74
+ 1. Meta box in post-new under the editor screen.
75
+ 2. Select content type from dropdown
76
+ 3. Fill the details as much as you can
77
+ 4. Test the post or page URL in Google Rich Snippets Testing
78
+
79
+ == Changelog ==
80
+
81
+ = 1.4.0 =
82
+ * Added new service schema
83
+ * Minor CSS fixes
84
+
85
+ = 1.3.0 =
86
+ * Improvement: Updated markup data to meet Google Structured data guidelines
87
+ * Fixed: WordPress 4.4 compatibility
88
+ * Fixed: Admin UI on small screens
89
+
90
+ = 1.2.0 =
91
+ * Improvement: WordPress 4.0 compatibility
92
+ * Fixed: Colorpicker breaking other plugins colorpicker settings.
93
+
94
+ = 1.1.9 =
95
+ * Fixed: Image uploading in meta issue resolved.
96
+ * Fixed: Compatibility with WordPress 3.9
97
+
98
+ = 1.1.8 =
99
+ * Fixed: CSS and JS now loads on the page / post where rich snippets are configured.
100
+
101
+ = 1.1.7 =
102
+ * Improvement: Added "Test Rich Snippets" menu in admin bar for testing rich snippets in Google Webmasters Tools
103
+ * Fixed: retina.js issue resolved
104
+ * Removed unnecessary code
105
+
106
+ = 1.1.6 =
107
+ * Improvement: Compatibility with WordPres 3.8
108
+ * Fixed: Admin CSS breaking tabs in WP 3.8
109
+ * Added - reference post url field in "contact developers" form on settings page
110
+
111
+ = 1.1.5 =
112
+ * Improvement: Replaced rating 'count' with 'votes' on products - as directed by Google
113
+ * Fixed: Article snippet not displaying accurate when snippet title is blank
114
+ * Fixed: Recipe string 'Published on' can be changed.
115
+
116
+ = 1.1.4 =
117
+ * Fixed: Illegal string offset `user_rating` Warning
118
+
119
+ = 1.1.3 =
120
+ * Improvement : Network Activation
121
+
122
+ = 1.1.2 =
123
+ * Fixed: Edit media functionality.
124
+
125
+ = 1.1.1 =
126
+ * Added: Article type
127
+ * Added: Compatibility with WooThemes Plugins and themes
128
+ * Added: New Media Manager for uploading images in metabox
129
+
130
+ = 1.1.0 =
131
+ * Added: Admin options
132
+ * Fixed: Ratings on recipe, products and software application
133
+ * Improvement: Admin options for customizing everything
134
+ * Improvement: New snippet box design with responsive layout
135
+
136
+ = 1.0.4 =
137
+ * Fixed: Rating on Comments
138
+ * Fixed: On deleting any deactivated plugin
139
+ * Fixed: Error message comming on commenting
140
+ * Fixed: On post save draft
141
+
142
+ = 1.0.3 =
143
+ * Clean up the code
144
+ * Fixed: Plugin activation error
145
+ * Fixed: Error on editing theme and plugin files.
146
+ * Removed : Breadcrumbs
147
+
148
+ = 1.0.2 =
149
+ * Added: RDFa Breadcrumbs Plugin is now a part of All in One Schema.org Rich Snippets !
150
+ * Added: Star rating and review for recipe
151
+ * Fized: Recipe type
152
+ * Fixed: Post update error
153
+
154
+ = 1.0.1 =
155
+ * Minor Bugs Fixes
156
+
157
+ = 1.0 =
158
+ * Initial Release.
159
+
160
+ == Upgrade Notice ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  Note: Minor bug fixes. Update the plugin to enjoy bug free blogging!
settings.php CHANGED
@@ -7,7 +7,7 @@ function add_review_option()
7
  'item_reviewer' => __('Reviewer','rich-snippets'),
8
  'review_date' => __('Review Date','rich-snippets'),
9
  'item_name' => __('Reviewed Item','rich-snippets'),
10
- // 'item_description' => __('Description','rich-snippets'),
11
  'item_rating' => __('Author Rating','rich-snippets')
12
  );
13
  add_option('bsf_review',$review_opt);
@@ -116,6 +116,22 @@ function add_article_option()
116
  );
117
  add_option('bsf_article',$article_opt);
118
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  // Function for customization
120
  function add_color_option()
121
  {
7
  'item_reviewer' => __('Reviewer','rich-snippets'),
8
  'review_date' => __('Review Date','rich-snippets'),
9
  'item_name' => __('Reviewed Item','rich-snippets'),
10
+ // 'item_description' => __('Description','rich-snippets'),
11
  'item_rating' => __('Author Rating','rich-snippets')
12
  );
13
  add_option('bsf_review',$review_opt);
116
  );
117
  add_option('bsf_article',$article_opt);
118
  }
119
+ // Function to add article option for settings
120
+ function add_service_option()
121
+ {
122
+ $service_opt = array(
123
+ 'snippet_title' => __('Summary','rich-snippets'),
124
+ 'service_type' => __('Service Type','rich-snippets'),
125
+ 'service_area' => __('Area','rich-snippets'),
126
+ 'service_desc' => __('Description','rich-snippets'),
127
+ 'service_channel' => __('URL','rich-snippets'),
128
+ 'service_url_link' => __('Click Here For More Info','rich-snippets'),
129
+ 'service_rating' => __('User Rating','rich-snippets'),
130
+ 'service_provider_name' => __('Provider Name','rich-snippets')
131
+
132
+ );
133
+ add_option('bsf_service',$service_opt);
134
+ }
135
  // Function for customization
136
  function add_color_option()
137
  {