Changeset 2309953
- Timestamp:
- 05/22/2020 05:39:05 AM (6 years ago)
- Location:
- schema-app-structured-data-for-schemaorg
- Files:
-
- 26 added
- 4 edited
-
tags/1.15.4 (added)
-
tags/1.15.4/css (added)
-
tags/1.15.4/css/schemaStyle.css (added)
-
tags/1.15.4/data (added)
-
tags/1.15.4/data/tree.jsonld (added)
-
tags/1.15.4/hunch-schema.php (added)
-
tags/1.15.4/js (added)
-
tags/1.15.4/js/schema.js (added)
-
tags/1.15.4/js/schemaAdmin.js (added)
-
tags/1.15.4/js/schemaEditor.js (added)
-
tags/1.15.4/lib (added)
-
tags/1.15.4/lib/HunchSchema (added)
-
tags/1.15.4/lib/HunchSchema/Author.php (added)
-
tags/1.15.4/lib/HunchSchema/Blog.php (added)
-
tags/1.15.4/lib/HunchSchema/Category.php (added)
-
tags/1.15.4/lib/HunchSchema/Page.php (added)
-
tags/1.15.4/lib/HunchSchema/Post.php (added)
-
tags/1.15.4/lib/HunchSchema/Search.php (added)
-
tags/1.15.4/lib/HunchSchema/Tag.php (added)
-
tags/1.15.4/lib/HunchSchema/Thing.php (added)
-
tags/1.15.4/lib/SchemaEditor.php (added)
-
tags/1.15.4/lib/SchemaFront.php (added)
-
tags/1.15.4/lib/SchemaServer.php (added)
-
tags/1.15.4/lib/SchemaSettings.php (added)
-
tags/1.15.4/lib/classmap.php (added)
-
tags/1.15.4/readme.txt (added)
-
trunk/hunch-schema.php (modified) (1 diff)
-
trunk/lib/HunchSchema/Page.php (modified) (1 diff)
-
trunk/lib/HunchSchema/Post.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
schema-app-structured-data-for-schemaorg/trunk/hunch-schema.php
r2295483 r2309953 5 5 * Plugin URI: http://www.schemaapp.com 6 6 * Description: This plugin adds http://schema.org structured data to your website 7 * Version: 1.15. 37 * Version: 1.15.4 8 8 * Author: Hunch Manifest 9 9 * Author URI: https://www.hunchmanifest.com -
schema-app-structured-data-for-schemaorg/trunk/lib/HunchSchema/Page.php
r2074727 r2309953 60 60 61 61 62 public function getBreadcrumb( $Pretty = false ) 63 { 62 public function getBreadcrumb( $Pretty = false ) { 64 63 global $post; 65 64 66 $ BreadcrumbPosition= 1;67 $this->SchemaBreadcrumb['@context'] = 'http://schema.org';68 $this->SchemaBreadcrumb['@type'] = 'BreadcrumbList';65 $position = 1; 66 $this->SchemaBreadcrumb['@context'] = 'http://schema.org'; 67 $this->SchemaBreadcrumb['@type'] = 'BreadcrumbList'; 69 68 70 $this->SchemaBreadcrumb['itemListElement'][] = array 71 ( 72 '@type' => 'ListItem', 73 'position' => $BreadcrumbPosition++, 74 'item' => array 75 ( 76 '@id' => home_url( '/#breadcrumbitem' ), 77 'name' => get_bloginfo( 'name' ), 78 ), 79 ); 69 if ( $post->post_parent ) { 70 $post_ancestors = array_reverse( get_post_ancestors( $post->ID ) ); 80 71 81 if ( $post->post_parent ) 82 { 83 $Ancestors = array_reverse( get_post_ancestors( $post->ID ) ); 84 85 foreach( $Ancestors as $PostId ) 86 { 87 $this->SchemaBreadcrumb['itemListElement'][] = array 88 ( 72 foreach( $post_ancestors as $post_id ) { 73 $this->SchemaBreadcrumb['itemListElement'][] = array( 89 74 '@type' => 'ListItem', 90 'position' => $BreadcrumbPosition++, 91 'item' => array 92 ( 93 '@id' => get_permalink( $PostId ) . "#breadcrumbitem", 94 'name' => get_the_title( $PostId ), 95 ), 75 'position' => $position++, 76 'name' => get_the_title( $post_id ), 77 'item' => get_permalink( $post_id ) . "#breadcrumbitem", 96 78 ); 97 79 } 98 80 } 99 81 100 if ( ! is_front_page() ) { 101 $this->SchemaBreadcrumb['itemListElement'][] = array 102 ( 103 '@type' => 'ListItem', 104 'position' => $BreadcrumbPosition++, 105 'item' => array 106 ( 107 '@id' => get_permalink() . "#breadcrumbitem", 108 'name' => get_the_title(), 109 ), 110 ); 111 } 82 if ( ! is_front_page() ) { 83 $this->SchemaBreadcrumb['itemListElement'][] = array( 84 '@type' => 'ListItem', 85 'position' => $position++, 86 'name' => get_the_title(), 87 'item' => get_permalink() . '#breadcrumbitem', 88 ); 89 } else { 90 return; 91 } 112 92 113 93 return $this->toJson( $this->SchemaBreadcrumb, $Pretty ); -
schema-app-structured-data-for-schemaorg/trunk/lib/HunchSchema/Post.php
r2153620 r2309953 42 42 43 43 44 public function getBreadcrumb( $Pretty = false ) 45 { 46 $BreadcrumbPosition = 1; 44 public function getBreadcrumb( $Pretty = false ) { 45 $position = 1; 46 $permalink_structure = get_option( 'permalink_structure' ); 47 $this->SchemaBreadcrumb['@context'] = 'http://schema.org/'; 48 $this->SchemaBreadcrumb['@type'] = 'BreadcrumbList'; 47 49 48 $this->SchemaBreadcrumb['@context'] = 'http://schema.org/'; 49 $this->SchemaBreadcrumb['@type'] = 'BreadcrumbList'; 50 if ( $permalink_structure ) { 51 $permalink_host = stristr( get_permalink(), parse_url( get_permalink(), PHP_URL_PATH ), true ); 52 $permalink_path_parts = array_values( array_filter( explode( '/', parse_url( get_permalink(), PHP_URL_PATH ) ) ) ); 50 53 51 $this->SchemaBreadcrumb['itemListElement'][] = array 52 ( 54 if ( ! empty( $permalink_path_parts ) ) { 55 array_pop( $permalink_path_parts ); 56 } 57 58 if ( ! empty( $permalink_path_parts ) ) { 59 $breadcrumb_permalink = $permalink_host; 60 61 foreach ( $permalink_path_parts as $item ) { 62 $breadcrumb_permalink .= "/{$item}/"; 63 64 $this->SchemaBreadcrumb['itemListElement'][] = array( 65 '@type' => 'ListItem', 66 'position' => $position, 67 'name' => ucwords( str_replace( '-', ' ', $item ) ), 68 'item' => $breadcrumb_permalink . '#breadcrumbitem', 69 ); 70 71 $position++; 72 } 73 } 74 } 75 76 $this->SchemaBreadcrumb['itemListElement'][] = array( 53 77 '@type' => 'ListItem', 54 'position' => $BreadcrumbPosition++, 55 'item' => array 56 ( 57 '@id' => home_url( '/#breadcrumbitem' ), 58 'name' => get_bloginfo( 'name' ), 59 ), 60 ); 61 62 $this->SchemaBreadcrumb['itemListElement'][] = array 63 ( 64 '@type' => 'ListItem', 65 'position' => $BreadcrumbPosition++, 66 'item' => array 67 ( 68 '@id' => get_permalink() . "#breadcrumbitem", 69 'name' => get_the_title(), 70 ), 78 'position' => $position++, 79 'name' => get_the_title(), 80 'item' => get_permalink() . '#breadcrumbitem', 71 81 ); 72 82 -
schema-app-structured-data-for-schemaorg/trunk/readme.txt
r2295483 r2309953 9 9 Requires PHP: 5.4 10 10 Tested up to: 5.4 11 Stable tag: 1.15. 311 Stable tag: 1.15.4 12 12 License: GPL2 13 13 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 87 87 == Changelog == 88 88 89 = 1.15.4 = 90 - Fix, Updated BreadcrumbList markup based on Google's schema 91 89 92 = 1.15.3 = 90 93 - Fix, hunch_schema_meta_box_post_types filter error … … 410 413 == Upgrade Notice == 411 414 412 = 1.15. 3=413 - Added back global options for Post/Page schema markup, CPT filter for schema metabox, Vimeo private video issue415 = 1.15.4 = 416 - Updated BreadcrumbList markup based on Google's schema
Note: See TracChangeset
for help on using the changeset viewer.