Plugin Directory

Changeset 1833938


Ignore:
Timestamp:
03/05/2018 06:03:16 PM (8 years ago)
Author:
vberkel
Message:

Release v1.9.9 fix javascript widget enqueue, schema placement setting

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

Legend:

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

    r1816579 r1833938  
    55 * Plugin URI: http://www.schemaapp.com
    66 * Description: This plugin adds http://schema.org structured data to your website
    7  * Version: 1.9.8
     7 * Version: 1.9.9
    88 * Author: Hunch Manifest
    99 * Author URI: https://www.hunchmanifest.com
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaFront.php

    r1813014 r1833938  
    1818        add_action( 'init', array( $this, 'HandleCache' ) );
    1919        add_action( 'wp', array( $this, 'LinkedOpenData' ), 10, 1 );
    20         add_action( 'wp_footer', array( $this, 'hunch_schema_add' ), 50 );
     20
     21        // Do not change priority of following hooks as it breaks hook chaining and functions like wp_localize_script
     22        if ( ! empty( $this->Settings['SchemaDefaultLocation'] ) && $this->Settings['SchemaDefaultLocation'] == 'Footer' )
     23        {
     24            add_action( 'wp_footer', array( $this, 'hunch_schema_add' ) );
     25        }
     26        else
     27        {
     28            add_action( 'wp_head', array( $this, 'hunch_schema_add' ) );
     29        }
    2130
    2231        if ( ! empty( $this->Settings['SchemaRemoveMicrodata'] ) )
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaSettings.php

    r1806006 r1833938  
    300300
    301301        add_settings_section( 'schema-default', 'Schema Default Settings', null, 'schema-app-setting' ); 
     302        add_settings_field( 'SchemaDefaultLocation', 'Location where to put the schema markup', array( $this, 'SettingsFieldSchemaDefaultLocation' ), 'schema-app-setting', 'schema-default' );
    302303        add_settings_field( 'SchemaDefaultTypePost', 'Post Default Schema Type', array( $this, 'SettingsFieldSchemaDefaultTypePost' ), 'schema-app-setting', 'schema-default' );
    303304        add_settings_field( 'SchemaDefaultTypePage', 'Page Default Schema Type', array( $this, 'SettingsFieldSchemaDefaultTypePage' ), 'schema-app-setting', 'schema-default' );
     
    504505
    505506
    506         foreach ( array( 'publisher_type', 'publisher_name', 'publisher_image', 'SchemaDefaultTypePost', 'SchemaDefaultTypePage', 'SchemaDefaultImage', 'ToolbarShowTestSchema', 'SchemaBreadcrumb', 'SchemaWebSite', 'SchemaLinkedOpenData', 'SchemaRemoveMicrodata', 'SchemaRemoveWPSEOMarkup', 'Version', 'NoticeDismissWooCommerceAddon' ) as $FieldName )
     507        foreach ( array( 'publisher_type', 'publisher_name', 'publisher_image', 'SchemaDefaultLocation', 'SchemaDefaultTypePost', 'SchemaDefaultTypePage', 'SchemaDefaultImage', 'ToolbarShowTestSchema', 'SchemaBreadcrumb', 'SchemaWebSite', 'SchemaLinkedOpenData', 'SchemaRemoveMicrodata', 'SchemaRemoveWPSEOMarkup', 'Version', 'NoticeDismissWooCommerceAddon' ) as $FieldName )
    507508        {
    508509            if ( isset( $input[$FieldName] ) && $input[$FieldName] != '' )
     
    647648
    648649    }
     650
     651
     652    public function SettingsFieldSchemaDefaultLocation( $Options )
     653    {
     654        $Value = ! empty ( $this->Settings['SchemaDefaultLocation'] ) ? esc_attr( $this->Settings['SchemaDefaultLocation'] ) : 'Header';
     655
     656        ?>
     657
     658            <select name="schema_option_name[SchemaDefaultLocation]">
     659                <option value="Header" <?php selected( $Value, 'Header' ); ?>>Header</option>
     660                <option value="Footer" <?php selected( $Value, 'Footer' ); ?>>Footer</option>
     661            </select>
     662
     663        <?php
     664    }
    649665
    650666
  • schema-app-structured-data-for-schemaorg/trunk/readme.txt

    r1816579 r1833938  
    77Requires at least: 3.5
    88Tested up to: 4.8
    9 Stable tag: 1.9.8
     9Stable tag: 1.9.9
    1010License: GPL2
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8484
    8585== Changelog ==
     86= 1.9.9 =
     87- Feature, add setting for schema in header or footer
     88- Fix, Advanced Plugin Rating Widget Javascript enqueue priority
     89
    8690= 1.9.8 =
    8791- Fix, Ignore cached null returned
Note: See TracChangeset for help on using the changeset viewer.