Popups – WordPress Popup - Version 1.0.2

Version Description

  • Added checks for shortcode values to avoid problems
  • Changed style of Popup shortcodes help box to avoid problems
  • Now popups can be closed with esc and clicking outside of the boxes
  • Fixed the delete rule button that was missing
  • Fixed Javascript error when editing popups
Download this release

Release Info

Developer timersys
Plugin Icon 128x128 Popups – WordPress Popup
Version 1.0.2
Comparing to
See all releases

Code changes from version 1.0.1 to 1.0.2

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups
5
  Requires at least: 3.6
6
  Tested up to: 3.9.1
7
- Stable tag: 1.0.1
8
  Text Domain: spucpt
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -21,11 +21,12 @@ There are multiple display filters that can be combined:
21
  * Show popup on specific pages, templates, posts, etc
22
  * Filter user from search engines
23
  * Filter users that never commented
24
- * Filter users via specific referrer
25
  * Filter users via roles
26
  * Show popup to logged / non logged users
27
  * Show or not to mobile and tablet users
28
-
 
29
 
30
  = Available Settings =
31
 
@@ -46,6 +47,10 @@ Popups ([http://wp.timersys.com/free-plugins/social-popup/](http://wp.timersys.c
46
 
47
  Fork me in https://github.com/timersys/popups/
48
 
 
 
 
 
49
  = Increase your twitter followers =
50
 
51
  Increase your Twitter followers with Twitter likebox Plugin ([http://wordpress.org/extend/plugins/twitter-like-box-reloaded/](http://wordpress.org/extend/plugins/twitter-like-box-reloaded/))
@@ -62,9 +67,24 @@ Enhance your site by letting your users send Social Invitations ([http://wp.time
62
 
63
  3. Go to Popups menu and add as many popups as needed
64
 
 
 
 
 
 
 
 
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
 
 
 
68
  = 1.0.1 =
69
 
70
  * Fixed mobile/tablets display rule and splitted in two new rules
@@ -76,10 +96,3 @@ Enhance your site by letting your users send Social Invitations ([http://wp.time
76
 
77
  * Recoded from scratch. This is a totally new plugin
78
  * Multiple popups are available now handled with custom post types
79
-
80
-
81
-
82
- == Screenshots ==
83
-
84
- 1. Popups Front end
85
- 2. Popups Back end
4
  Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups
5
  Requires at least: 3.6
6
  Tested up to: 3.9.1
7
+ Stable tag: 1.0.2
8
  Text Domain: spucpt
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
21
  * Show popup on specific pages, templates, posts, etc
22
  * Filter user from search engines
23
  * Filter users that never commented
24
+ * Filter users that arrived via another page on your site
25
  * Filter users via roles
26
  * Show popup to logged / non logged users
27
  * Show or not to mobile and tablet users
28
+ * Show depending on post type, post template, post name, post format, post status and post taxonomy
29
+ * Show depending on page template, if page is parent, page name, page type
30
 
31
  = Available Settings =
32
 
47
 
48
  Fork me in https://github.com/timersys/popups/
49
 
50
+ = Install Multiple plugins at once with WpFavs =
51
+
52
+ Bulk plugin installation tool, import WP favorites and create your own lists ([http://wordpress.org/extend/plugins/wpfavs/](http://wordpress.org/extend/plugins/wpfavs/))
53
+
54
  = Increase your twitter followers =
55
 
56
  Increase your Twitter followers with Twitter likebox Plugin ([http://wordpress.org/extend/plugins/twitter-like-box-reloaded/](http://wordpress.org/extend/plugins/twitter-like-box-reloaded/))
67
 
68
  3. Go to Popups menu and add as many popups as needed
69
 
70
+ == Screenshots ==
71
+
72
+ 1. Popups Front end with default settings
73
+ 2. Popups Back end - visual editor
74
+ 3. Popups Back end - display rules and options
75
+ 4. Popups Back end - appearance
76
+
77
 
78
  == Changelog ==
79
 
80
+ = 1.0.2 =
81
+
82
+ * Added checks for shortcode values to avoid problems
83
+ * Changed style of Popup shortcodes help box to avoid problems
84
+ * Now popups can be closed with esc and clicking outside of the boxes
85
+ * Fixed the delete rule button that was missing
86
+ * Fixed Javascript error when editing popups
87
+
88
  = 1.0.1 =
89
 
90
  * Fixed mobile/tablets display rule and splitted in two new rules
96
 
97
  * Recoded from scratch. This is a totally new plugin
98
  * Multiple popups are available now handled with custom post types
 
 
 
 
 
 
 
admin/assets/css/admin.css CHANGED
@@ -37,7 +37,7 @@ table.spu_table td.label ul.hl li {
37
 
38
  }
39
 
40
- table.spu_table td.label ul.hl li a.acf-button {
41
  font-size: 12px;
42
  padding: 6px 10px;
43
  font-weight: normal;
@@ -166,10 +166,20 @@ input#spu-width {
166
 
167
  #spu-rules .rules-group tr:hover .rules-remove-rule {
168
  display: block;
 
 
 
 
 
 
 
169
  }
 
 
 
170
 
171
  .spu-loading{
172
- height: 16px;
173
  margin: 10px auto;
174
  padding: 6px;
175
  width: 16px;
37
 
38
  }
39
 
40
+ table.spu_table td.label ul.hl li a.spu-button {
41
  font-size: 12px;
42
  padding: 6px 10px;
43
  font-weight: normal;
166
 
167
  #spu-rules .rules-group tr:hover .rules-remove-rule {
168
  display: block;
169
+ padding: 0 7px;
170
+ font-weight: bold;
171
+ font-size: 16px;
172
+ border-radius: 50%;
173
+ -moz-border-radius: 50%;
174
+ -webkit-border-radius: 50%;
175
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
176
  }
177
+ #spu-rules .rules-group .rules-remove-rule:hover {
178
+ color: red;
179
+ }
180
 
181
  .spu-loading{
182
+ height: 16px;
183
  margin: 10px auto;
184
  padding: 6px;
185
  width: 16px;
admin/class-social-popup-admin.php CHANGED
@@ -71,8 +71,7 @@ class SocialPopup_Admin {
71
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
72
 
73
  // Add an action link pointing to the options page.
74
- $plugin_basename = plugin_basename( plugin_dir_path( realpath( dirname( __FILE__ ) ) ) . $this->plugin_slug . '.php' );
75
- add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
76
 
77
  //Filters for rules
78
  add_filter('spu/get_post_types', array($this, 'get_post_types'), 1, 3);
@@ -112,7 +111,7 @@ class SocialPopup_Admin {
112
  function register_cpt() {
113
 
114
  $labels = array(
115
- 'name' => _x( 'Popups', 'post type general name', $this->plugin_slug ),
116
  'singular_name' => _x( 'Popups', 'post type singular name', $this->plugin_slug ),
117
  'menu_name' => _x( 'Popups', 'admin menu', $this->plugin_slug ),
118
  'name_admin_bar' => _x( 'Popups', 'add new on admin bar', $this->plugin_slug ),
@@ -190,7 +189,7 @@ class SocialPopup_Admin {
190
 
191
  add_meta_box(
192
  'spu-donate',
193
- __( 'Donate $10, $20 or $50', $this->plugin_slug ),
194
  array( $this, 'metabox_donate' ),
195
  'spucpt',
196
  'side'
@@ -356,6 +355,7 @@ class SocialPopup_Admin {
356
  return;
357
  }
358
  wp_enqueue_style( 'spu-admin-css', plugins_url( 'assets/css/admin.css', __FILE__ ) , '', SocialPopup::VERSION );
 
359
 
360
  }
361
 
@@ -376,6 +376,7 @@ class SocialPopup_Admin {
376
  if ( get_post_type() !== 'spucpt' || !in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) ) {
377
  return;
378
  }
 
379
  wp_enqueue_script( 'spu-admin-js', plugins_url( 'assets/js/admin.js', __FILE__ ) , '', SocialPopup::VERSION );
380
  wp_localize_script( 'spu-admin-js', 'spu_js',
381
  array(
@@ -400,7 +401,7 @@ class SocialPopup_Admin {
400
 
401
  return array_merge(
402
  array(
403
- 'settings' => '<a href="' . admin_url( 'options-general.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>'
404
  ),
405
  $links
406
  );
71
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
72
 
73
  // Add an action link pointing to the options page.
74
+ add_filter( 'plugin_action_links_' . SPU_PLUGIN_HOOK, array( $this, 'add_action_links' ) );
 
75
 
76
  //Filters for rules
77
  add_filter('spu/get_post_types', array($this, 'get_post_types'), 1, 3);
111
  function register_cpt() {
112
 
113
  $labels = array(
114
+ 'name' => _x( 'Popups v' . SocialPopup::VERSION , 'post type general name', $this->plugin_slug ),
115
  'singular_name' => _x( 'Popups', 'post type singular name', $this->plugin_slug ),
116
  'menu_name' => _x( 'Popups', 'admin menu', $this->plugin_slug ),
117
  'name_admin_bar' => _x( 'Popups', 'add new on admin bar', $this->plugin_slug ),
189
 
190
  add_meta_box(
191
  'spu-donate',
192
+ __( 'Donate & support', $this->plugin_slug ),
193
  array( $this, 'metabox_donate' ),
194
  'spucpt',
195
  'side'
355
  return;
356
  }
357
  wp_enqueue_style( 'spu-admin-css', plugins_url( 'assets/css/admin.css', __FILE__ ) , '', SocialPopup::VERSION );
358
+ wp_enqueue_style( 'wp-color-picker' );
359
 
360
  }
361
 
376
  if ( get_post_type() !== 'spucpt' || !in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) ) {
377
  return;
378
  }
379
+ wp_enqueue_script( 'wp-color-picker' );
380
  wp_enqueue_script( 'spu-admin-js', plugins_url( 'assets/js/admin.js', __FILE__ ) , '', SocialPopup::VERSION );
381
  wp_localize_script( 'spu-admin-js', 'spu_js',
382
  array(
401
 
402
  return array_merge(
403
  array(
404
+ 'settings' => '<a href="' . admin_url( 'edit.php?post_type=spucpt' ) . '">' . __( 'Add a Popup', $this->plugin_slug ) . '</a>'
405
  ),
406
  $links
407
  );
admin/views/metabox-help.php CHANGED
@@ -5,37 +5,37 @@ if ( !defined( 'ABSPATH' ) ) exit;
5
 
6
  <p><?php _e( 'You have three social shortcodes to use that will print a Facebook like, a Google+ Follow and a Twitter follow. Check the available options and default values:', $this->plugin_slug );?></p>
7
  <p><strong>Facebook:</strong></p>
8
- <pre>
9
  [spu-facebook href="" layout="" show_faces="" share="" action="" width=""]
10
- </pre>
11
  <a href="fb-opts" onclick="jQuery('#fb-opts').slideToggle();return false;"><?php _e( 'View Facebook Options', $this->plugin_slug );?></a>
12
  <ul id="fb-opts" style="display:none;">
13
  <li><b>href:</b> <?php _e( 'Your facebook page url', $this->plugin_slug );?></li>
14
- <li><b>layout:</b> <?php _e( 'standard, box_count, button - Default: button_count', $this->plugin_slug );?></li>
15
- <li><b>show_faces:</b> <?php _e( 'true - Default: False', $this->plugin_slug );?></li>
16
- <li><b>share:</b> <?php _e( 'true - Default: False', $this->plugin_slug );?></li>
17
- <li><b>action:</b> <?php _e( 'recommend - Default: Like', $this->plugin_slug );?></li>
18
  <li><b>width:</b></li>
19
  </ul>
20
  <p><strong>Google+:</strong></p>
21
- <pre>
22
  [spu-google url="" size="" annotation=""]
23
- </pre>
24
  <a href="go-opts" onclick="jQuery('#go-opts').slideToggle();return false;"><?php _e( 'View Google+ Options', $this->plugin_slug );?></a>
25
  <ul id="go-opts" style="display:none;">
26
  <li><b>url:</b> <?php _e( 'Your Google+ url', $this->plugin_slug );?></li>
27
- <li><b>size:</b> <?php _e( 'small, standard, tall Default: medium', $this->plugin_slug );?></li>
28
- <li><b>annotation:</b> <?php _e( 'inline, none - Default: bubble', $this->plugin_slug );?></li>
29
  </ul>
30
  <p><strong>Twitter:</strong></p>
31
- <pre>
32
  [spu-twitter user="" show_count="" size="" lang="" text=""]
33
- </pre>
34
  <a href="tw-opts" onclick="jQuery('#tw-opts').slideToggle();return false;"><?php _e( 'View Twitter Options', $this->plugin_slug );?></a>
35
  <ul id="tw-opts" style="display:none;">
36
- <li><b>user:</b> <?php _e( 'Your Twitter user - Default chifliiiii', $this->plugin_slug );?></li>
37
- <li><b>show_count:</b> <?php _e( 'false Default: true', $this->plugin_slug );?></li>
38
- <li><b>size:</b> <?php _e( 'large - Default: ""', $this->plugin_slug );?></li>
39
  <li><b>lang:</b> </li>
40
- <li><b>text:</b> <?php _e( 'The button text - Default: Follow @chifliiiii', $this->plugin_slug );?></li>
41
  </ul>
5
 
6
  <p><?php _e( 'You have three social shortcodes to use that will print a Facebook like, a Google+ Follow and a Twitter follow. Check the available options and default values:', $this->plugin_slug );?></p>
7
  <p><strong>Facebook:</strong></p>
8
+ <p>
9
  [spu-facebook href="" layout="" show_faces="" share="" action="" width=""]
10
+ </p>
11
  <a href="fb-opts" onclick="jQuery('#fb-opts').slideToggle();return false;"><?php _e( 'View Facebook Options', $this->plugin_slug );?></a>
12
  <ul id="fb-opts" style="display:none;">
13
  <li><b>href:</b> <?php _e( 'Your facebook page url', $this->plugin_slug );?></li>
14
+ <li><b>layout:</b> <?php _e( 'standard, box_count, button <b>Default value:</b> button_count', $this->plugin_slug );?></li>
15
+ <li><b>show_faces:</b> <?php _e( 'true <b>Default value:</b> false', $this->plugin_slug );?></li>
16
+ <li><b>share:</b> <?php _e( 'true <b>Default value:</b> false', $this->plugin_slug );?></li>
17
+ <li><b>action:</b> <?php _e( 'recommend <b>Default value:</b> like', $this->plugin_slug );?></li>
18
  <li><b>width:</b></li>
19
  </ul>
20
  <p><strong>Google+:</strong></p>
21
+ <p>
22
  [spu-google url="" size="" annotation=""]
23
+ </p>
24
  <a href="go-opts" onclick="jQuery('#go-opts').slideToggle();return false;"><?php _e( 'View Google+ Options', $this->plugin_slug );?></a>
25
  <ul id="go-opts" style="display:none;">
26
  <li><b>url:</b> <?php _e( 'Your Google+ url', $this->plugin_slug );?></li>
27
+ <li><b>size:</b> <?php _e( 'small, standard, tall Default value: medium', $this->plugin_slug );?></li>
28
+ <li><b>annotation:</b> <?php _e( 'inline, none <b>Default value:</b> bubble', $this->plugin_slug );?></li>
29
  </ul>
30
  <p><strong>Twitter:</strong></p>
31
+ <p>
32
  [spu-twitter user="" show_count="" size="" lang="" text=""]
33
+ </p>
34
  <a href="tw-opts" onclick="jQuery('#tw-opts').slideToggle();return false;"><?php _e( 'View Twitter Options', $this->plugin_slug );?></a>
35
  <ul id="tw-opts" style="display:none;">
36
+ <li><b>user:</b> <?php _e( 'Your Twitter user <b>Default chifli</b>iiii', $this->plugin_slug );?></li>
37
+ <li><b>show_count:</b> <?php _e( 'false Default value: true', $this->plugin_slug );?></li>
38
+ <li><b>size:</b> <?php _e( 'large <b>Default value:</b> ""', $this->plugin_slug );?></li>
39
  <li><b>lang:</b> </li>
40
+ <li><b>text:</b> <?php _e( 'The button text <b>Default value:</b> Follow @chifliiiii', $this->plugin_slug );?></li>
41
  </ul>
admin/views/metabox-options.php CHANGED
@@ -4,7 +4,7 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
4
 
5
  <table class="form-table">
6
 
7
-
8
  <tr valign="top">
9
  <th><label for="spu_position"><?php _e( 'Box Position', $this->plugin_slug ); ?></label></th>
10
  <td>
@@ -25,7 +25,7 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
25
 
26
  <option value="seconds" <?php selected($opts['trigger'], 'seconds'); ?>><?php _e( 'seconds after page load', $this->plugin_slug ); ?></option>
27
  <option value="percentage" <?php selected($opts['trigger'], 'percentage'); ?>>% <?php _e( 'of page height', $this->plugin_slug ); ?></option>
28
-
29
  </select>
30
  </td>
31
  <td>
@@ -37,6 +37,7 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
37
  <td colspan="3">
38
  <label><input type="radio" name="spu[animation]" value="fade" <?php checked($opts['animation'], 'fade'); ?> /> <?php _e( 'Fade In', $this->plugin_slug ); ?></label> &nbsp;
39
  <label><input type="radio" name="spu[animation]" value="slide" <?php checked($opts['animation'], 'slide'); ?> /> <?php _e( 'Slide In', $this->plugin_slug ); ?></label>
 
40
  <p class="help"><?php _e( 'Slide will only apply when popup is on the corners', $this->plugin_slug ); ?></p>
41
  </td>
42
  </tr>
@@ -66,10 +67,12 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
66
  <p class="help"><?php _e( 'If test mode is enabled, the box will show up regardless of whether a cookie has been set. (To admins only)', $this->plugin_slug ); ?></p>
67
  </td>
68
  </tr>
 
69
  </table>
70
 
71
  <h3 class="spu-title"><?php _e( 'Appearance', $this->plugin_slug ); ?></h3>
72
  <table class="form-table">
 
73
  <tr valign="top">
74
  <th><label for="spu_bgopacity"><?php _e( 'Background opacity', $this->plugin_slug ); ?></label></th>
75
  <td colspan="3">
@@ -103,6 +106,7 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
103
  </td>
104
  <td></td>
105
  </tr>
 
106
  </table>
107
 
108
  <?php wp_nonce_field( 'spu_options', 'spu_options_nonce' ); ?>
4
 
5
  <table class="form-table">
6
 
7
+ <?php do_action( 'spu/metaboxes/before_display_options' );?>
8
  <tr valign="top">
9
  <th><label for="spu_position"><?php _e( 'Box Position', $this->plugin_slug ); ?></label></th>
10
  <td>
25
 
26
  <option value="seconds" <?php selected($opts['trigger'], 'seconds'); ?>><?php _e( 'seconds after page load', $this->plugin_slug ); ?></option>
27
  <option value="percentage" <?php selected($opts['trigger'], 'percentage'); ?>>% <?php _e( 'of page height', $this->plugin_slug ); ?></option>
28
+ <?php do_action( 'spu/metaboxes/trigger_options' );?>
29
  </select>
30
  </td>
31
  <td>
37
  <td colspan="3">
38
  <label><input type="radio" name="spu[animation]" value="fade" <?php checked($opts['animation'], 'fade'); ?> /> <?php _e( 'Fade In', $this->plugin_slug ); ?></label> &nbsp;
39
  <label><input type="radio" name="spu[animation]" value="slide" <?php checked($opts['animation'], 'slide'); ?> /> <?php _e( 'Slide In', $this->plugin_slug ); ?></label>
40
+ <?php do_action( 'spu/metaboxes/animations', $otps );?>
41
  <p class="help"><?php _e( 'Slide will only apply when popup is on the corners', $this->plugin_slug ); ?></p>
42
  </td>
43
  </tr>
67
  <p class="help"><?php _e( 'If test mode is enabled, the box will show up regardless of whether a cookie has been set. (To admins only)', $this->plugin_slug ); ?></p>
68
  </td>
69
  </tr>
70
+ <?php do_action( 'spu/metaboxes/after_display_options' );?>
71
  </table>
72
 
73
  <h3 class="spu-title"><?php _e( 'Appearance', $this->plugin_slug ); ?></h3>
74
  <table class="form-table">
75
+ <?php do_action( 'spu/metaboxes/before_appearance_options' );?>
76
  <tr valign="top">
77
  <th><label for="spu_bgopacity"><?php _e( 'Background opacity', $this->plugin_slug ); ?></label></th>
78
  <td colspan="3">
106
  </td>
107
  <td></td>
108
  </tr>
109
+ <?php do_action( 'spu/metaboxes/after_appearance_options' );?>
110
  </table>
111
 
112
  <?php wp_nonce_field( 'spu_options', 'spu_options_nonce' ); ?>
admin/views/metabox-rules.php CHANGED
@@ -124,7 +124,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
124
  <a href="#" class="rules-add-rule button"><?php _e("and", $this->plugin_slug ); ?></a>
125
  </td>
126
  <td class="remove">
127
- <a href="#" class="rules-remove-rule acf-button-remove"></a>
128
  </td>
129
  </tr>
130
  <?php endforeach; ?>
124
  <a href="#" class="rules-add-rule button"><?php _e("and", $this->plugin_slug ); ?></a>
125
  </td>
126
  <td class="remove">
127
+ <a href="#" class="rules-remove-rule rules-remove-rule">-</a>
128
  </td>
129
  </tr>
130
  <?php endforeach; ?>
admin/views/metabox-support.php CHANGED
@@ -3,4 +3,5 @@
3
  if ( !defined( 'ABSPATH' ) ) exit;
4
  ?>
5
 
 
6
  <p><?php echo sprintf( __( 'If you need support please go to the WordPress.org <a href="%s">support forums</a>', $this->plugin_slug ), 'http://wordpress.org/support/plugin/http://wordpress.org/plugins/popups/');?></p>
3
  if ( !defined( 'ABSPATH' ) ) exit;
4
  ?>
5
 
6
+ <p><?php echo sprintf( __( 'You are using Popups plugin v%s', $this->plugin_slug ), SocialPopup::VERSION );?></p>
7
  <p><?php echo sprintf( __( 'If you need support please go to the WordPress.org <a href="%s">support forums</a>', $this->plugin_slug ), 'http://wordpress.org/support/plugin/http://wordpress.org/plugins/popups/');?></p>
popups.php CHANGED
@@ -11,7 +11,7 @@
11
  * @socialpopup
12
  * Plugin Name: Popups
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
- * Version: 1.0.1
15
  * Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
16
  * Author: Damian Logghe
17
  * Author URI: http://wp.timersys.com
11
  * @socialpopup
12
  * Plugin Name: Popups
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
+ * Version: 1.0.2
15
  * Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
16
  * Author: Damian Logghe
17
  * Author URI: http://wp.timersys.com
public/assets/js/min/public-ck.js CHANGED
@@ -1 +1 @@
1
- function createCookie(t,n,e){if(e){var i=new Date;i.setTime(i.getTime()+24*e*60*60*1e3);var o="; expires="+i.toGMTString()}else var o="";document.cookie=t+"="+n+o+"; path=/"}function readCookie(t){for(var n=t+"=",e=document.cookie.split(";"),i=0;i<e.length;i++){for(var o=e[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return null}jQuery(window).load(function(){window.SPU=function(t){function n(n){var e=a[n],i=t(window).width(),o=t(window).height(),r=e.height(),s=e.width();e.css({position:"fixed",top:o/2-r/2,left:i/2-s/2})}function e(n,e){var i=a[n],o=t("#spu-bg-"+n),r=i.data("bgopa");if(i.is(":animated"))return!1;if(e===!0&&i.is(":visible")||e===!1&&i.is(":hidden"))return!1;var s=i.data("animation");return"fade"===s?i.fadeToggle("slow"):i.slideToggle("slow"),e===!0&&r>0?o.fadeIn():o.fadeOut(),e}var i=t(window).height(),o=spuvar.is_admin,a=[];return t(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),t(".spu-box").each(function(){var r=t(this),s=r.data("trigger"),d=r.data("animation"),c=0,u=1===parseInt(r.data("test-mode")),l=r.data("box-id"),f=1===parseInt(r.data("auto-hide")),h=1===parseInt(r.data("advanced-close")),w=parseInt(r.data("seconds-close"));if(h){t(document).keyup(function(t){27==t.keyCode&&e(l,!1)});var g=navigator.userAgent,p=g.match(/iPad/i)||g.match(/iPhone/i)?"touchstart":"click";t("body").on(p,function(t){e(l,!1)}),t("#"+l).click(function(t){t.stopPropagation()})}if(r.hide().css("left",""),a[l]=r,"seconds"==s)var m=parseInt(r.data("trigger-number"),10);else var v="percentage"==s?parseInt(r.data("trigger-number"),10)/100:.8,b=v*t(document).height();var k=function(){c&&clearTimeout(c),c=window.setTimeout(function(){var o=t(window).scrollTop(),a=o+i>=b;a?(f||t(window).unbind("scroll",k),r.hasClass("spu-centered")&&n(l),e(l,!0)):e(l,!1)},100)},T=function(){c&&clearTimeout(c),c=window.setTimeout(function(){r.hasClass("spu-centered")&&n(l),e(l,!0)},1e3*m)},I=readCookie("spu_box_"+l);if((void 0==I||o&&u)&&("seconds"==s?T():(t(window).bind("scroll",k),k()),window.location.hash&&window.location.hash.length>0)){var x=window.location.hash,C;x.substring(1)===r.attr("id")&&setTimeout(function(){e(l,!0)},100)}r.find(".spu-close").click(function(){e(l,!1),"percentage"==s&&t(window).unbind("scroll",k);var n=parseInt(r.data("cookie"));n>0&&createCookie("spu_box_"+l,!0,n)}),t('a[href="#'+r.attr("id")+'"]').click(function(){return e(l,!0),!1})}),{show:function(t){return e(t,!0)},hide:function(t){return e(t,!1)}}}(window.jQuery)});
1
+ function createCookie(t,n,e){if(e){var i=new Date;i.setTime(i.getTime()+24*e*60*60*1e3);var o="; expires="+i.toGMTString()}else var o="";document.cookie=t+"="+n+o+"; path=/"}function readCookie(t){for(var n=t+"=",e=document.cookie.split(";"),i=0;i<e.length;i++){for(var o=e[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return null}jQuery(window).load(function(){window.SPU=function(t){function n(n){var e=a[n],i=t(window).width(),o=t(window).height(),r=e.height(),s=e.width();e.css({position:"fixed",top:o/2-r/2,left:i/2-s/2})}function e(n,e){var i=a[n],o=t("#spu-bg-"+n),r=i.data("bgopa");if(i.is(":animated"))return!1;if(e===!0&&i.is(":visible")||e===!1&&i.is(":hidden"))return!1;var s=i.data("animation");return"fade"===s?i.fadeToggle("slow"):i.slideToggle("slow"),e===!0&&r>0?o.fadeIn():o.fadeOut(),e}var i=t(window).height(),o=spuvar.is_admin,a=[];return t(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),t(".spu-box").each(function(){var r=t(this),s=r.data("trigger"),d=r.data("animation"),c=0,u=1===parseInt(r.data("test-mode")),l=r.data("box-id"),f=1===parseInt(r.data("auto-hide")),h=1===parseInt(r.data("advanced-close")),w=parseInt(r.data("seconds-close"));if(h){t(document).keyup(function(t){27==t.keyCode&&e(l,!1)});var g=navigator.userAgent,p=g.match(/iPad/i)||g.match(/iPhone/i)?"touchstart":"click";t("body").on(p,function(t){e(l,!1)}),t(".spu-box").click(function(t){t.stopPropagation()})}if(r.hide().css("left",""),a[l]=r,"seconds"==s)var m=parseInt(r.data("trigger-number"),10);else var v="percentage"==s?parseInt(r.data("trigger-number"),10)/100:.8,b=v*t(document).height();var k=function(){c&&clearTimeout(c),c=window.setTimeout(function(){var o=t(window).scrollTop(),a=o+i>=b;a?(f||t(window).unbind("scroll",k),r.hasClass("spu-centered")&&n(l),e(l,!0)):e(l,!1)},100)},T=function(){c&&clearTimeout(c),c=window.setTimeout(function(){r.hasClass("spu-centered")&&n(l),e(l,!0)},1e3*m)},x=readCookie("spu_box_"+l);if((void 0==x||o&&u)&&("seconds"==s?T():(t(window).bind("scroll",k),k()),window.location.hash&&window.location.hash.length>0)){var I=window.location.hash,C;I.substring(1)===r.attr("id")&&setTimeout(function(){e(l,!0)},100)}r.find(".spu-close").click(function(){e(l,!1),"percentage"==s&&t(window).unbind("scroll",k);var n=parseInt(r.data("cookie"));n>0&&createCookie("spu_box_"+l,!0,n)}),t('a[href="#'+r.attr("id")+'"]').click(function(){return e(l,!0),!1})}),{show:function(t){return e(t,!0)},hide:function(t){return e(t,!1)}}}(window.jQuery)});
public/assets/js/public.js CHANGED
@@ -46,7 +46,7 @@ jQuery(window).load(function() {
46
  toggleBox( id, false );
47
  });
48
  //not on the box
49
- $('#' + id ).click(function(event) {
50
  event.stopPropagation();
51
  });
52
  }
46
  toggleBox( id, false );
47
  });
48
  //not on the box
49
+ $('.spu-box' ).click(function(event) {
50
  event.stopPropagation();
51
  });
52
  }
public/class-social-popup.php CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
23
  *
24
  * @var string
25
  */
26
- const VERSION = '1.0.1';
27
 
28
  /**
29
  * Popups to use acrros files
@@ -318,8 +318,15 @@ class SocialPopup {
318
  * @since 1.0.0
319
  */
320
  public function register_scripts() {
 
 
 
 
 
 
321
  wp_register_style( 'spu-public-css', plugins_url( 'assets/css/public.css', __FILE__ ), array(), self::VERSION );
322
- wp_register_script( 'spu-public', plugins_url( 'assets/js/min/public-ck.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
 
323
 
324
  wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_bloginfo('language').'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
325
  wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
@@ -412,8 +419,18 @@ class SocialPopup {
412
  'width' => '',
413
  ), $atts ) );
414
 
 
 
 
 
 
 
 
 
 
 
415
 
416
- return '<div class="spu-facebook spu-shortcode"><div class="fb-like" data-width="'.$width.'" data-href="'.$href.'" data-layout="'.$layout.'" data-action="'.$action.'" data-show-faces="'.$show_faces.'" data-share="'.$share.'"></div></div>';
417
 
418
  }
419
 
@@ -433,7 +450,7 @@ class SocialPopup {
433
  'text' => 'Follow @chifliiiii',
434
  ), $atts ) );
435
 
436
- return '<div class="spu-twitter spu-shortcode"><a href="https://twitter.com/'.$user.'" class="twitter-follow-button" data-show-count="'.$show_count.'" data-size="'.$size.'"></a></div>';
437
 
438
  }
439
 
@@ -449,7 +466,18 @@ class SocialPopup {
449
  'annotation' => 'bubble', //inline none
450
  'url' => 'https://plus.google.com/u/0/103508783120806246698/posts', //inline none
451
  ), $atts ) );
452
-
 
 
 
 
 
 
 
 
 
 
 
453
  return '<div class="spu-google spu-shortcode"><div class="g-plusone" data-callback="googleCB" data-onendinteraction="closeGoogle" data-recommendations="false" data-annotation="'.$annotation.'" data-size="'.$size.'" data-href="'.$url.'"></div></div>';
454
 
455
  }
@@ -534,7 +562,7 @@ class SocialPopup {
534
  data-box-id="<?php echo $box->ID ; ?>" data-trigger="<?php echo esc_attr( $opts['trigger'] ); ?>"
535
  data-trigger-number="<?php echo esc_attr( absint( $opts['trigger_number'] ) ); ?>"
536
  data-animation="<?php echo esc_attr($opts['animation']); ?>" data-cookie="<?php echo esc_attr( absint ( $opts['cookie'] ) ); ?>" data-test-mode="<?php echo esc_attr($opts['test_mode']); ?>"
537
- data-auto-hide="<?php echo esc_attr($opts['auto_hide']); ?>" data-bgopa="<?php echo esc_attr($css['bgopacity']);?>" data-advanced-close="true"
538
  style="left:-99999px">
539
  <div class="spu-content"><?php echo $content; ?></div>
540
  <span class="spu-close">&times;</span>
23
  *
24
  * @var string
25
  */
26
+ const VERSION = '1.0.2';
27
 
28
  /**
29
  * Popups to use acrros files
318
  * @since 1.0.0
319
  */
320
  public function register_scripts() {
321
+
322
+ $js_url = plugins_url( 'assets/js/min/public-ck.js', __FILE__ );
323
+
324
+ if( defined( 'SPU_DEBUG_MODE' ) ) {
325
+ $js_url = plugins_url( 'assets/js/public.js', __FILE__ );
326
+ }
327
  wp_register_style( 'spu-public-css', plugins_url( 'assets/css/public.css', __FILE__ ), array(), self::VERSION );
328
+
329
+ wp_register_script( 'spu-public', $js_url, array( 'jquery' ), self::VERSION, true );
330
 
331
  wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_bloginfo('language').'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
332
  wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
419
  'width' => '',
420
  ), $atts ) );
421
 
422
+ $layout = strtolower( trim( $layout ) );
423
+ $action = strtolower( trim( $action ) );
424
+
425
+ // to avoid problems
426
+ if( 'standard' != $layout || 'box_count' != $layout || 'button_count' != $layout || 'button' != $layout ) {
427
+ $layout = 'button_count';
428
+ }
429
+ if( 'like' != $action || 'recommend' != $action ) {
430
+ $action = 'like';
431
+ }
432
 
433
+ return '<div class="spu-facebook spu-shortcode"><div class="fb-like" data-width="'.strtolower( trim( $width ) ).'" data-href="'. $href .'" data-layout="'.$layout.'" data-action="'.$action.'" data-show-faces="'.strtolower( trim( $show_faces ) ).'" data-share="'.strtolower( trim( $share ) ).'"></div></div>';
434
 
435
  }
436
 
450
  'text' => 'Follow @chifliiiii',
451
  ), $atts ) );
452
 
453
+ return '<div class="spu-twitter spu-shortcode"><a href="https://twitter.com/'.$user.'" class="twitter-follow-button" data-show-count="'.strtolower( trim( $show_count ) ).'" data-size="'.strtolower( trim( $size ) ).'"></a></div>';
454
 
455
  }
456
 
466
  'annotation' => 'bubble', //inline none
467
  'url' => 'https://plus.google.com/u/0/103508783120806246698/posts', //inline none
468
  ), $atts ) );
469
+
470
+ $size = strtolower( trim( $size ) );
471
+ $annotation = strtolower( trim( $annotation ) );
472
+
473
+ //to avoid problems
474
+ if( 'medium' != $size || 'small' != $size || 'standard' != $size || 'tall' != $size ) {
475
+ $size = 'medium';
476
+ }
477
+ if( 'bubble' != $annotation || 'inline' != $annotation || 'none' != $annotation ) {
478
+ $annotation = 'bubble';
479
+ }
480
+
481
  return '<div class="spu-google spu-shortcode"><div class="g-plusone" data-callback="googleCB" data-onendinteraction="closeGoogle" data-recommendations="false" data-annotation="'.$annotation.'" data-size="'.$size.'" data-href="'.$url.'"></div></div>';
482
 
483
  }
562
  data-box-id="<?php echo $box->ID ; ?>" data-trigger="<?php echo esc_attr( $opts['trigger'] ); ?>"
563
  data-trigger-number="<?php echo esc_attr( absint( $opts['trigger_number'] ) ); ?>"
564
  data-animation="<?php echo esc_attr($opts['animation']); ?>" data-cookie="<?php echo esc_attr( absint ( $opts['cookie'] ) ); ?>" data-test-mode="<?php echo esc_attr($opts['test_mode']); ?>"
565
+ data-auto-hide="<?php echo esc_attr($opts['auto_hide']); ?>" data-bgopa="<?php echo esc_attr($css['bgopacity']);?>" data-advanced-close="1"
566
  style="left:-99999px">
567
  <div class="spu-content"><?php echo $content; ?></div>
568
  <span class="spu-close">&times;</span>