Plugin Directory

Changeset 2484163


Ignore:
Timestamp:
03/02/2021 10:11:41 AM (5 years ago)
Author:
dpowney
Message:

v5.0.4 changes

Location:
multi-rating/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • multi-rating/trunk/includes/admin/update-check.php

    r2331585 r2484163  
    88    // Check if we need to do an upgrade from a previous version
    99    $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    }
    1015   
    1116    if ( $previous_plugin_version != Multi_Rating::VERSION && $previous_plugin_version < 3 ) {
  • multi-rating/trunk/includes/class-structured-data.php

    r2331585 r2484163  
    7171            $structured_data_type = get_post_meta( $post_id, Multi_Rating::STRUCTURED_DATA_TYPE_POST_META, true );
    7272
     73            $structured_data_type = apply_filters( 'mr_structured_data_item_type', $structured_data_type, $post_id );
     74
    7375            if ( $structured_data_type == '' ) {
    7476                return;
     
    104106        "@context": "https://schema.org/",
    105107        "@type": "<?php echo $structured_data_type; ?>",
    106         "name": "<?php echo $post_title; ?>",
     108        "name": "<?php echo htmlspecialchars( addslashes( $post_title ), ENT_NOQUOTES ); ?>",
    107109<?php if ($post_thumbnail_url) { ?>
    108110        "image": [
     
    110112        ],
    111113<?php } if ($post_excerpt) { ?>
    112         "description": "<?php echo esc_html($post_excerpt); ?>",
     114        "description": "<?php echo htmlspecialchars( addslashes( $post_excerpt ), ENT_NOQUOTES ); ?>",
    113115<?php }
    114116echo apply_filters( 'mr_structured_data_type', '', $post_id ); ?>
     
    191193
    192194}
    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  
    44Plugin URI: http://wordpress.org/plugins/multi-rating/
    55Description: A powerful rating system and review plugin for WordPress.
    6 Version: 5.0.3
     6Version: 5.0.4
    77Author: Daniel Powney
    88Author URI: http://danielpowney.com
     
    3434     */
    3535    const
    36     VERSION = '5.0.3',
     36    VERSION = '5.0.4',
    3737    ID = 'multi-rating',
    3838
  • multi-rating/trunk/readme.txt

    r2385304 r2484163  
    33Tags: rating, review, post rating, star rating, seo, schema.org, json-ld
    44Requires at least: 4.0
    5 Tested up to: 5.5
     5Tested up to: 5.6
    66Stable tag: trunk
    77License: GPLv2 or later
     
    8686
    8787== 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
    8893
    8994= 5.0.3 (21/09/2020) =
Note: See TracChangeset for help on using the changeset viewer.