Changeset 2116483
- Timestamp:
- 07/02/2019 09:34:45 PM (7 years ago)
- Location:
- second-street-promotion
- Files:
-
- 2 edited
-
tags/1.0/secondstreet-promotion.php (modified) (2 diffs)
-
trunk/secondstreet-promotion.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
second-street-promotion/tags/1.0/secondstreet-promotion.php
r970097 r2116483 1 1 <?php 2 2 /** 3 * Plugin Name: Second Street Promotion 4 * Description: Plugin will allow Second Street Affiliates to embed a Second Street Promotion within their WordPress site(s). 5 * Version: 1.0 6 * Author: Second Street (Heather McCarron) 3 * Plugin Name: Second Street * Description: Plugin will allow Second Street Affiliates to embed a Second Street Promotion within their WordPress site(s). 4 * Version: 2.1 5 * Author: Second Street 7 6 * Author URI: http://secondstreet.com 8 7 * License: GPL2 9 8 */ 10 11 /* Copyright 2014 Second Street | Heather McCarron (email : heather@secondstreet.com)9 10 /* Copyright 2014 Second Street (email : wordpress@secondstreet.com) 12 11 13 12 This program is free software; you can redistribute it and/or modify 14 it under the terms of the GNU General Public License, version 2, as 13 it under the terms of the GNU General Public License, version 2, as 15 14 published by the Free Software Foundation. 16 15 … … 23 22 along with this program; if not, write to the Free Software 24 23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 25 **************************************************************************/ 26 27 // Blocks direct access to plugin28 defined('ABSPATH') or die("Access Forbidden");29 30 defined('ABSPATH') or die("Access Forbidden"); // Blocks direct access to plugin31 32 // Define Second Street Plugin33 define('SECONDSTREET_PLUGIN', '1.0');34 define('SECONDSTREET_PLUGIN__MINIMUM_WP_VERSION', '3.1');35 define('SECONDSTREET_PLUGIN_URL', plugin_dir_url(__FILE__));36 define('SECONDSTREET_PLUGIN', plugin_dir_path( __FILE__ ));37 38 // [ss-promo] Code39 function ss_promo_func($atts, $content = null) {40 $a = shortcode_atts(array (24 **************************************************************************/ 25 26 // Blocks direct access to plugin 27 defined( 'ABSPATH' ) or die( "Access Forbidden" ); 28 29 defined( 'ABSPATH' ) or die( "Access Forbidden" ); // Blocks direct access to plugin 30 31 // Define Second Street Plugin 32 define( 'SECONDSTREET_PLUGIN_VERSION', '1.0' ); 33 define( 'SECONDSTREET_PLUGIN__MINIMUM_WP_VERSION', '3.1' ); 34 define( 'SECONDSTREET_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 35 define( 'SECONDSTREET_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 36 37 // [ss-promo] Code 38 function ss_promo_func( $atts, $content = null ) { 39 $a = shortcode_atts( array ( 41 40 'op_id' => '', 42 41 'op_guid' => '', 43 42 'routing' => '' 44 ), $atts); 45 46 return '<script src="https://embed-' . $a['op_id'] . '.secondstreetapp.com/Scripts/dist/embed.js" data-ss-embed="promotion" data-opguid="' . $a['op_guid'] . '" data-routing="' . $a['routing'] . '"></script>'; 47 48 } 49 add_shortcode( 'ss_promo', 'ss_promo_func' ); 43 ), $atts ); 44 45 $ss_script_url = 'https://embed-' . $a['op_id'] . '.secondstreetapp.com/Scripts/dist/embed.js'; 46 47 return '<script src="' . esc_url( $ss_script_url ) . '" data-ss-embed="promotion" data-opguid="' . esc_attr( $a['op_guid'] ) . '" data-routing="' . esc_attr( $a['routing'] ) . '"></script>'; 48 49 } 50 add_shortcode( 'ss-promo', 'ss_promo_func' ); 51 52 // [ss-signup] Code 53 function ss_signup_func( $atts, $content = null ) { 54 $a = shortcode_atts( array ( 55 'design_id' => '' 56 ), $atts ); 57 58 $ss_script_url = 'https://embed.secondstreetapp.com/Scripts/dist/optin.js'; 59 60 return '<script src="' . esc_url( $ss_script_url ) . '" data-ss-embed="optin" data-design-id="' . esc_attr( $a['design_id'] ) . '"></script>'; 61 62 } 63 64 add_shortcode( 'ss-promo', 'ss_promo_func' ); 65 add_shortcode( 'ss-signup', 'ss_signup_func' ); 66 67 68 // [ss-contest] Code 69 function ss_contest_func( $atts, $content = null ) { 70 $a = shortcode_atts( array ( 71 'contest_url' => '', 72 'contest_folder' => '', 73 'routing' => '' 74 ), $atts ); 75 76 $ss_script_url = $a['contest_url'] . '/' . 'shared/embedcode/embed.js'; 77 78 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>'; 79 80 } 81 82 add_shortcode( 'ss-promo', 'ss_promo_func' ); 83 add_shortcode( 'ss-signup', 'ss_signup_func' ); 84 85 add_shortcode( 'ss-contest', 'ss_contest_func' ); -
second-street-promotion/trunk/secondstreet-promotion.php
r1880158 r2116483 2 2 /** 3 3 * Plugin Name: Second Street * Description: Plugin will allow Second Street Affiliates to embed a Second Street Promotion within their WordPress site(s). 4 * Version: 2. 04 * Version: 2.1 5 5 * Author: Second Street 6 6 * Author URI: http://secondstreet.com … … 64 64 add_shortcode( 'ss-promo', 'ss_promo_func' ); 65 65 add_shortcode( 'ss-signup', 'ss_signup_func' ); 66 67 68 // [ss-contest] Code 69 function ss_contest_func( $atts, $content = null ) { 70 $a = shortcode_atts( array ( 71 'contest_url' => '', 72 'contest_folder' => '', 73 'routing' => '' 74 ), $atts ); 75 76 $ss_script_url = $a['contest_url'] . '/' . 'shared/embedcode/embed.js'; 77 78 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>'; 79 80 } 81 82 add_shortcode( 'ss-promo', 'ss_promo_func' ); 83 add_shortcode( 'ss-signup', 'ss_signup_func' ); 84 85 add_shortcode( 'ss-contest', 'ss_contest_func' );
Note: See TracChangeset
for help on using the changeset viewer.