Changeset 2484163
- Timestamp:
- 03/02/2021 10:11:41 AM (5 years ago)
- Location:
- multi-rating/trunk
- Files:
-
- 4 edited
-
includes/admin/update-check.php (modified) (1 diff)
-
includes/class-structured-data.php (modified) (4 diffs)
-
multi-rating.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multi-rating/trunk/includes/admin/update-check.php
r2331585 r2484163 8 8 // Check if we need to do an upgrade from a previous version 9 9 $previous_plugin_version = get_option( Multi_Rating::VERSION_OPTION ); 10 11 if ( ! $previous_plugin_version ) { // not set 12 update_option( Multi_Rating::VERSION_OPTION, Multi_Rating::VERSION ); // latest version upgrade complete 13 return; 14 } 10 15 11 16 if ( $previous_plugin_version != Multi_Rating::VERSION && $previous_plugin_version < 3 ) { -
multi-rating/trunk/includes/class-structured-data.php
r2331585 r2484163 71 71 $structured_data_type = get_post_meta( $post_id, Multi_Rating::STRUCTURED_DATA_TYPE_POST_META, true ); 72 72 73 $structured_data_type = apply_filters( 'mr_structured_data_item_type', $structured_data_type, $post_id ); 74 73 75 if ( $structured_data_type == '' ) { 74 76 return; … … 104 106 "@context": "https://schema.org/", 105 107 "@type": "<?php echo $structured_data_type; ?>", 106 "name": "<?php echo $post_title; ?>",108 "name": "<?php echo htmlspecialchars( addslashes( $post_title ), ENT_NOQUOTES ); ?>", 107 109 <?php if ($post_thumbnail_url) { ?> 108 110 "image": [ … … 110 112 ], 111 113 <?php } if ($post_excerpt) { ?> 112 "description": "<?php echo esc_html($post_excerpt); ?>",114 "description": "<?php echo htmlspecialchars( addslashes( $post_excerpt ), ENT_NOQUOTES ); ?>", 113 115 <?php } 114 116 echo apply_filters( 'mr_structured_data_type', '', $post_id ); ?> … … 191 193 192 194 } 193 194 195 function mr_structured_data_type_localbusiness_example( $schema, $post_id ) {196 197 $structured_data_type = get_post_meta( $post_id, Multi_Rating::STRUCTURED_DATA_TYPE_POST_META, true );198 199 if ( $structured_data_type === 'LocalBusiness' ) {200 return '201 "address": {202 "@type": "PostalAddress",203 "addressLocality": "Seattle",204 "addressRegion": "WA",205 "postalCode": "98052",206 "streetAddress": "20341 Whitworth Institute 405 N. Whitworth"207 },208 "priceRange": "$$$",209 "telephone": "+18005551234",';210 }211 212 return '';213 }214 add_filter( 'mr_structured_data_type' , 'mr_structured_data_type_localbusiness_example', 10, 2); -
multi-rating/trunk/multi-rating.php
r2385304 r2484163 4 4 Plugin URI: http://wordpress.org/plugins/multi-rating/ 5 5 Description: A powerful rating system and review plugin for WordPress. 6 Version: 5.0. 36 Version: 5.0.4 7 7 Author: Daniel Powney 8 8 Author URI: http://danielpowney.com … … 34 34 */ 35 35 const 36 VERSION = '5.0. 3',36 VERSION = '5.0.4', 37 37 ID = 'multi-rating', 38 38 -
multi-rating/trunk/readme.txt
r2385304 r2484163 3 3 Tags: rating, review, post rating, star rating, seo, schema.org, json-ld 4 4 Requires at least: 4.0 5 Tested up to: 5. 55 Tested up to: 5.6 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 86 86 87 87 == Changelog == 88 89 = 5.0.4 (02/03/2021) = 90 * New: Added mr_structured_data_item_type filter 91 * Fix: Special characters causing invalid JSON-LD markup 92 * Fix: Fresh install upgrade error 88 93 89 94 = 5.0.3 (21/09/2020) =
Note: See TracChangeset
for help on using the changeset viewer.