Plugin Directory

Changeset 2016530


Ignore:
Timestamp:
01/21/2019 10:57:40 PM (7 years ago)
Author:
bingewith
Message:

adding shortcode functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bingewith/trunk/bingewith.php

    r2015988 r2016530  
    8181}
    8282
     83if (!function_exists("bingewith_shortcode")) {
     84    function bingewith_shortcode($atts) {
     85        $atts = shortcode_atts(
     86            array(
     87                'height' => '65',
     88                'width' => '480',
     89            ),
     90            $atts,
     91            'bingewith'
     92        );
     93        $permalink = get_permalink();
     94        return "<iframe height='" . $atts['height'] . "' width='" . $atts['width'] . "' frameBorder='0' style='margin: 0;' src='https://bingewith.com/article/::_wp&permalink=$permalink' scrolling='no'></iframe>";
     95    }
     96    add_shortcode('bingewith', 'bingewith_shortcode');
     97}
     98
    8399?>
Note: See TracChangeset for help on using the changeset viewer.