Hustle – Pop-Ups, Slide-ins and Email Opt-ins - Version 3.1.2

Version Description

Download this release

Release Info

Developer WPMUDEV
Plugin Icon 128x128 Hustle – Pop-Ups, Slide-ins and Email Opt-ins
Version 3.1.2
Comparing to
See all releases

Code changes from version 3.1.1 to 3.1.2

debugging/testheadfooter.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Test Head Footer
4
- Plugin URI: http://gist.github.com/378450
5
- Description: Tests for the existence and functionality of wp_head and wp_footer in the active theme
6
- Author: Matt Martz
7
- Author URI: http://sivel.net/
8
- Version: 3.1
9
-
10
- Copyright (c) 2010 Matt Martz (http://sivel.net/)
11
- Test Head Footer is released under the GNU General Public License (GPL)
12
- http://www.gnu.org/licenses/gpl-2.0.txt
13
- */
14
-
15
- // Lets not do anything until init
16
- add_action( 'init', 'test_head_footer_init' );
17
- function test_head_footer_init() {
18
- // Hook in at admin_init to perform the check for wp_head and wp_footer
19
- add_action( 'admin_init', 'check_head_footer' );
20
-
21
- // If test-head query var exists hook into wp_head
22
- if ( isset( $_GET['test-head'] ) )
23
- add_action( 'wp_head', 'test_head', 99999 ); // Some obscene priority, make sure we run last
24
-
25
- // If test-footer query var exists hook into wp_footer
26
- if ( isset( $_GET['test-footer'] ) )
27
- add_action( 'wp_footer', 'test_footer', 99999 ); // Some obscene priority, make sure we run last
28
- }
29
-
30
- // Echo a string that we can search for later into the head of the document
31
- // This should end up appearing directly before </head>
32
- function test_head() {
33
- echo '<!--wp_head-->';
34
- }
35
-
36
- // Echo a string that we can search for later into the footer of the document
37
- // This should end up appearing directly before </body>
38
- function test_footer() {
39
- echo '<!--wp_footer-->';
40
- }
41
-
42
- // Check for the existence of the strings where wp_head and wp_footer should have been called from
43
- function check_head_footer() {
44
- // Build the url to call, NOTE: uses home_url and thus requires WordPress 3.0
45
- $url = add_query_arg( array( 'test-head' => '', 'test-footer' => '' ), home_url() );
46
- // Perform the HTTP GET ignoring SSL errors
47
- $response = wp_remote_get( $url, array( 'sslverify' => false ) );
48
- // Grab the response code and make sure the request was sucessful
49
- $code = (int) wp_remote_retrieve_response_code( $response );
50
- if ( $code == 200 ) {
51
- global $head_footer_errors;
52
- $head_footer_errors = array();
53
-
54
- // Strip all tabs, line feeds, carriage returns and spaces
55
- $html = preg_replace( '/[\t\r\n\s]/', '', wp_remote_retrieve_body( $response ) );
56
-
57
- // Check to see if we found the existence of wp_head
58
- if ( ! strstr( $html, '<!--wp_head-->' ) )
59
- $head_footer_errors['nohead'] = 'Is missing the call to <?php wp_head(); ?> which should appear directly before </head>';
60
- // Check to see if we found the existence of wp_footer
61
- if ( ! strstr( $html, '<!--wp_footer-->' ) )
62
- $head_footer_errors['nofooter'] = 'Is missing the call to <?php wp_footer(); ?> which should appear directly before </body>';
63
-
64
- // Check to see if we found wp_head and if was located in the proper spot
65
- if ( ! strstr( $html, '<!--wp_head--></head>' ) && ! isset( $head_footer_errors['nohead'] ) )
66
- $head_footer_errors[] = 'Has the call to <?php wp_head(); ?> but it is not called directly before </head>';
67
- // Check to see if we found wp_footer and if was located in the proper spot
68
- if ( ! strstr( $html, '<!--wp_footer--></body>' ) && ! isset( $head_footer_errors['nofooter'] ) )
69
- $head_footer_errors[] = 'Has the call to <?php wp_footer(); ?> but it is not called directly before </body>';
70
-
71
- // If we found errors with the existence of wp_head or wp_footer hook into admin_notices to complain about it
72
- if ( ! empty( $head_footer_errors ) )
73
- add_action ( 'admin_notices', 'test_head_footer_notices' );
74
- }
75
- }
76
-
77
- // Output the notices
78
- function test_head_footer_notices() {
79
- global $head_footer_errors;
80
-
81
- // If we made it here it is because there were errors, lets loop through and state them all
82
- echo '<div class="error"><p><strong>Your active theme:</strong></p><ul>';
83
- foreach ( $head_footer_errors as $error )
84
- echo '<li>' . esc_html( $error ) . '</li>';
85
- echo '</ul></div>';
86
- }
87
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popover.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WordPress Popup plugin
4
  Plugin URI: http://premium.wpmudev.org
5
  Description: This plugin adds a customisable popover to a site. The content, size, position can be changed and rules determining if the popup should show or not.
6
  Author: Barry (Incsub)
7
- Version: 3.1.1
8
  Author URI: http://caffeinatedb.com
9
  WDP ID: 230
10
 
4
  Plugin URI: http://premium.wpmudev.org
5
  Description: This plugin adds a customisable popover to a site. The content, size, position can be changed and rules determining if the popup should show or not.
6
  Author: Barry (Incsub)
7
+ Version: 3.1.2
8
  Author URI: http://caffeinatedb.com
9
  WDP ID: 230
10
 
popoverincludes/classes/popoverpublic.php CHANGED
@@ -207,6 +207,15 @@ if(!class_exists('popoverpublic')) {
207
  }
208
  }
209
 
 
 
 
 
 
 
 
 
 
210
 
211
  function has_reached_limit($count = 3) {
212
  if ( isset($_COOKIE['popover_view_'.COOKIEHASH]) && addslashes($_COOKIE['popover_view_'.COOKIEHASH]) >= $count ) {
207
  }
208
  }
209
 
210
+ function referrer_matches($check) {
211
+
212
+ if(preg_match( '/' . $check . '/i', $_SERVER['HTTP_REFERER'] )) {
213
+ return true;
214
+ } else {
215
+ return false;
216
+ }
217
+
218
+ }
219
 
220
  function has_reached_limit($count = 3) {
221
  if ( isset($_COOKIE['popover_view_'.COOKIEHASH]) && addslashes($_COOKIE['popover_view_'.COOKIEHASH]) >= $count ) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: WPMUDEV
3
  Tags: buddypress, wpmu, wpmu plugin, buddypress plugin, making money, seo, Advertising, multisite, Advertising
4
  Requires at least: 3.1
5
  Tested up to: 3.1.2
6
- Stable tag: 3.1.1
7
 
8
  Allows you to display a fancy popup (powered as a popover!) to visitors sitewide or per blog, a *very* effective way of advertising a mailing list.
9
 
3
  Tags: buddypress, wpmu, wpmu plugin, buddypress plugin, making money, seo, Advertising, multisite, Advertising
4
  Requires at least: 3.1
5
  Tested up to: 3.1.2
6
+ Stable tag: 3.1.2
7
 
8
  Allows you to display a fancy popup (powered as a popover!) to visitors sitewide or per blog, a *very* effective way of advertising a mailing list.
9