Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew McDonald committed Feb 24, 2020
1 parent 873da3a commit 480e413
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 44 deletions.
82 changes: 41 additions & 41 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
=== Add Script To Post ===
Contributors: Second Street (Heather McCarron)
Tags: Page, Post, Shortcode, Promotion, Second Street, UPICKEM
Requires at least: 3.0
Tested up to: 3.9.2
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Embed your Second Street Promotion on a WordPress page using the Shortcode generated in the Second Street Partner Tool.


== Description ==

The Second Street Promotion Plugin will allow you to embed your Second Street Promotion within your WordPress site. The feature to generate the Shortcode required for this plugin is located within your promotion's [Second Street Partner Tool](https://affiliates.upickem.net). After retrieving your Promotion's Shortcode, you will paste it into the page content area of the WordPress page you would like it to appear on.

NOTE: The embedded Promotion's width will be dependent on the size of the parent container/element that it is placed in. If your promotion appears too narrow or too wide, try adjusting the width of its container.


== Installation ==

1. Extract files from the ZIP file.
2. Upload `secondstreet-promotion` folder (contains `secondstreet-promotion.php`)
to the `/wp-content/plugins/` directory.
3. Activate the plugin through the 'Plugins' menu in WordPress.
4. Retrieve (copy) your Promotion's Shortcode from your Second Street Partner Tool.
(Login to your Second Street account at https://affiliates.upickem.net)
5. Place (paste) your Shortcode into the page content area in your WordPress site.


== Frequently Asked Questions ==

= I cannot activate the Second Street Plugin. What should I do? =

If you are having problems activating your plugin, please contact Second Street's [Support Department](http://[email protected]) to ask for help.


== Changelog ==

= 2.1.0 =
* Support for ss-promo, ss-signup, and ss-contest shortcodes
=== Second Street ===
Contributors: Second Street
Tags: Page, Post, Shortcode, Promotion, Second Street, UPICKEM
Requires at least: 3.0
Tested up to: 4.7
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Embed your Second Street Promotion on a WordPress page using the Shortcode generated in the Second Street Partner Tool.
== Description ==
The Second Street Plugin allows you to embed your Second Street content on your WordPress site. Get the Shortcode the specific Contest, Interactive Content, or Signup Widget you would like to embed from the Second Street app at [partners.secondstreet.com](https://partners.secondstreet.com). After retrieving your Shortcode, paste it into the page content area of the WordPress page you would like it to appear on.
== Installation ==
1. Extract files from the ZIP file.
2. Upload `secondstreet-promotion` folder (contains `secondstreet-promotion.php`)
to the `/wp-content/plugins/` directory.
3. Activate the plugin through the 'Plugins' menu in WordPress.
4. Retrieve (copy) your Promotion's Shortcode from your Second Street Partner Tool.
(Login to your Second Street account at https://partners.secondstreet.com/)
5. Place (paste) your Shortcode into the page content area in your WordPress site.
== Frequently Asked Questions ==
= I cannot activate the Second Street Plugin. What should I do? =
If you are having problems activating your plugin, please contact Second Street's [Support Department](http://[email protected]) to ask for help.
== Changelog ==
= 2.1.0 =
* Support for ss-promo, ss-signup, and ss-contest shortcodes
= 2.2.0 =
* Support for contest_id attribute for ss-contest shortcode
11 changes: 8 additions & 3 deletions secondstreet-promotion.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: Second Street * Description: Plugin will allow Second Street Affiliates to embed a Second Street Promotion within their WordPress site(s).
* Version: 2.1
* Version: 2.2
* Author: Second Street
* Author URI: http://secondstreet.com
* License: GPL2
Expand Down Expand Up @@ -70,12 +70,17 @@ function ss_contest_func( $atts, $content = null ) {
$a = shortcode_atts( array (
'contest_url' => '',
'contest_folder' => '',
'routing' => ''
'routing' => '',
'contest_id' => ''
), $atts );

$ss_script_url = $a['contest_url'] . '/' . 'shared/embedcode/embed.js';

return '<script type="text/javascript" src="' . esc_attr( $a['contest_url'] ) . '/shared/embedcode/talker-v1.0.0.js"></script><script src="' . esc_url( $ss_script_url ) . '" data-ss-embed="contest" data-routing="' . esc_attr( $a['routing'] ) . '"></script>';
if (esc_attr( $a['contest_id'] ) != '') { //Old Engine contests will pass contest_id
return '<script type="text/javascript" src="' . esc_attr( $a['contest_url'] ) . '/shared/embedcode/talker-v1.0.0.js"></script><script src="' . esc_url( $ss_script_url ) . '" data-ss-embed="contest" data-routing="' . esc_attr( $a['routing'] ) . '" data-contest-id="' . esc_attr( $a['contest_id'] ) . '"></script>';
} else {
return '<script type="text/javascript" src="' . esc_attr( $a['contest_url'] ) . '/shared/embedcode/talker-v1.0.0.js"></script><script src="' . esc_url( $ss_script_url ) . '" data-ss-embed="contest" data-routing="' . esc_attr( $a['routing'] ) . '"></script>';
}

}

Expand Down

0 comments on commit 480e413

Please sign in to comment.