Plugin Directory

Changeset 1927492


Ignore:
Timestamp:
08/20/2018 04:32:30 PM (8 years ago)
Author:
vberkel
Message:

Release v1.10.1, Fix to Yoast Wordpress SEO breadcrumb @id collisions

Location:
schema-app-structured-data-for-schemaorg/trunk
Files:
2 edited
4 copied

Legend:

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

    r1911175 r1927492  
    4545        }
    4646
     47        // Disable WPSEO Breadcrumb markup if ours is enabled
     48        if ( ! empty( $this->Settings['SchemaBreadcrumb'] ) )
     49        {
     50            add_filter( 'wpseo_json_ld_output', array( $this, 'RemoveWPSEOJsonLDBreadcrumb' ), 10, 2 );
     51        }
     52
    4753        // Priority 15 ensures it runs after Genesis itself has setup.
    4854        add_action( 'genesis_setup', array( $this, 'GenesisSetup' ), 15 );
     
    223229    public function RemoveWPSEOJsonLD( $data, $context )
    224230    {
    225         if ( in_array( $context, array( 'website', 'company', 'person' ) ) )
     231        if ( in_array( $context, array( 'website', 'company', 'person', 'breadcrumb' ) ) )
     232        {
     233            return array();
     234        }
     235
     236        return $data;
     237    }
     238
     239
     240    public function RemoveWPSEOJsonLDBreadcrumb( $data, $context )
     241    {
     242        if ( $context == 'breadcrumb' )
    226243        {
    227244            return array();
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaSettings.php

    r1911175 r1927492  
    802802                <option value="0" <?php selected( $Value, 0 ); ?>>Disabled</option>
    803803            </select>
    804             <p>Remove Website and Person/Company JSON/LD markup.</p>
     804            <p>Remove Website, Person/Company and Breadcrumb JSON/LD markup.</p>
    805805
    806806        <?php
Note: See TracChangeset for help on using the changeset viewer.