Plugin Directory

Changeset 2358213


Ignore:
Timestamp:
08/12/2020 05:53:00 AM (6 years ago)
Author:
irmau
Message:
  • Updated to work with Wordpress 5.5
  • Added field for email unsubscribe success page
Location:
irm-newsroom/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • irm-newsroom/trunk/README.txt

    r2190985 r2358213  
    55Tags: ASX, ASX Announcements, ASX Listed, ASX Share Price, financial data, finance, public company, stock price, stock price feed, irm, newsroom, social, distribution, investors, subscriptions.
    66Requires at least: 4.0
    7 Tested up to: 5.3
     7Tested up to: 5.5
    88Stable tag: 4.0
    99License: GPLv2 or later
     
    2626- Flexible options to change distribution channels per announcement.
    2727- Ability to add extra third party feeds to your Newsroom including your blog.
    28 - Robust System: Over 500 ASX announcements and over 300,000 emails are sent via Newsroom each month*. 
     28- Robust System: Over 500 ASX announcements and over 300,000 emails are sent via Newsroom each month*.
    2929
    3030*Based on statistics from 2016.
     
    4040= Class Names =
    4141
    42 - table.newsitems : the container for the table where the articles are listed. 
     42- table.newsitems : the container for the table where the articles are listed.
    4343- div.article : wrapped around each list item.
    4444- span.articleDate : for the list item date.
     
    105105== Changelog ==
    106106
    107 = 1.2.6 =
     107= 1.2.7 =
     108* Updated to work with Wordpress 5.5
     109* Added field for email unsubscribe success page
     110
     111= 1.2.6 =
    108112* Updated to work with Wordpress 5.3
    109113
    110 = 1.2.5 = 
     114= 1.2.5 =
    111115* Updated version for testing.
    112116
    113 = 1.2.4 = 
     117= 1.2.4 =
    114118* Fixed active tab selection
    115119
    116 = 1.2.3 = 
     120= 1.2.3 =
    117121* Updates to shortcode functions
    118122
    119 = 1.2.2 = 
     123= 1.2.2 =
    120124* Cleaning up some of the functions
    121125
    122 = 1.2.1 = 
     126= 1.2.1 =
    123127* Formatting fixes for share prices
    124128
    125 = 1.2.0 = 
     129= 1.2.0 =
    126130* Added css link for shareprice and changed load priority
    127131
    128 = 1.1.0 = 
     132= 1.1.0 =
    129133* Added Events Calendar shortcode and tab
    130134
    131 = 1.0.9 = 
     135= 1.0.9 =
    132136* Added short codes for share prices
    133137
    134 = 1.0.8 = 
     138= 1.0.8 =
    135139* Added select toggle inserting of shareprice scripts into header of site
    136140
    137 = 1.0.7 = 
     141= 1.0.7 =
    138142* Fixed error if server is missing curl
    139143
    140 = 1.0.6 = 
     144= 1.0.6 =
    141145* Added tabs to configuration screen
    142146
    143 = 1.0.5 = 
     147= 1.0.5 =
    144148* Fixed wording on configuration screen
    145149
    146 = 1.0.4 = 
     150= 1.0.4 =
    147151* Fixed issue with site_type when showing flat pages
    148152
     
    160164* Added the ability to show List pages from an IRM website.
    161165* Added the ability to show Flat pages from an IRM Website.
    162 
    163 
  • irm-newsroom/trunk/irm-newsroom.php

    r2190985 r2358213  
    1616 * Plugin Name:       IRM Newsroom
    1717 * Plugin URI:        http://www.irmnewsroom.com/
    18  * Description:       IRM Newsroom is an ASX announcements, news and social media distribution service, which enables companies to easily communicate with investors and other stakeholders across multiple online channels – including website, email subscriptions and social media channels. 
    19  * Version:           1.2.6
     18 * Description:       IRM Newsroom is an ASX announcements, news and social media distribution service, which enables companies to easily communicate with investors and other stakeholders across multiple online channels – including website, email subscriptions and social media channels.
     19 * Version:           1.2.7
    2020 * Author:            IRM
    2121 * Author URI:        http://irmau.com
     
    7474    $site_type = esc_attr( get_option('site_type') );
    7575    $site_directory = esc_attr( get_option('site_directory') );
    76    
     76
     77    $emailunsub_landing_page = esc_attr( get_option('emailunsub_landing_page') );
     78    if(!$emailunsub_landing_page > "") {
     79        $emailunsub_landing_page = "/unsubscribe-success/";
     80    }
     81
    7782    $script_url = $site_type . "://" . $site_key . "/" . $site_directory . "/js/Newsroom.js";
    7883    $unsubscribe_url = $site_type . "://" . $site_key . "/" . $site_directory . "/data/UnsubscribeForm.aspx";
    7984
    80     $out = '<script type="text/javascript" src="'.$script_url.'"></script><div data-unsubscribeformsurl="'.$unsubscribe_url.'" data-gotourl="/unsubscribed/">..</div>';
     85    $out = '<script type="text/javascript" src="'.$script_url.'"></script><div data-unsubscribeformsurl="'.$unsubscribe_url.'" data-gotourl="'.$emailunsub_landing_page.'">..</div>';
    8186    return $out;
    8287
     
    9297    $script_url = $site_type . "://" . $site_key . "/" . $site_directory . "/content/js/quoteapi.js";
    9398    echo '<script src="'.$script_url.'"></script>';
    94     echo '<link rel="stylesheet" href="https://js.irmau.com/shareprice/shareprice.css">'; 
     99    echo '<link rel="stylesheet" href="https://js.irmau.com/shareprice/shareprice.css">';
    95100}
    96101
     
    99104    $plugin->run();
    100105
    101     $share_price_toggle = esc_attr( get_option('share_price_toggle') ); 
     106    $share_price_toggle = esc_attr( get_option('share_price_toggle') );
    102107    if($share_price_toggle == "on") {
    103108        add_action('wp_head', 'iguana_js', 1);
     
    121126    register_setting( 'irm-newsroom-group', 'site_directory' );
    122127    register_setting( 'irm-newsroom-group', 'email_landing_page' );
     128    register_setting( 'irm-newsroom-group', 'emailunsub_landing_page' );
    123129    register_setting( 'irm-newsroom-group', 'share_price_toggle' );
    124130}
     
    136142    $email_landing_page = esc_attr( get_option('email_landing_page') );
    137143    $share_price_toggle = esc_attr( get_option('share_price_toggle') );
     144    $emailunsub_landing_page = esc_attr( get_option('emailunsub_landing_page') );
    138145
    139146    if(!$share_price_toggle > "") {
     
    155162    if(!$email_landing_page > "") {
    156163        $email_landing_page = "/email-alerts-success/";
     164    }
     165
     166    if(!$emailunsub_landing_page > "") {
     167        $emailunsub_landing_page = "/unsubscribe-success/";
    157168    }
    158169
     
    188199
    189200    echo '<div class="wrap">';
    190     echo '<p><img src="http://www.irmau.com/irm/showmedia.aspx?MediaId=1" style="background:#FFFFFF;border-radius:20px;padding:10px 50px;width:100px;"></p>';
     201    // echo '<p><img src="http://www.irmau.com/irm/showmedia.aspx?MediaId=1" style="background:#FFFFFF;border-radius:20px;padding:10px 50px;width:100px;"></p>';
    191202    echo '<p class="irm-trial">If you\'d like to organise a free trial of IRM Newsroom, <a href="http://irmau.com/site/websites/newsroom-trial" target="_blank">please click here</a>.</p>';
    192203
     
    209220    <script>
    210221    (function($) {
    211         var urlParams = new URLSearchParams(location.search) 
    212         var tab = urlParams.get("tab"); 
     222        var urlParams = new URLSearchParams(location.search)
     223        var tab = urlParams.get("tab");
    213224        console.log("irm newsroom. " + tab);
    214225        if(tab > "") {
     
    237248        echo '<p>To show the Email Alerts Signup Form please copy and paste the shortcode below to a page on your website: </p>';
    238249        echo '<pre><code>[email_alerts_form]</code></pre>';
    239         echo '<p><label>Email Alerts Success Page: </label> <input type="text" name="email_landing_page" value="'.$email_landing_page.'" /></p>';
     250        echo '<p><label>Email Alerts Success Page: </label> <input type="text" name="email_landing_page" value="'.$email_landing_page.'" /> *</p>';
     251        echo '<p><small>* Please note that this should be a full URL including your domain name, e.g: https://irmau.com/</small></p>';
    240252        echo '<h3>Email Alerts Unsubscribe</h3>';
    241253        echo '<p>To allow subscribers to unsubscribe from email alerts add a link to the following page:</p>';
     
    243255        echo '<p>or you can add the following shortcode to a page or widget</p>';
    244256        echo '<pre><code>[irm_unsubscribe_form]</code></pre>';
     257        echo '<p>This will redirect them to the following page after un-subscribing:</p>';
     258        echo '<p><label>Email Alerts Unsubscribe Success Page: </label> <input type="text" name="emailunsub_landing_page" value="'.$emailunsub_landing_page.'" /> *</p>';
     259        echo '<p><small>* Please note that this should be a full URL including your domain name, e.g: https://irmau.com/</small></p>';
    245260
    246261        echo '<h3>Shareprice</h3>';
     
    259274
    260275        settings_fields( 'irm-newsroom-group' );
    261         do_settings_sections( 'irm-newsroom-group' );
    262         submit_button();
     276      do_settings_sections( 'irm-newsroom-group' );
     277      submit_button();
     278
    263279        echo '</form></p>';
    264280        echo '<p><b>For testing use: <code>www.irmau.com</code></b></p>';
     
    290306        echo '<p>This will add a small share price chart. </p>';
    291307        echo '<code>[sharepriceChartSmall]</code>';
    292         echo "<p><a href='http://www.irmhelpcentre.com/irm/content/shareprice-installation.aspx?RID=1594&RedirectCount=1' target='_blank' class='button button-primary'>For help installing Share Price's please click here.</a></p>"; 
     308        echo "<p><a href='http://www.irmhelpcentre.com/irm/content/shareprice-installation.aspx?RID=1594&RedirectCount=1' target='_blank' class='button button-primary'>For help installing Share Price's please click here.</a></p>";
    293309    }
    294310
     
    350366        }
    351367        return false;
    352     }   
     368    }
    353369    $ch = curl_init();
    354370    $timeout = 10;
Note: See TracChangeset for help on using the changeset viewer.