Plugin Directory

Changeset 2312885


Ignore:
Timestamp:
05/27/2020 07:17:31 AM (6 years ago)
Author:
embedsocial
Message:

Added Review badges shortcode

Location:
embedalbum-pro/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • embedalbum-pro/trunk/embedalbum_pro.php

    r2159164 r2312885  
    66Author: EmbedSocial
    77Author URI: http://www.embedsocial.com
    8 Version: 1.1.20
     8Version: 1.1.21
    99 */
    1010defined( 'ABSPATH' ) or die;
     
    425425        return $schema;
    426426    }
     427
     428    public function embedsocial_badge_shortcode( $atts )
     429    {
     430        $shortcodeId = (shortcode_atts(array(
     431            'id' => '',
     432            'style' => 'badge-1-g'
     433        ), $atts));
     434
     435        $out = "";
     436        if ($shortcodeId['id']) {
     437            $shortcodeId['id'] = sanitize_text_field($shortcodeId['id']);
     438            $out = "<div class='reviews-badges'><img src='https://embedsocial.com/api/reviews_badges/{$shortcodeId['style']}/{$shortcodeId['id']}'/></div>";
     439        }
     440        return $out;
     441    }
    427442}
    428443
     
    443458add_shortcode('embedsocial_story_gallery', array($plugin, 'embedsocial_story_gallery_shortcode'));
    444459add_shortcode('embedsocial_hashtag', array($plugin, 'embedsocial_hashtag_shortcode'));
     460add_shortcode('embedsocial_badge', array($plugin, 'embedsocial_badge_shortcode'));
    445461?>
  • embedalbum-pro/trunk/readme.txt

    r2179312 r2312885  
    44Tags: social media feed, social media tools, Facebook reviews, Facebook feed, Instagram feed, embed Facebook album, embed Instagram album, embed Facebook gallery, Instagram stories, Google reiews, Instagram widget
    55Requires at least: 4.0
    6 Tested up to: 5.2.4
    7 Stable tag: 1.1.20
     6Tested up to: 5.4.1
     7Stable tag: 1.1.21
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.