Plugin Directory

Changeset 2116483


Ignore:
Timestamp:
07/02/2019 09:34:45 PM (7 years ago)
Author:
ssmwordpressdev
Message:

Added code for ProFootball

Location:
second-street-promotion
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • second-street-promotion/tags/1.0/secondstreet-promotion.php

    r970097 r2116483  
    11<?php
    22/**
    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
    76 * Author URI: http://secondstreet.com
    87 * License: GPL2
    98 */
    10  
    11  /*  Copyright 2014  Second Street | Heather McCarron  (email : heather@secondstreet.com)
     9
     10/*  Copyright 2014  Second Street (email : wordpress@secondstreet.com)
    1211
    1312    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
    1514    published by the Free Software Foundation.
    1615
     
    2322    along with this program; if not, write to the Free Software
    2423    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    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', '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] Code
    39     function ss_promo_func($atts, $content = null) {
    40         $a = shortcode_atts(array (
     24**************************************************************************/
     25
     26// Blocks direct access to plugin
     27defined( 'ABSPATH' ) or die( "Access Forbidden" );
     28
     29defined( 'ABSPATH' ) or die( "Access Forbidden" ); // Blocks direct access to plugin
     30
     31// Define Second Street Plugin
     32define( 'SECONDSTREET_PLUGIN_VERSION', '1.0' );
     33define( 'SECONDSTREET_PLUGIN__MINIMUM_WP_VERSION', '3.1' );
     34define( 'SECONDSTREET_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     35define( 'SECONDSTREET_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
     36
     37// [ss-promo] Code
     38function ss_promo_func( $atts, $content = null ) {
     39    $a = shortcode_atts( array (
    4140            'op_id' => '',
    4241            'op_guid' => '',
    4342            '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}
     50add_shortcode( 'ss-promo', 'ss_promo_func' );
     51
     52// [ss-signup] Code
     53function 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
     64add_shortcode( 'ss-promo', 'ss_promo_func' );
     65add_shortcode( 'ss-signup', 'ss_signup_func' );
     66
     67
     68// [ss-contest] Code
     69function 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
     82add_shortcode( 'ss-promo', 'ss_promo_func' );
     83add_shortcode( 'ss-signup', 'ss_signup_func' );
     84
     85add_shortcode( 'ss-contest', 'ss_contest_func' );
  • second-street-promotion/trunk/secondstreet-promotion.php

    r1880158 r2116483  
    22/**
    33 * 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.0
     4 * Version: 2.1
    55 * Author: Second Street
    66 * Author URI: http://secondstreet.com
     
    6464add_shortcode( 'ss-promo', 'ss_promo_func' );
    6565add_shortcode( 'ss-signup', 'ss_signup_func' );
     66
     67
     68// [ss-contest] Code
     69function 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
     82add_shortcode( 'ss-promo', 'ss_promo_func' );
     83add_shortcode( 'ss-signup', 'ss_signup_func' );
     84
     85add_shortcode( 'ss-contest', 'ss_contest_func' );
Note: See TracChangeset for help on using the changeset viewer.