Changeset 1528300
- Timestamp:
- 11/04/2016 04:58:17 PM (8 years ago)
- Location:
- radcontrol/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
radcontrol/trunk/adcontrol.php
r1507629 r1528300 6 6 Description: Harness WordPress.com's advertising partners for your own website. Requires <a href="http://jetpack.me/" target="_blank">Jetpack</a> to be installed and connected. 7 7 Author: Automattic 8 Version: 1.1. 28 Version: 1.1. 9 9 Author URI: http://automattic.com 10 10 Text Domain: adcontrol … … 28 28 */ 29 29 30 define( 'ADCONTROL_VERSION', '1.1. 2' );30 define( 'ADCONTROL_VERSION', '1.1.' ); 31 31 define( 'ADCONTROL_ROOT', dirname( __FILE__ ) ); 32 32 define( 'ADCONTROL_BASENAME', plugin_basename( __FILE__ ) ); … … 183 183 /** 184 184 * IPONWEB metadata used by the various scripts 185 * @return [type] [description]185 * @return 186 186 */ 187 187 function insert_head_meta() { … … 210 210 $data_tags = ( $this->params->cloudflare ) ? ' data-cfasync="false"' : ''; 211 211 echo <<<HTML 212 <!-- IPONWEB header script --> 213 <script$data_tags type="text/javascript"> 214 window.__ATA = { 215 scriptSrc: '//s.pubmine.com/showad.js', 216 slotPrefix: 'automattic-id-', 217 customParams: _ipw_custom, 218 initAd: function(o) { 219 var o = o || {}, 220 g = window, 221 d = g.document, 222 wr = d.write, 223 id = g.__ATA.id(); 224 wr.call(d, '<div id="' + id + '" data-section="' + (o.sectionId || 0) + '"' + (o.type ? ('data-type="' + o.type + '"') : '') + ' ' + (o.forcedUrl ? ('data-forcedurl="' + o.forcedUrl + '"') : '') + ' style="width:' + (o.width || 0) + 'px; height:' + (o.height || 0) + 'px;">'); 225 g.__ATA.displayAd(id); 226 wr.call(d, '</div>'); 227 }, 228 displayAd: function(id) { 229 window.__ATA.ids = window.__ATA.ids || {}; 230 window.__ATA.ids[id] = 1; 231 }, 232 id: function() { 233 return window.__ATA.slotPrefix + (parseInt(Math.random() * 10000, 10) + 1 + (new Date()).getMilliseconds()); 234 } 235 }; 236 (function(d, ata) { 237 var pr = "https:" === d.location.protocol ? "https:" : "http:", 238 src = pr + ata.scriptSrc, 239 st = "text/javascript"; 240 d.write('<scr' + 'ipt type="' + st + '" src="' + src + '"><\/scr' + 'ipt>'); 241 })(window.document, window.__ATA); 242 </script> 212 <script$data_tags type="text/javascript" src="//s.pubmine.com/head.js"></script> 243 213 HTML; 244 214 } … … 321 291 <div class="wpcnt"> 322 292 <div class="wpa"> 323 <a class="wpa-about" href="http ://en.wordpress.com/about-these-ads/" rel="nofollow">$about</a>293 <a class="wpa-about" href="http://en.wordpress.com/about-these-ads/" rel="nofollow">$about</a> 324 294 <div id="ac-$spot" class="u $spot"> 325 295 $snippet -
radcontrol/trunk/php/widgets.php
r1507629 r1528300 11 11 private static $allowed_tags = array( 'mrec', 'wideskyscraper' ); 12 12 13 private $options = array();14 15 13 function __construct() { 16 14 parent::__construct( … … 19 17 array( 'description' => __( 'Insert an AdControl ad wherever you can place a widget.', 'adcontrol' ) ) 20 18 ); 21 22 $this->options = array_merge(23 get_option( 'adcontrol_settings', array() )24 );25 }26 27 /**28 * Convenience function for grabbing options from params->options29 * @param string $option the option to grab30 * @param mixed $default (optional)31 * @return option or $default if not set32 *33 * @since 0.134 */35 function option( $option, $default = false ) {36 if ( ! isset( $this->options[$option] ) )37 return $default;38 39 return $this->options[$option];40 19 } 41 20 … … 54 33 <div class="wpcnt"> 55 34 <div class="wpa"> 56 <a class="wpa-about" href="http ://en.wordpress.com/about-these-ads/" rel="nofollow">$about</a>35 <a class="wpa-about" href="http://en.wordpress.com/about-these-ads/" rel="nofollow">$about</a> 57 36 <div class="u {$instance['unit']}"> 58 37 <script$data_tags type='text/javascript'> -
radcontrol/trunk/readme.txt
r1507629 r1528300 3 3 Tags: advertising, ad codes, ads 4 4 Requires at least: 3.4 5 Tested up to: 4. 6.16 Stable tag: 1.1. 25 Tested up to: 4. 6 Stable tag: 1.1. 7 7 8 8 Harness WordPress.com's advertising partners for your own website. … … 18 18 Requires [Jetpack](http://jetpack.me/) to be installed and connected. [Help getting started.](http://jetpack.me/support/getting-started-with-jetpack/) 19 19 20 New in version 1.1.1! Developers can use the following constant on wp-config to enable support for CloudFlare's Rocket Loader (if the automatic detection isn't working for them): 21 22 `define( 'ADCONTROL_CLOUDFLARE', true );` prevents the ad scripts from being processed by CloudFlare's Rocket Loader. 20 New in version 1.1.3 Moved inline JavaScript in the header to an external JavaScript. 23 21 24 22 == Installation == … … 37 35 38 36 == Changelog == 37 38 39 39 40 40 41 = 1.1.2 =
Note: See TracChangeset
for help on using the changeset viewer.