-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathreadme.txt
More file actions
337 lines (211 loc) · 11.2 KB
/
Copy pathreadme.txt
File metadata and controls
337 lines (211 loc) · 11.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
=== itemprop WP for SERP/SEO Rich snippets ===
Contributors: rolandinsh
Donate link: http://go.mediabox.lv/itempropwpdonatepaypal
Tags: SEO, schema, schema.org, itemprop, schema.org itemprop, images, microdata, rich snippets, richsnippets, SERP, html5, structured data, itemprop article, itemprop review
Requires at least: 4.0
Tested up to: 4.8
Stable tag: 3.5.201706131
License: simplemediacode
License URI: https://simplemediacode.com/license/gpl/
Add schema.org itemprop code to the (custom) post content for search engines and bots for better SERP results
== Description ==
This plugin is very simple. Using WordPress built in function to filter element attributes and adding < meta > tags with schema.org item properties.
This plugin will NOT FIX BADly programmed WordPress sites!
[Project itempropWP homepage](https://simplemediacode.com/?utm_source=http://wordpress.org/extend/plugins/itempropwp/&utm_medium=link&utm_campaign=itempropWP-WordPress-theme-feature-requests-3.5.201610051&utm_content=WordPress-plugin-itempropwp-3.5.201610051)
Have a good idea for improvement? [Share it](https://github.com/rolandinsh/itempropwp/issues) | [BUG report](https://github.com/rolandinsh/itempropwp/issues)
Example output:
`
<span itemscope itemtype="http://schema.org/Article" class="itempropwp-wrap">
<span itemscope itemtype="http://schema.org/Article" class="itempropwp-wrap">
<!-- Itemprop WP 3.5.201610051 by Rolands Umbrovskis https://umbrovskis.com -->
<meta itemprop="name" content="Title of the Article" />
<meta itemscope itemprop="mainEntityOfPage"
itemType="https://schema.org/WebPage"
itemid="http://fulllink.example.com/seo-optimized-article/"/>
<meta itemprop="url" content="http://fulllink.example.com/seo-optimized-article/" />
<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="http://fulllink.example.com/seo-optimized-article/example.jpg" />
<meta itemprop="width" content="640"/>
<meta itemprop="height" content="480"/>
</span>
<meta itemprop="author" content="http://fulllink.example.com/author/authorusername/"/>
<meta itemprop="description" content="excerpt from post OR first 170 symbols (with full word), ..." />
<meta itemprop="datePublished" content="2012-09-13 19:17:21"/>
<meta itemprop="dateModified" content="2016-02-15 13:33:25" />
<meta itemprop="interactionCount" content="UserComments:356"/>
<span itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="http://fulllink.example.com/logo.jpg">
</span>
<meta itemprop="name" content="Example Blog">
</span>
<!-- Itemprop WP 3.5.201610051 by Rolands Umbrovskis https://umbrovskis.com end -->
</span>
`
Review
`
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<meta itemprop="name" content="Item Title is greate!" />
<meta itemprop="author" content="Rolands Umbrovskis" />
<meta itemprop="datePublished" content="2011-03-25" />
<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content = "1"/>
<meta itemprop="ratingValue" content="4.5" />
<meta itemprop="bestRating" content="5" />
</span>
<span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing">
<meta itemprop="name" content="Item Title" />
</span>
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Item Title" />
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" content="55.36" />
<meta itemprop="priceCurrency" content="USD" />
<link itemprop="availability" href="http://schema.org/InStock" />
</span>
</div>
<meta itemprop="description" content="Great Item Title for the price." />
</div>
`
How does it work?
This assumes that Your page is not fully integrated with HTML5's data properties for microdata. This plugin will create small code inside Your `full content`, with extra microdata from schema.org. This will be ONLY on singular pages - post, page or your custom post type.
Once we are on singular page:
* we will extract from it EXCERPT.
* If You haven't provided excerpt, plugin will look-up for post content, and downsize it to 170 symbols up to full word.
* If your content consist ONLY of shortcode, it will strip it out, and leave empty content. :(
* If we have empty content, from previous step, we will use post title. Not best choice, but at least we have some `description`.
* If Your post do not have even title, plugin will give up and your description will be empty. (This is very bad :') )
Other options, like `datePublished`, `dateModified` (if enabled), `UserComments` (if enabled), `url` are taken from post
* [SMC Facebook](https://www.facebook.com/simplemediacode)
* [Author's Facebook page](https://www.facebook.com/RolandsUmbrovskis.public)
Development: [Github](https://github.com/rolandinsh/itempropwp)
Developer on twitter [@UmbrovskisCom](http://twitter.com/UmbrovskisCom) / [@SimpleMediaCode](http://twitter.com/SimpleMediaCode)
Require PHP at least 5.3
== Installation ==
1. Unzip the download package
1. Upload `itempropwp` to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. See `itempropwp.php` for usage
== Frequently Asked Questions ==
There are no questions for now! [Ask!](https://simplemediacode.com/)
== Changelog ==
= 3.5.201706131 =
* implementing index.php against exposure of data
= 3.5.201610051 =
* tested up to 4.6.1
= 3.5.201604171 =
* tested up to 4.5
= 3.5.201602152 =
* schema.org and Google article requirement changes (since 3.5.201602152). Thanks to [@jasonreposa](https://github.com/jasonreposa) on [Issue #28](https://github.com/rolandinsh/itempropwp/issues/28)
= 3.5.201512231 =
* Versions changed. Nothing more
= 3.4.10 =
* Undefined WPLANG [Issue #30](https://github.com/rolandinsh/itempropwp/issues/30). Thanks to [@Monika](https://wordpress.org/support/profile/monika).
= 3.4.9 =
* Same as 3.4.8
= 3.4.8 =
* Illegal string offset onoff [Issue #20](https://github.com/rolandinsh/itempropwp/issues/20), thank to Robert Roose (@summatix)[https://github.com/summatix] on GitHub
= 3.4.7 =
* Missing headline [Issue #21](https://github.com/rolandinsh/itempropwp/issues/21)
= 3.4.6 =
* Simple check for WordPress. Make sure we don't expose any info if called directly [Issue #18](https://github.com/rolandinsh/itempropwp/issues/18)
= 3.4.5 =
* compatible with WordPress 4.2.*
= 3.4.4 =
* Typo fix in plugin's description
= 3.4.3 =
* Many bug fixed. Issues [closed in 3.4.3](http://go.mediabox.lv/itempropwp343c)
= 3.4.2 =
* revert back to 3.4.0 as version 3.4.1 [itemprops showing multiple times](http://wordpress.org/support/topic/itemprops-showing-multiple-times#post-5992354)
= 3.4.1 =
* fixed: Illegal string offset 'onoff'. [Issue #10](https://github.com/rolandinsh/itempropwp/issues/10) Thanks for report to [Arthur Lutz](http://wordpress.org/support/profile/arthurlutz)
* tested: PHP 5.2.10 & Apache 2.2 / 5.5.9 & apache 2.4
= 3.4.0 =
* updated: in Review - default price now with filter
* updated: in Review - default currency now with filter
= 3.3.6 =
* fixed: wp_register_style was called incorrectly. Reported RFT Group.
= 3.3.5 =
* small bugfix in rare cases: "For some reason all blog articles now have Type: http://schema.org/Review;", thanks to [indevd bugreport](http://wordpress.org/support/topic/schemaorgreview?replies=4#post-3882462)
= 3.3.4 =
* small bugfix in rare cases: "loading content multiple times", thanks to [sirene's commit on SimpleMediaCode.org](https://simplemediacode.org/forums/topic/schema-display-3-times/#post-97)
= 3.3.3 =
* small bugfix "Fixing undeclared variables", thanks to [semplon's commit on github](https://github.com/rolandinsh/itempropwp/commit/d4e18904329faabb84f6c47a7011a261c973b6bf)
= 3.3.2 =
* Compatibility with NextGen gallery. Thanks to [indevd](http://wordpress.org/support/topic/mod-for-nextgen-gallery-users?replies=2#post-3807567)
= 3.3.1 =
* Review summary fix
* updated: better naming
* updated: review On/Off positions
= 3.3.0 =
* new: itemprop="review"
* updated: admin interface for options
= 3.2.0 =
* updated: admin interface for options
* new: CSS class for wrapper
= 3.1.4 =
* updated: itemprop="description"
* Admin interface for options: description lenght (if excerpt not provided),show/hide UserComments:325, show/hide dateModified
= 3.1.3 =
* fixed: itemprop="description"
= 3.1.2 =
* fix: itemprop="description"
= 3.1.1 =
* new: itemprop="description"
= 3.0 =
* new: context
* new: itemprop="name"
* new: itemprop="url"
* new: itemprop="image"
* new: itemprop="author"
* new: itemprop="datePublished"
* new: "UserComments:325" itemprop="interactionCount"
= 2.0 =
* new code
* now as extendable class function
* new: using WordPress filter for image attributed on thumbnails
= 1.1 =
* fix: SMCIPWPURL
= 1.0 =
* init
== Upgrade Notice ==
= 3.5.201706131 =
* implementing index.php against exposure of data
= 3.5.201610051 =
* tested up to 4.6.1
= 3.5.201604171 =
* tested up to 4.5
= 3.5.201602152 =
* schema.org and Google article requirement changes (since 3.5.201602152). Thanks to [@jasonreposa](https://github.com/jasonreposa)
= 3.5.201512231 =
* Versions changed. Nothing more
= 3.4.10 =
* Undefined WPLANG [Issue #30](https://github.com/rolandinsh/itempropwp/issues/30). Thanks to [@Monika](https://wordpress.org/support/profile/monika).
= 3.4.9 =
* Same as 3.4.8 - Illegal string offset onoff [Issue #20](https://github.com/rolandinsh/itempropwp/issues/20)
= 3.4.8 =
* Illegal string offset onoff [Issue #20](https://github.com/rolandinsh/itempropwp/issues/20)
= 3.4.7 =
* Missing headline [Issue #21](https://github.com/rolandinsh/itempropwp/issues/21)
= 3.4.6 =
* Simple check for WordPress. Make sure we don't expose any info if called directly [Issue #18](https://github.com/rolandinsh/itempropwp/issues/18)
= 3.4.5 =
* compatible with WordPress 4.2.*
= 3.4.4 =
* Typo fix in plugin's description
= 3.4.3 =
* Many bug fixed. Issues [closed in 3.4.3](http://go.mediabox.lv/itempropwp343c)
= 3.4.0 =
* updated: in Review - default price now with filter
* updated: in Review - default currency now with filter
= 3.3.6 =
* fixed: wp_register_style was called incorrectly. Reported RFT Group.
= 3.3.5 =
* small bugfix in rare cases: "For some reason all blog articles now have Type: http://schema.org/Review;", thanks to [indevd bugreport](http://wordpress.org/support/topic/schemaorgreview?replies=4#post-3882462)
= 3.3.4 =
* small bugfix in rare cases: "loading content multiple times if more than one the_content()", thanks to [sirene's commit on SimpleMediaCode.org](http://simplemediacode.org/forums/topic/schema-display-3-times/#post-97)
= 3.3.3 =
* small bugfix "Fixing undeclared variables", thanks to [semplon's commit on github](https://github.com/rolandinsh/itempropwp/commit/d4e18904329faabb84f6c47a7011a261c973b6bf)
== Screenshots ==
1. 3.0 Full featured example https://simplemediacode.com/wordpress-pugins/itemprop-wp/
2. 3.3.0 Full featured Review example https://simplemediacode.com/wordpress-pugins/itemprop-wp/