Changeset 1785853
- Timestamp:
- 12/13/2017 01:32:21 AM (8 years ago)
- Location:
- irm-newsroom/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (2 diffs)
-
irm-newsroom.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
irm-newsroom/trunk/README.txt
r1772716 r1785853 5 5 Tags: ASX, ASX Announcements, ASX Listed, ASX Share Price, financial data, finance, public company, stock price, stock price feed, irm, newsroom, social, distribution, investors, subscriptions. 6 6 Requires at least: 3.0.1 7 Tested up to: 4. 8.37 Tested up to: 4.9.1 8 8 Stable tag: 4.3 9 9 License: GPLv2 or later … … 105 105 == Changelog == 106 106 107 = 1.0.8 = 108 * Added select toggle inserting of shareprice scripts into header of site 109 107 110 = 1.0.7 = 108 111 * Fixed error if server is missing curl -
irm-newsroom/trunk/irm-newsroom.php
r1772716 r1785853 17 17 * Plugin URI: http://www.irmnewsroom.com/ 18 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.0. 719 * Version: 1.0.8 20 20 * Author: IRM 21 21 * Author URI: http://irmau.com … … 67 67 * @since 1.0.0 68 68 */ 69 70 71 function iguana_js() { 72 echo '<script src="https://quoteapi.com/lib/1.8.5/quoteapi-loader.js" integrity="sha256-Zs2jee5Cu9XOmK67dVQJDI5LqiV+faelNQm8OyslG6s= sha512-lgVikkbStJeoqvs4NNkrxcnQZM5q2WZDvD71Lo8c7F7AKW4/X/5iKuZVErv/gPS/4VdoBH642y+SHtiZA+B2ag==" crossorigin="anonymous"></script>'; 73 74 $site_key = esc_attr( get_option('site_key') ); 75 $site_type = esc_attr( get_option('site_type') ); 76 $site_directory = esc_attr( get_option('site_directory') ); 77 $script_url = $site_type . "://" . $site_key . "/" . $site_directory . "/content/js/quoteapi.js"; 78 79 echo '<script src="'.$script_url.'"></script>'; 80 } 81 69 82 function run_irm_newsroom() { 70 71 83 $plugin = new Irm_Newsroom(); 72 84 $plugin->run(); 85 86 $share_price_toggle = esc_attr( get_option('share_price_toggle') ); 87 if($share_price_toggle == "on") { 88 add_action('wp_head', 'iguana_js'); 89 } 73 90 74 91 } … … 90 107 register_setting( 'irm-newsroom-group', 'site_directory' ); 91 108 register_setting( 'irm-newsroom-group', 'email_landing_page' ); 109 register_setting( 'irm-newsroom-group', 'share_price_toggle' ); 92 110 } 93 111 … … 105 123 $site_directory = esc_attr( get_option('site_directory') ); 106 124 $email_landing_page = esc_attr( get_option('email_landing_page') ); 125 $share_price_toggle = esc_attr( get_option('share_price_toggle') ); 126 127 if(!$share_price_toggle > "") { 128 $share_price_toggle = "off"; 129 } 107 130 108 131 if(!$site_type > "") { … … 182 205 echo '<p>To show the Email Alerts Signup Form please copy and paste the shortcode below to a page on your website: </p>'; 183 206 echo '<pre><code>[email_alerts_form]</code></pre>'; 184 185 207 echo '<p><label>Email Alerts Success Page: </label> <input type="text" name="email_landing_page" value="'.$email_landing_page.'" /></p>'; 208 209 echo '<h3>Shareprice</h3>'; 210 echo '<p>Toggle shareprice script in site header, if this is set to <b>on</b> this will insert the shareprice javascript in the header of this site for all pages.</p>'; 211 //echo '$share_price_toggle:' . $share_price_toggle . '<br>'; 212 echo '<select name="share_price_toggle">'; 213 214 if($share_price_toggle == "off") { 215 echo '<option value="off" selected>off</option>'; 216 echo '<option value="on">on</option>'; 217 } else { 218 echo '<option value="off">off</option>'; 219 echo '<option value="on" selected>on</option>'; 220 } 221 echo '</select>'; 222 186 223 settings_fields( 'irm-newsroom-group' ); 187 224 do_settings_sections( 'irm-newsroom-group' );
Note: See TracChangeset
for help on using the changeset viewer.