Plugin Directory

Changeset 1712233


Ignore:
Timestamp:
08/11/2017 06:06:29 PM (9 years ago)
Author:
trustedsite
Message:

Fix shortcode

Location:
trustedsite-reviews/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trustedsite-reviews/trunk/lib/App.php

    r1708559 r1712233  
    119119    {
    120120        $a = shortcode_atts(array(
    121             'id' => '',
     121            'type' => 'button',
     122            'pid' => '',
    122123        ), $atts);
    123         $id = $a['id'];
    124         return "<div class='trustedsite-widget' data-id='" . $id . "'></div>";
     124
     125        $type = $a['type'];
     126        $pid = $a['pid'];
     127       
     128        $map = array(
     129            "button" => 2,
     130            "carousel" => 4,
     131            "gallery" => 5,
     132            "summary" => 8,
     133            "stars" => 7
     134        );
     135
     136        $tid = 2;
     137        if(array_key_exists($type, $map)){
     138            $tid = $map[$type];
     139        }
     140       
     141        return "<div class='trustedsite-widget' data-type='" . $tid . "' data-pid='" . $pid . "'></div>";
    125142    }
    126143
  • trustedsite-reviews/trunk/readme.txt

    r1708584 r1712233  
    44Requires at least: 4.2.0
    55Tested up to: 4.8.0
    6 Stable tag: 1.0.8
     6Stable tag: 1.0.9
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • trustedsite-reviews/trunk/trustedsite-reviews.php

    r1708584 r1712233  
    55 * ------------------------------------------------------------------------------------------------------------------
    66 * @package trustedsite-reviews
    7  * @version 1.0.8
     7 * @version 1.0.9
    88 * Plugin Name: TrustedSite Reviews
    99 * Description: Add TrustedSite Reviews to your site and start showing visitors how great your business is.
    1010 * Author: TrustedSite
    11  * Version: 1.0.8
     11 * Version: 1.0.9
    1212 * Author URI: https://www.trustedsite.com/
    1313 * ------------------------------------------------------------------------------------------------------------------
     
    1717    return;
    1818}
    19 define('TS_REVIEWS', '1.0.8');
     19define('TS_REVIEWS', '1.0.9');
    2020
    2121add_action('activated_plugin','ts_reviews_save_activation_error');
Note: See TracChangeset for help on using the changeset viewer.