Plugin Directory

Changeset 2153620


Ignore:
Timestamp:
09/09/2019 02:43:02 PM (6 years ago)
Author:
milanmk
Message:

Release 1.14.1

Location:
schema-app-structured-data-for-schemaorg
Files:
26 added
7 edited

Legend:

Unmodified
Added
Removed
  • schema-app-structured-data-for-schemaorg/trunk/hunch-schema.php

    r2129926 r2153620  
    55 * Plugin URI: http://www.schemaapp.com
    66 * Description: This plugin adds http://schema.org structured data to your website
    7  * Version: 1.14.0
     7 * Version: 1.14.1
    88 * Author: Hunch Manifest
    99 * Author URI: https://www.hunchmanifest.com
  • schema-app-structured-data-for-schemaorg/trunk/lib/HunchSchema/Blog.php

    r2074727 r2153620  
    2626
    2727
    28         $blogPost = array();
     28        $hasPart = array();
    2929
    30         while (have_posts()) : the_post();
     30        while ( have_posts() ) : the_post();
    3131
    32             $blogPost[] = array (
    33                 '@type' => ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting',
    34                 '@id' => get_the_permalink(),
    35                 'headline' => get_the_title(),
    36                 'url' => get_the_permalink(),
    37                 'datePublished' => get_the_date( 'Y-m-d' ),
    38                 'dateModified' => get_the_modified_date( 'Y-m-d' ),
    39                 'mainEntityOfPage' => get_the_permalink(),
    40                 'author' => $this->getAuthor(),
    41                 'publisher' => $this->getPublisher(),
    42                 'image' => $this->getImage(),
    43                 'wordCount' => str_word_count( get_the_content() ),
    44                 'keywords' => $this->getTags(),
    45                 'commentCount' => get_comments_number(),
    46                 'comment' => $this->getComments(),
     32            $part = array(
     33                '@type' => ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting',
     34                '@id' => get_the_permalink(),
     35                'headline' => get_the_title(),
     36                'url' => get_the_permalink(),
     37                'datePublished' => get_the_date( 'Y-m-d' ),
     38                'dateModified' => get_the_modified_date( 'Y-m-d' ),
     39                'mainEntityOfPage' => get_the_permalink(),
     40                'author' => $this->getAuthor(),
     41                'publisher' => $this->getPublisher(),
     42                'image' => $this->getImage(),
     43                'wordCount' => str_word_count( get_the_content() ),
     44                'keywords' => $this->getTags(),
    4745            );
     46
     47            if ( get_comments_number() && empty( $this->Settings['SchemaHideComments'] ) ) {
     48                $part['commentCount'] = get_comments_number();
     49                $part['comment'] = $this->getComments();
     50            }
     51
     52            $hasPart[] = $part;
    4853
    4954        endwhile;
     
    6065
    6166        if ( ! empty( $this->Settings['SchemaDefaultTypePost'] ) ) {
    62             $this->schema['hasPart'] = $blogPost;
     67            $this->schema['hasPart'] = $hasPart;
    6368        } else {
    64             $this->schema['blogPost'] = $blogPost;
     69            $this->schema['blogPost'] = $hasPart;
    6570        }
    6671
  • schema-app-structured-data-for-schemaorg/trunk/lib/HunchSchema/Category.php

    r2074727 r2153620  
    1515        $hasPart = array();
    1616
    17         while (have_posts()) : the_post();
     17        while ( have_posts() ) : the_post();
    1818
    19             $hasPart[] = array
    20                 (
    21                 '@type' => ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting',
    22                 '@id' => get_the_permalink(),
    23                 'headline' => get_the_title(),
    24                 'url' => get_the_permalink(),
    25                 'datePublished' => get_the_date('Y-m-d'),
    26                 'dateModified' => get_the_modified_date('Y-m-d'),
    27                 'mainEntityOfPage' => get_the_permalink(),
    28                 'author' => $this->getAuthor(),
    29                 'publisher' => $this->getPublisher(),
    30                 'image' => $this->getImage(),
    31                 'keywords' => $this->getTags(),
    32                 'commentCount' => get_comments_number(),
    33                 'comment' => $this->getComments(),
    34             );
     19            $part = array(
     20                '@type' => ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting',
     21                '@id' => get_the_permalink(),
     22                'headline' => get_the_title(),
     23                'url' => get_the_permalink(),
     24                'datePublished' => get_the_date('Y-m-d'),
     25                'dateModified' => get_the_modified_date('Y-m-d'),
     26                'mainEntityOfPage' => get_the_permalink(),
     27                'author' => $this->getAuthor(),
     28                'publisher' => $this->getPublisher(),
     29                'image' => $this->getImage(),
     30                'keywords' => $this->getTags(),
     31            );
     32
     33            if ( get_comments_number() && empty( $this->Settings['SchemaHideComments'] ) ) {
     34                $part['commentCount'] = get_comments_number();
     35                $part['comment'] = $this->getComments();
     36            }
     37
     38            $hasPart[] = $part;
    3539
    3640        endwhile;
    3741
    3842
    39         $this->schema = array
    40             (
    41             '@context' => 'http://schema.org/',
     43        $this->schema = array(
     44            '@context' => 'http://schema.org/',
    4245            '@type' => $this->schemaType,
    4346            '@id' => get_category_link( get_query_var( 'cat' ) ) . '#' . $this->schemaType,
  • schema-app-structured-data-for-schemaorg/trunk/lib/HunchSchema/Post.php

    r2074727 r2153620  
    1414
    1515
    16         $this->schema['@type'] = ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting';
     16        $this->schemaType = ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting';
     17        $this->schema['@type'] = $this->schemaType;
    1718        $this->schema['@id'] = get_permalink() . '#' . $this->schema['@type'];
    1819
  • schema-app-structured-data-for-schemaorg/trunk/lib/HunchSchema/Tag.php

    r2074727 r2153620  
    1212    public $schemaType = "CollectionPage";
    1313
    14     public function getResource( $pretty = false )
    15     {
     14    public function getResource( $pretty = false ) {
    1615        $hasPart = array();
    1716
    1817        while ( have_posts() ) : the_post();
    1918
    20             $hasPart[] = array
    21             (
     19            $part = array(
    2220                '@type' => ! empty( $this->Settings['SchemaDefaultTypePost'] ) ? $this->Settings['SchemaDefaultTypePost'] : 'BlogPosting',
    2321                '@id' => get_the_permalink(),
     
    3129                'image' => $this->getImage(),
    3230                'keywords' => $this->getTags(),
    33                 'commentCount' => get_comments_number(),
    34                 'comment' => $this->getComments(),
    3531            );
     32
     33            if ( get_comments_number() && empty( $this->Settings['SchemaHideComments'] ) ) {
     34                $part['commentCount'] = get_comments_number();
     35                $part['comment'] = $this->getComments();
     36            }
     37
     38            $hasPart[] = $part;
    3639
    3740        endwhile;
    3841
    3942
    40         $this->schema = array
    41         (
     43        $this->schema = array(
    4244            '@context' => 'http://schema.org/',
    4345            '@type' => $this->schemaType,
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaEditor.php

    r1976919 r2153620  
    117117                                <button id="extendSchema" value="Extend Markup"><a target="_blank" href="#">Add to <?php echo $schemaObj->schemaType; ?> Default Markup</a></button>
    118118                            <?php endif; ?>
    119                             <input type="hidden" id="resourceURI" value="<?php echo get_permalink($post->ID); ?>"/>
     119                            <input type="hidden" id="resourceURI" value="<?php echo get_permalink($post->ID); ?>#<?php print $schemaObj->schemaType; ?>"/>
    120120                            <textarea id="resourceData" style="display:none"><?php echo esc_attr($jsonLd); ?></textarea>
    121121                            <?php
  • schema-app-structured-data-for-schemaorg/trunk/readme.txt

    r2129926 r2153620  
    99Requires PHP: 5.4
    1010Tested up to: 5.2
    11 Stable tag: 1.14.0
     11Stable tag: 1.14.1
    1212License: GPL2
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8787== Changelog ==
    8888
     89= 1.14.1 =
     90- Fix, Remove comment schema setting for archive pages
     91
    8992= 1.14.0 =
    9093- Feature, Added webhook support for schema data events which will update markup cache in realtime
     
    380383== Upgrade Notice ==
    381384
    382 = 1.14.0 =
    383 - Added webhook support for schema data events, WC migrate license web service
     385= 1.14.1 =
     386- Remove comment schema setting for archive pages
Note: See TracChangeset for help on using the changeset viewer.