Changeset 1052888
- Timestamp:
- 12/23/2014 08:26:14 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
second-street-promotion/trunk/secondstreet-promotion.php
r1051287 r1052888 4 4 * Description: Plugin will allow Second Street Affiliates to embed a Second Street Promotion within their WordPress site(s). 5 5 * Version: 1.0 6 * Author: Second Street 6 * Author: Second Street (Heather McCarron) 7 7 * Author URI: http://secondstreet.com 8 8 * License: GPL2 9 9 */ 10 11 /* Copyright 2014 Second Street 10 11 /* Copyright 2014 Second Street | Heather McCarron (email : [email protected]) 12 12 13 13 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 14 it under the terms of the GNU General Public License, version 2, as 15 15 published by the Free Software Foundation. 16 16 … … 23 23 along with this program; if not, write to the Free Software 24 24 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 (25 **************************************************************************/ 26 27 // Blocks direct access to plugin 28 defined( 'ABSPATH' ) or die( "Access Forbidden" ); 29 30 defined( 'ABSPATH' ) or die( "Access Forbidden" ); // Blocks direct access to plugin 31 32 // Define Second Street Plugin 33 define( 'SECONDSTREET_PLUGIN_VERSION', '1.0' ); 34 define( 'SECONDSTREET_PLUGIN__MINIMUM_WP_VERSION', '3.1' ); 35 define( 'SECONDSTREET_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 36 define( 'SECONDSTREET_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 37 38 // [ss-promo] Code 39 function ss_promo_func( $atts, $content = null ) { 40 $a = shortcode_atts( array ( 41 41 'op_id' => '', 42 42 'op_guid' => '', 43 43 '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' ); 44 ), $atts ); 45 46 $ss_script_url = 'https://embed-' . $a['op_id'] . '.secondstreetapp.com/Scripts/dist/embed.js'; 47 48 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>'; 49 50 } 51 add_shortcode( 'ss-promo', 'ss_promo_func' );
Note: See TracChangeset
for help on using the changeset viewer.