Changeset 1833938
- Timestamp:
- 03/05/2018 06:03:16 PM (8 years ago)
- Location:
- schema-app-structured-data-for-schemaorg/trunk
- Files:
-
- 4 edited
-
hunch-schema.php (modified) (1 diff)
-
lib/SchemaFront.php (modified) (1 diff)
-
lib/SchemaSettings.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
schema-app-structured-data-for-schemaorg/trunk/hunch-schema.php
r1816579 r1833938 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.9. 87 * Version: 1.9.9 8 8 * Author: Hunch Manifest 9 9 * Author URI: https://www.hunchmanifest.com -
schema-app-structured-data-for-schemaorg/trunk/lib/SchemaFront.php
r1813014 r1833938 18 18 add_action( 'init', array( $this, 'HandleCache' ) ); 19 19 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 } 21 30 22 31 if ( ! empty( $this->Settings['SchemaRemoveMicrodata'] ) ) -
schema-app-structured-data-for-schemaorg/trunk/lib/SchemaSettings.php
r1806006 r1833938 300 300 301 301 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' ); 302 303 add_settings_field( 'SchemaDefaultTypePost', 'Post Default Schema Type', array( $this, 'SettingsFieldSchemaDefaultTypePost' ), 'schema-app-setting', 'schema-default' ); 303 304 add_settings_field( 'SchemaDefaultTypePage', 'Page Default Schema Type', array( $this, 'SettingsFieldSchemaDefaultTypePage' ), 'schema-app-setting', 'schema-default' ); … … 504 505 505 506 506 foreach ( array( 'publisher_type', 'publisher_name', 'publisher_image', 'SchemaDefault TypePost', '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 ) 507 508 { 508 509 if ( isset( $input[$FieldName] ) && $input[$FieldName] != '' ) … … 647 648 648 649 } 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 } 649 665 650 666 -
schema-app-structured-data-for-schemaorg/trunk/readme.txt
r1816579 r1833938 7 7 Requires at least: 3.5 8 8 Tested up to: 4.8 9 Stable tag: 1.9. 89 Stable tag: 1.9.9 10 10 License: GPL2 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 84 84 85 85 == 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 86 90 = 1.9.8 = 87 91 - Fix, Ignore cached null returned
Note: See TracChangeset
for help on using the changeset viewer.