Changeset 2456178
- Timestamp:
- 01/14/2021 09:57:17 AM (5 years ago)
- Location:
- fudugo-schema
- Files:
-
- 6 edited
-
tags/1.0.0/fs-schema.php (modified) (1 diff)
-
tags/1.0.0/includes/class-fs-metabox.php (modified) (2 diffs)
-
tags/1.0.0/readme.txt (modified) (1 diff)
-
trunk/fs-schema.php (modified) (1 diff)
-
trunk/includes/class-fs-metabox.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fudugo-schema/tags/1.0.0/fs-schema.php
r2455564 r2456178 6 6 * Tested up to: 5.6 7 7 * Requires PHP: 5.6 8 * Author: Fudugo Team8 * Author: Fudugo 9 9 * Author URI: https://fudugo.com 10 10 * Text Domain: fs-schema-wordpress -
fudugo-schema/tags/1.0.0/includes/class-fs-metabox.php
r2455564 r2456178 322 322 return $post_id; 323 323 } 324 $post_type = esc_attr($_GET['post_type']); 324 if(isset($_GET['post_type'])) { 325 $post_type = $_GET['post_type']; 326 } 325 327 326 328 // Check permissions … … 335 337 $schemaFields = $schemaModel->getSchemaFields(); 336 338 337 foreach ( $schemaFields as $schemaID => $schema ) { 338 $schemaMetaId = "fssc_" . $schemaID; 339 $data = array(); 340 if ( ! empty( $schema['fields'] ) ) { 341 foreach ( $schema['fields'] as $fieldId => $fieldData ) { 342 $value = ( ! empty( $_REQUEST[ $schemaMetaId ][ $fieldId ]) ? fssc_sanitizeInputValue($_REQUEST[ $schemaMetaId ][ $fieldId ], $_REQUEST[ $schemaMetaId ][ $fieldId ]['type']) : null ); 343 if(!is_array($value)){ 344 $value = $schemaModel->sanitize( $fieldData, $value ); 345 } 346 $data[ $fieldId ] = $value; 339 if( ! empty( $schemaFields )){ 340 foreach ( $schemaFields as $schemaID => $schema ) { 341 $schemaMetaId = "fssc_" . $schemaID; 342 $data = array(); 343 if ( ! empty( $schema['fields'] ) ) { 344 foreach ( $schema['fields'] as $fieldId => $fieldData ) { 345 $value = ( ! empty( $_REQUEST[ $schemaMetaId ][ $fieldId ]) ? fssc_sanitizeInputValue($_REQUEST[ $schemaMetaId ][ $fieldId ], $_REQUEST[ $schemaMetaId ][ $fieldId ]['type']) : null ); 346 if(!is_array($value)){ 347 $value = $schemaModel->sanitize( $fieldData, $value ); 348 } 349 $data[ $fieldId ] = $value; 350 } 347 351 } 348 }349 $meta[ $schemaMetaId ] = $data;352 $meta[ $schemaMetaId ] = $data; 353 } 350 354 } 351 355 if ( count( $meta ) > 0 ) { -
fudugo-schema/tags/1.0.0/readme.txt
r2455564 r2456178 2 2 Contributors: fudugo, neha13 3 3 Tags: json-ld, structured data, schema, rich snippets, Microdata, SEO, local seo, google, sitelinks, schema.org. 4 Author: Fudugo Team4 Author: Fudugo 5 5 Author URI: https://fudugo.com 6 6 Version: 1.0.0 -
fudugo-schema/trunk/fs-schema.php
r2455564 r2456178 6 6 * Tested up to: 5.6 7 7 * Requires PHP: 5.6 8 * Author: Fudugo Team8 * Author: Fudugo 9 9 * Author URI: https://fudugo.com 10 10 * Text Domain: fs-schema-wordpress -
fudugo-schema/trunk/includes/class-fs-metabox.php
r2455564 r2456178 322 322 return $post_id; 323 323 } 324 $post_type = esc_attr($_GET['post_type']); 324 if(isset($_GET['post_type'])) { 325 $post_type = $_GET['post_type']; 326 } 325 327 326 328 // Check permissions … … 335 337 $schemaFields = $schemaModel->getSchemaFields(); 336 338 337 foreach ( $schemaFields as $schemaID => $schema ) { 338 $schemaMetaId = "fssc_" . $schemaID; 339 $data = array(); 340 if ( ! empty( $schema['fields'] ) ) { 341 foreach ( $schema['fields'] as $fieldId => $fieldData ) { 342 $value = ( ! empty( $_REQUEST[ $schemaMetaId ][ $fieldId ]) ? fssc_sanitizeInputValue($_REQUEST[ $schemaMetaId ][ $fieldId ], $_REQUEST[ $schemaMetaId ][ $fieldId ]['type']) : null ); 343 if(!is_array($value)){ 344 $value = $schemaModel->sanitize( $fieldData, $value ); 345 } 346 $data[ $fieldId ] = $value; 339 if( ! empty( $schemaFields )){ 340 foreach ( $schemaFields as $schemaID => $schema ) { 341 $schemaMetaId = "fssc_" . $schemaID; 342 $data = array(); 343 if ( ! empty( $schema['fields'] ) ) { 344 foreach ( $schema['fields'] as $fieldId => $fieldData ) { 345 $value = ( ! empty( $_REQUEST[ $schemaMetaId ][ $fieldId ]) ? fssc_sanitizeInputValue($_REQUEST[ $schemaMetaId ][ $fieldId ], $_REQUEST[ $schemaMetaId ][ $fieldId ]['type']) : null ); 346 if(!is_array($value)){ 347 $value = $schemaModel->sanitize( $fieldData, $value ); 348 } 349 $data[ $fieldId ] = $value; 350 } 347 351 } 348 }349 $meta[ $schemaMetaId ] = $data;352 $meta[ $schemaMetaId ] = $data; 353 } 350 354 } 351 355 if ( count( $meta ) > 0 ) { -
fudugo-schema/trunk/readme.txt
r2455564 r2456178 2 2 Contributors: fudugo, neha13 3 3 Tags: json-ld, structured data, schema, rich snippets, Microdata, SEO, local seo, google, sitelinks, schema.org. 4 Author: Fudugo Team4 Author: Fudugo 5 5 Author URI: https://fudugo.com 6 6 Version: 1.0.0
Note: See TracChangeset
for help on using the changeset viewer.