Changeset 1320016
- Timestamp:
- 01/02/2016 08:13:46 PM (10 years ago)
- Location:
- wp-jsonld/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (4 diffs)
-
wp-jsonld.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-jsonld/trunk/readme.txt
r1320002 r1320016 7 7 Requires at least: 4.0 8 8 Tested up to: 4.4 9 Stable tag: 0. 2.49 Stable tag: 0.3.1 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 21 21 missing tags, putting objects into fields instead of just URLs for images, and implementing for more than just 22 22 articles. 23 24 Also, this plugin plays nicely with [YASR - yet another star rating](https://de.wordpress.org/plugins/yet-another-stars-rating/). It will 25 remove yasr's invalid jsonld-syntax and instead use YASRs rating. 26 27 All requests are being cached and purged on page update/edit etc. 23 28 24 29 = Original description = … … 50 55 3. That’s it. 51 56 52 **Compatibility.** This version requires php 5.4 for some options of json _encode. If you encounter any problems with the plugin you should check your web hotel’s php version.57 **Compatibility.** This version requires php 5.4 for some options of json\_encode. If you encounter any problems with the plugin you should check your web hotel’s php version. 53 58 54 59 == Frequently Asked Questions == == … … 73 78 == Changelog == 74 79 80 = 0.3 = 81 * Use transients for caching. 82 * Use tag 'aggregateRating' if YSSR is installed. 83 75 84 = 0.2 = 76 85 * Extended the functionality a bit and completely refactored the code to make it much more readable. -
wp-jsonld/trunk/wp-jsonld.php
r1320002 r1320016 68 68 69 69 /** 70 * create Author- create Author Markup70 * create_author_entity( - create Author Markup 71 71 * 72 72 * @param bool|FALSE $isParent 73 73 */ 74 function create Author($isParent = false) {74 function create_author_entity($isParent = false) { 75 75 $auId = get_the_author_meta( 'ID' ); 76 76 $author = new Author($isParent); … … 172 172 173 173 function create_jsonld_author() { 174 $markup = $this->create Author(true);174 $markup = $this->create_author_entity(true); 175 175 //$markup->mainEntityOfPage = createMainEntity('WebPage', $markup->url); 176 176 //$markup->generatedAt = date('Y-m-d H:i:s'); … … 213 213 function create_jsonld_blogposting() { 214 214 $markup = $this->createBlogPosting(true); 215 $markup->author = $this->create Author();215 $markup->author = $this->create_author_entity(); 216 216 $markup->publisher = $this->createOrganization(); 217 217 $markup->image = $this->createImage(); … … 271 271 272 272 // if markup found, insert. 273 if ( !null === $markup) {273 if (null !== $markup) { 274 274 echo '<script type="application/ld+json">' 275 275 . $markup
Note: See TracChangeset
for help on using the changeset viewer.