WordPress Ad Widget - Version 2.7.1

Version Description

Download this release

Release Info

Developer broadstreetads
Plugin Icon wp plugin WordPress Ad Widget
Version 2.7.1
Comparing to
See all releases

Code changes from version 2.7.0 to 2.7.1

Files changed (2) hide show
  1. adwidget.php +28 -2
  2. readme.txt +1 -1
adwidget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Wordpress Ad Widget
4
  Plugin URI: https://github.com/broadstreetads/wordpress-ad-widget
5
  Description: The easiest way to place ads in your Wordpress sidebar. Go to Settings -> Ad Widget
6
- Version: 2.7.0
7
  Author: Broadstreet Ads
8
  Author URI: http://broadstreetads.com
9
  */
@@ -13,6 +13,7 @@ require_once 'lib/Utility.php';
13
  add_action('admin_init', array('AdWidget_Core', 'registerScripts'));
14
  add_action('widgets_init', array('AdWidget_Core', 'registerWidgets'));
15
  add_action('admin_menu', array('AdWidget_Core', 'registerAdmin'));
 
16
 
17
  /**
18
  * This class is the core of Ad Widget
@@ -20,7 +21,7 @@ add_action('admin_menu', array('AdWidget_Core', 'registerAdmin'));
20
  class AdWidget_Core
21
  {
22
  CONST KEY_INSTALL_REPORT = 'AdWidget_Installed';
23
- CONST VERSION = '2.7.0';
24
  CONST KEY_WELCOME = 'AdWidget_Welcome';
25
 
26
  /**
@@ -119,6 +120,31 @@ class AdWidget_Core
119
  @wp_mail($email, $subject, $body);
120
  }
121
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  /**
124
  * If this is a new installation and we've never sent a report to the
3
  Plugin Name: Wordpress Ad Widget
4
  Plugin URI: https://github.com/broadstreetads/wordpress-ad-widget
5
  Description: The easiest way to place ads in your Wordpress sidebar. Go to Settings -> Ad Widget
6
+ Version: 2.7.1
7
  Author: Broadstreet Ads
8
  Author URI: http://broadstreetads.com
9
  */
13
  add_action('admin_init', array('AdWidget_Core', 'registerScripts'));
14
  add_action('widgets_init', array('AdWidget_Core', 'registerWidgets'));
15
  add_action('admin_menu', array('AdWidget_Core', 'registerAdmin'));
16
+ add_action('admin_footer', array('AdWidget_Core', 'footerScripts'));
17
 
18
  /**
19
  * This class is the core of Ad Widget
21
  class AdWidget_Core
22
  {
23
  CONST KEY_INSTALL_REPORT = 'AdWidget_Installed';
24
+ CONST VERSION = '2.7.1';
25
  CONST KEY_WELCOME = 'AdWidget_Welcome';
26
 
27
  /**
120
  @wp_mail($email, $subject, $body);
121
  }
122
  }
123
+
124
+ public static function footerScripts()
125
+ {
126
+ if(is_admin()): ?>
127
+
128
+ <script>(function() {
129
+ var _fbq = window._fbq || (window._fbq = []);
130
+ if (!_fbq.loaded) {
131
+ var fbds = document.createElement('script');
132
+ fbds.async = true;
133
+ fbds.src = '//connect.facebook.net/en_US/fbds.js';
134
+ var s = document.getElementsByTagName('script')[0];
135
+ s.parentNode.insertBefore(fbds, s);
136
+ _fbq.loaded = true;
137
+ }
138
+ _fbq.push(['addPixelId', '770762566324001']);
139
+ })();
140
+ window._fbq = window._fbq || [];
141
+ window._fbq.push(['track', 'PixelInitialized', {}]);
142
+ </script>
143
+ <noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=770762566324001&amp;ev=PixelInitialized" /></noscript>
144
+
145
+ <?php endif;
146
+
147
+ }
148
 
149
  /**
150
  * If this is a new installation and we've never sent a report to the
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Broadstreet
3
  Tags: wordpress,ad,widget,sidebar,google,tag,code
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
- Stable tag: 2.7.0
7
 
8
  Easily upload ad images and ad code to your sidebar. For those that don't need or
9
  want a complicated ad management system.
3
  Tags: wordpress,ad,widget,sidebar,google,tag,code
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
+ Stable tag: 2.7.1
7
 
8
  Easily upload ad images and ad code to your sidebar. For those that don't need or
9
  want a complicated ad management system.