Version Description
- Added support for Contact Form 7, Gravity Forms and most of other generic forms
- Added function to close popup when user actually follow/like
- Fixed undefined notices
Download this release
Release Info
Developer | timersys |
Plugin | Popups – WordPress Popup |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.2.1
- README.txt +34 -6
- admin/class-social-popup-admin.php +26 -14
- admin/views/metabox-options.php +2 -2
- admin/views/metabox-premium.php +4 -1
- admin/views/settings-page.php +8 -0
- popups.php +1 -1
- public/assets/js/min/public-min.js +1 -1
- public/assets/js/public.js +128 -10
- public/class-social-popup.php +16 -9
- public/includes/Mobile_Detect.php +75 -38
- public/includes/class-spu-rules.php +9 -3
- public/views/popup.php +12 -4
README.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: timersys
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
|
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: 4.0
|
7 |
-
Stable tag: 1.
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -37,10 +37,20 @@ There are multiple display filters that can be combined:
|
|
37 |
* You can also configure background opacity.
|
38 |
* Days until popup shows again
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
Check the **new premium version** available in ([http://wp.timersys.com/popups/](http://wp.timersys.com/popups/))
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
= Plugin's Official Site =
|
46 |
|
@@ -87,6 +97,24 @@ Yes if you need to debug you can use uncompressed javascript by addings ([this c
|
|
87 |
|
88 |
== Changelog ==
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
= 1.1.1 =
|
91 |
|
92 |
* Sorry!! fixed bug in settings page and js file
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
|
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: 4.0
|
7 |
+
Stable tag: 1.2.1
|
8 |
Text Domain: spucpt
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
37 |
* You can also configure background opacity.
|
38 |
* Days until popup shows again
|
39 |
|
40 |
+
> <strong>Premium Version</strong><br>
|
41 |
+
>
|
42 |
+
> Check the **new premium version** available in ([http://wp.timersys.com/popups/](http://wp.timersys.com/popups/))
|
43 |
+
>
|
44 |
+
> * Track impressions and Conversions of social networks and forms like CF7 or Gravity forms
|
45 |
+
> * Track impressions and Conversions in Google Analytics
|
46 |
+
> * 8 New animations effects
|
47 |
+
> * Exit Intent technology
|
48 |
+
> * New trigger methods
|
49 |
+
> * Timer for auto closing
|
50 |
+
> * Ability to disable close button
|
51 |
+
> * Ability to disable Advanced close methods like esc or clicking outside of the popup
|
52 |
+
> * Premium support
|
53 |
+
>
|
54 |
|
55 |
= Plugin's Official Site =
|
56 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 1.2.1 =
|
101 |
+
|
102 |
+
* Added support for Contact Form 7, Gravity Forms and most of other generic forms
|
103 |
+
* Added function to close popup when user actually follow/like
|
104 |
+
* Fixed undefined notices
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
= 1.2 =
|
109 |
+
|
110 |
+
* Fixed permissions to edit popups settings
|
111 |
+
* Update Mobile detect class
|
112 |
+
* Added safe mode
|
113 |
+
* Added js to fix facebook width bug "failed to resize in 45s"
|
114 |
+
* Added qTranslate support
|
115 |
+
* Fixed bug when disabling shortcodes js in settings page
|
116 |
+
* General js fixes
|
117 |
+
|
118 |
= 1.1.1 =
|
119 |
|
120 |
* Sorry!! fixed bug in settings page and js file
|
admin/class-social-popup-admin.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
*/
|
11 |
|
12 |
|
13 |
-
define( SPU_ADMIN_DIR , plugin_dir_path(__FILE__) );
|
14 |
|
15 |
// Include Helper class
|
16 |
include_once( SPU_PLUGIN_DIR . 'includes/class-spu-helper.php' );
|
@@ -56,6 +56,15 @@ class SocialPopup_Admin {
|
|
56 |
* @var bool
|
57 |
*/
|
58 |
protected $premium = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
/**
|
61 |
* Initialize the plugin by loading admin scripts & styles and adding a
|
@@ -69,6 +78,9 @@ class SocialPopup_Admin {
|
|
69 |
$plugin = SocialPopup::get_instance();
|
70 |
$this->plugin_slug = $plugin->get_plugin_slug();
|
71 |
|
|
|
|
|
|
|
72 |
//settings name
|
73 |
$this->options_name = $this->plugin_slug .'_settings';
|
74 |
|
@@ -101,7 +113,7 @@ class SocialPopup_Admin {
|
|
101 |
add_filter('spu/get_taxonomies', array($this, 'get_taxonomies'), 1, 3);
|
102 |
|
103 |
//AJAX Actions
|
104 |
-
add_action('wp_ajax_spu/field_group/render_rules', array(
|
105 |
|
106 |
//Tinymce
|
107 |
add_filter( 'tiny_mce_before_init', array($this, 'tinymce_init') );
|
@@ -160,15 +172,15 @@ class SocialPopup_Admin {
|
|
160 |
'rewrite' => array( 'slug' => 'spucpt' ),
|
161 |
'capability_type' => 'post',
|
162 |
'capabilities' => array(
|
163 |
-
'publish_posts' => 'manage_options',
|
164 |
-
'edit_posts' => 'manage_options',
|
165 |
-
'edit_others_posts' => 'manage_options',
|
166 |
-
'delete_posts' => 'manage_options',
|
167 |
-
'delete_others_posts' => 'manage_options',
|
168 |
-
'read_private_posts' => 'manage_options',
|
169 |
-
'edit_post' => 'manage_options',
|
170 |
-
'delete_post' => 'manage_options',
|
171 |
-
'read_post' => 'manage_options',
|
172 |
),
|
173 |
'has_archive' => false,
|
174 |
'hierarchical' => false,
|
@@ -188,7 +200,7 @@ class SocialPopup_Admin {
|
|
188 |
*/
|
189 |
public function add_settings_menu() {
|
190 |
|
191 |
-
add_submenu_page('edit.php?post_type=spucpt', 'Settings', 'Settings', '
|
192 |
|
193 |
}
|
194 |
|
@@ -308,7 +320,7 @@ class SocialPopup_Admin {
|
|
308 |
*/
|
309 |
public function popup_rules( $post, $metabox ) {
|
310 |
|
311 |
-
$groups = apply_filters('spu/metaboxes/get_box_rules',
|
312 |
|
313 |
include 'views/metabox-rules.php';
|
314 |
}
|
@@ -320,7 +332,7 @@ class SocialPopup_Admin {
|
|
320 |
*/
|
321 |
public function popup_options( $post, $metabox ) {
|
322 |
|
323 |
-
$opts = apply_filters('spu/metaboxes/get_box_options',
|
324 |
|
325 |
include 'views/metabox-options.php';
|
326 |
}
|
10 |
*/
|
11 |
|
12 |
|
13 |
+
define( 'SPU_ADMIN_DIR' , plugin_dir_path(__FILE__) );
|
14 |
|
15 |
// Include Helper class
|
16 |
include_once( SPU_PLUGIN_DIR . 'includes/class-spu-helper.php' );
|
56 |
* @var bool
|
57 |
*/
|
58 |
protected $premium = false;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Helper function
|
62 |
+
*
|
63 |
+
* @since 1.1
|
64 |
+
*
|
65 |
+
* @var bool
|
66 |
+
*/
|
67 |
+
protected $helper = '';
|
68 |
|
69 |
/**
|
70 |
* Initialize the plugin by loading admin scripts & styles and adding a
|
78 |
$plugin = SocialPopup::get_instance();
|
79 |
$this->plugin_slug = $plugin->get_plugin_slug();
|
80 |
|
81 |
+
// helper funcs
|
82 |
+
$this->helper = new Spu_Helper;
|
83 |
+
|
84 |
//settings name
|
85 |
$this->options_name = $this->plugin_slug .'_settings';
|
86 |
|
113 |
add_filter('spu/get_taxonomies', array($this, 'get_taxonomies'), 1, 3);
|
114 |
|
115 |
//AJAX Actions
|
116 |
+
add_action('wp_ajax_spu/field_group/render_rules', array( $this->helper, 'ajax_render_rules' ) );
|
117 |
|
118 |
//Tinymce
|
119 |
add_filter( 'tiny_mce_before_init', array($this, 'tinymce_init') );
|
172 |
'rewrite' => array( 'slug' => 'spucpt' ),
|
173 |
'capability_type' => 'post',
|
174 |
'capabilities' => array(
|
175 |
+
'publish_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
176 |
+
'edit_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
177 |
+
'edit_others_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
178 |
+
'delete_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
179 |
+
'delete_others_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
180 |
+
'read_private_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
181 |
+
'edit_post' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
182 |
+
'delete_post' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
183 |
+
'read_post' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
|
184 |
),
|
185 |
'has_archive' => false,
|
186 |
'hierarchical' => false,
|
200 |
*/
|
201 |
public function add_settings_menu() {
|
202 |
|
203 |
+
add_submenu_page('edit.php?post_type=spucpt', 'Settings', 'Settings', apply_filters( 'spu/settings_page/roles', 'manage_options'), 'spu_settings', array( $this, 'settings_page' ) );
|
204 |
|
205 |
}
|
206 |
|
320 |
*/
|
321 |
public function popup_rules( $post, $metabox ) {
|
322 |
|
323 |
+
$groups = apply_filters('spu/metaboxes/get_box_rules', $this->helper->get_box_rules( $post->ID ), $post->ID);
|
324 |
|
325 |
include 'views/metabox-rules.php';
|
326 |
}
|
332 |
*/
|
333 |
public function popup_options( $post, $metabox ) {
|
334 |
|
335 |
+
$opts = apply_filters('spu/metaboxes/get_box_options', $this->helper->get_box_options( $post->ID ), $post->ID );
|
336 |
|
337 |
include 'views/metabox-options.php';
|
338 |
}
|
admin/views/metabox-options.php
CHANGED
@@ -47,8 +47,8 @@ if ( !defined( 'ABSPATH' ) ) exit;?>
|
|
47 |
<th><label><?php _e( 'Animation', $this->plugin_slug ); ?></label></th>
|
48 |
<td colspan="3">
|
49 |
<select id="spu_animation" name="spu[animation]" class="widefat">
|
50 |
-
<option value="fade" <?php
|
51 |
-
<option value="slide" <?php
|
52 |
<?php do_action( 'spu/metaboxes/animations', $opts );?>
|
53 |
</select>
|
54 |
<p class="help"><?php _e( 'Slide will only apply when popup is on the corners', $this->plugin_slug ); ?></p>
|
47 |
<th><label><?php _e( 'Animation', $this->plugin_slug ); ?></label></th>
|
48 |
<td colspan="3">
|
49 |
<select id="spu_animation" name="spu[animation]" class="widefat">
|
50 |
+
<option value="fade" <?php selected($opts['animation'], 'fade'); ?> > <?php _e( 'Fade In', $this->plugin_slug ); ?></option>
|
51 |
+
<option value="slide" <?php selected($opts['animation'], 'slide'); ?> > <?php _e( 'Slide In', $this->plugin_slug ); ?></option>
|
52 |
<?php do_action( 'spu/metaboxes/animations', $opts );?>
|
53 |
</select>
|
54 |
<p class="help"><?php _e( 'Slide will only apply when popup is on the corners', $this->plugin_slug ); ?></p>
|
admin/views/metabox-premium.php
CHANGED
@@ -5,6 +5,9 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
5 |
<p><?php _e( 'Take the best WordPress Popups plugin to the next level with Popups Premium extension.', $this->plugin_slug );?></p>
|
6 |
<h2><?php _e( 'Popups Premium Features:', $this->plugin_slug );?></h2>
|
7 |
<ul>
|
|
|
|
|
|
|
8 |
<li><?php _e( '8 New animations effects', $this->plugin_slug );?> - <a href="http://wp.timersys.com/popups/?utm_source=Plugin&utm_medium=demo-button&utm_campaign=Popups%20Premium">Online demo</a></li>
|
9 |
<li><?php _e( 'Exit Intent technology', $this->plugin_slug );?></li>
|
10 |
<li><?php _e( 'New trigger methods', $this->plugin_slug );?></li>
|
@@ -13,7 +16,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
13 |
<li><?php _e( 'Ability to disable Advanced close methods like esc or clicking outside of the popup', $this->plugin_slug );?></li>
|
14 |
<li><?php _e( 'Premium support', $this->plugin_slug );?></li>
|
15 |
</ul>
|
16 |
-
<p><strong>Hurry up and get your copy!</strong> Take advantage of this <span style="color:red">launch offer</span> before the price goes up. We have a <strong>lot of new features</strong> to be added soon like mailchimp integration,
|
17 |
<p style="text-align:center">
|
18 |
<a class="button-primary" href="http://wp.timersys.com/downloads/popups-premium/?utm_source=Plugin&utm_medium=buy-button&utm_campaign=Popups%20Premium"><?php _e( 'Buy Now!', $this->plugin_slug );?></a>
|
19 |
</p>
|
5 |
<p><?php _e( 'Take the best WordPress Popups plugin to the next level with Popups Premium extension.', $this->plugin_slug );?></p>
|
6 |
<h2><?php _e( 'Popups Premium Features:', $this->plugin_slug );?></h2>
|
7 |
<ul>
|
8 |
+
<li><?php _e( 'Track impressions and Conversions of social likes/follow and forms submissions like Contact Form 7, Gravity forms, etc', $this->plugin_slug );?></li>
|
9 |
+
<li><?php _e( 'Track impressions and Conversions also in Google Analytics', $this->plugin_slug );?></li>
|
10 |
+
<li><?php _e( 'Exit Intent technology', $this->plugin_slug );?></li>
|
11 |
<li><?php _e( '8 New animations effects', $this->plugin_slug );?> - <a href="http://wp.timersys.com/popups/?utm_source=Plugin&utm_medium=demo-button&utm_campaign=Popups%20Premium">Online demo</a></li>
|
12 |
<li><?php _e( 'Exit Intent technology', $this->plugin_slug );?></li>
|
13 |
<li><?php _e( 'New trigger methods', $this->plugin_slug );?></li>
|
16 |
<li><?php _e( 'Ability to disable Advanced close methods like esc or clicking outside of the popup', $this->plugin_slug );?></li>
|
17 |
<li><?php _e( 'Premium support', $this->plugin_slug );?></li>
|
18 |
</ul>
|
19 |
+
<p><strong>Hurry up and get your copy!</strong> Take advantage of this <span style="color:red">launch offer</span> before the price goes up. We have a <strong>lot of new features</strong> to be added soon like mailchimp integration, aweber, etc</p>
|
20 |
<p style="text-align:center">
|
21 |
<a class="button-primary" href="http://wp.timersys.com/downloads/popups-premium/?utm_source=Plugin&utm_medium=buy-button&utm_campaign=Popups%20Premium"><?php _e( 'Buy Now!', $this->plugin_slug );?></a>
|
22 |
</p>
|
admin/views/settings-page.php
CHANGED
@@ -16,6 +16,14 @@
|
|
16 |
<p class="help"><?php _e( 'Will use uncompressed js', $this->plugin_slug ); ?></p>
|
17 |
</td>
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</tr>
|
20 |
<tr valign="top" class="">
|
21 |
<th><label for="style"><?php _e( 'Remove shortcodes style', $this->plugin_slug ); ?></label></th>
|
16 |
<p class="help"><?php _e( 'Will use uncompressed js', $this->plugin_slug ); ?></p>
|
17 |
</td>
|
18 |
|
19 |
+
</tr>
|
20 |
+
<tr valign="top" class="">
|
21 |
+
<th><label for="safe"><?php _e( 'Enable safe mode?', $this->plugin_slug ); ?></label></th>
|
22 |
+
<td colspan="3">
|
23 |
+
<label><input type="checkbox" id="safe" name="spu_settings[safe]" value="1" <?php checked($opts['safe'], 1); ?> />
|
24 |
+
<p class="help"><?php _e( 'Will move all popups to top of the screen.', $this->plugin_slug ); ?></p>
|
25 |
+
</td>
|
26 |
+
|
27 |
</tr>
|
28 |
<tr valign="top" class="">
|
29 |
<th><label for="style"><?php _e( 'Remove shortcodes style', $this->plugin_slug ); ?></label></th>
|
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.
|
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.2.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
|
public/assets/js/min/public-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function spuCreateCookie(t,i,
|
1 |
+
function spuCreateCookie(t,i,e){if(e){var n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3);var o="; expires="+n.toGMTString()}else var o="";document.cookie=t+"="+i+o+"; path=/"}function spuReadCookie(t){for(var i=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return null}function googleCB(t){if("on"==t.state){var i=jQuery(".spu-gogl").data("box-id");i&&SPU.hide(i)}}function closeGoogle(t){if("confirm"==t.type){var i=jQuery(".spu-gogl").data("box-id");i&&SPU.hide(i)}}jQuery(window).load(function(){window.SPU=function($){function t(t){var i=a[t],e=$(window).width(),n=$(window).height(),o=i.height(),r=i.width();i.css({position:"fixed",top:n/2-o/2,left:e/2-r/2})}function i(t){var i=$(t).find(".spu-facebook");if(i.length){var e=i.find(".fb-like > span").width();if(0==e){var n=i.find(".fb-like").data("layout");i.append("box_count"==n?'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 63px !important;width: 80px !important;}</style>":'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 20px !important;width: 80px !important;}</style>")}}}function e(i,e){var n=a[i],o=$("#spu-bg-"+i),r=n.data("bgopa");if(n.is(":animated"))return!1;if(e===!0&&n.is(":visible")||e===!1&&n.is(":hidden"))return!1;if(e===!1){var s=parseInt(n.data("cookie"));s>0&&spuCreateCookie("spu_box_"+i,!0,s)}else n.hasClass("spu-centered")&&t(i);var d=n.data("spuanimation");return"fade"===d?n.fadeToggle("slow"):n.slideToggle("slow"),e===!0&&r>0?o.fadeIn():o.fadeOut(),e}var n=$(window).height(),o=spuvar.is_admin,a=[];return $(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),$(".spu-box").each(function(){spuvar.safe_mode&&$(this).prependTo("body");var t=$(this),r=t.data("trigger"),s=0,d=1===parseInt(t.data("test-mode")),u=t.data("box-id"),f=1===parseInt(t.data("auto-hide")),c=parseInt(t.data("seconds-close")),p=parseInt(t.data("trigger-number"),10),l="percentage"==r?parseInt(t.data("trigger-number"),10)/100:.8,h=l*$(document).height();i(t),$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter").width()-12);var g=0,w=0,m=$(this).find(".spu-content").width(),b=t.data("total");b&&!spuvar.disable_style&&($(this).find(".spu-shortcode").each(function(){g+=$(this).width()}),w=m-g),w>0&&($(this).find(".spu-shortcode").each(function(){3==b?$(this).css("margin-left",w/(b-1)):$(this).css("margin-left",w/2)}),2==b?$(this).find(".spu-shortcode").last().css("margin-left",0):3==b&&$(this).find(".spu-shortcode").first().css("margin-left",0)),$(document).keyup(function(t){27==t.keyCode&&e(u,!1)});var v=navigator.userAgent,y=v.match(/iPad/i)||v.match(/iPhone/i)?"touchstart":"click";$("body").on(y,function(t){console.log(y.target),e(u,!1)}),$("body").on(y,".spu-box",function(t){t.stopPropagation()}),t.hide().css("left",""),a[u]=t;var x=function(){s&&clearTimeout(s),s=window.setTimeout(function(){var t=$(window).scrollTop(),i=t+n>=h;i?(f||$(window).unbind("scroll",x),e(u,!0)):e(u,!1)},100)},k=function(){s&&clearTimeout(s),s=window.setTimeout(function(){e(u,!0)},1e3*p)},_=spuReadCookie("spu_box_"+u);if((void 0==_||o&&d)&&("seconds"==r?k():($(window).bind("scroll",x),x()),window.location.hash&&window.location.hash.length>0)){var T=window.location.hash,C;T.substring(1)===t.attr("id")&&setTimeout(function(){e(u,!0)},100)}t.find(".spu-close").click(function(){e(u,!1),"percentage"==r&&$(window).unbind("scroll",x)}),$('a[href="#'+t.attr("id")+'"]').click(function(){return e(u,!0),!1}),t.find('form:not(".wpcf7-form, .gravity-form")').submit(function(t){t.preventDefault();var i=!0;return e(u,!1),i}),$("body").on("mailsent.wpcf7",function(){e(u,!1)}),$(document).on("gform_confirmation_loaded",function(){e(u,!1)})}),{show:function(t){return e(t,!0)},hide:function(t){return e(t,!1)}}}(window.jQuery)}),jQuery(function($){function t(){FB.Event.subscribe("edge.create",function(t,i){var e=$(i).parents(".spu-box").data("box-id");e&&(SPU.hide(e),SPU.track(e,!0))}),e=!0,clearInterval(n)}function i(t){var i=$(t.target).parents(".spu-box").data("box-id");i&&SPU.hide(i)}var e=!1,n=setInterval(function(){"undefined"==typeof FB||e||t()},1e3);"undefined"!=typeof twttr&&twttr.ready(function(t){t.events.bind("tweet",i),t.events.bind("follow",i)})});
|
public/assets/js/public.js
CHANGED
@@ -18,6 +18,12 @@ jQuery(window).load(function() {
|
|
18 |
// loop through boxes
|
19 |
$(".spu-box").each(function() {
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
// vars
|
23 |
var $box = $(this);
|
@@ -31,6 +37,7 @@ jQuery(window).load(function() {
|
|
31 |
var triggerPercentage = ( triggerMethod == 'percentage' ) ? ( parseInt( $box.data('trigger-number'), 10 ) / 100 ) : 0.8;
|
32 |
var triggerHeight = ( triggerPercentage * $(document).height() );
|
33 |
|
|
|
34 |
//correct widths of sharing icons
|
35 |
$('.spu-google').width($('.spu-google').width()-20);
|
36 |
$('.spu-twitter').width($('.spu-twitter').width()-12);
|
@@ -92,7 +99,7 @@ jQuery(window).load(function() {
|
|
92 |
toggleBox( id, false );
|
93 |
});
|
94 |
//not on the box
|
95 |
-
$('
|
96 |
event.stopPropagation();
|
97 |
});
|
98 |
|
@@ -187,8 +194,29 @@ jQuery(window).load(function() {
|
|
187 |
toggleBox(id, true);
|
188 |
return false;
|
189 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
});
|
|
|
192 |
//function that center popup on screen
|
193 |
function centerBox( id ) {
|
194 |
var $box = $boxes[id];
|
@@ -203,6 +231,29 @@ jQuery(window).load(function() {
|
|
203 |
});
|
204 |
}
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
//function that show/hide box
|
207 |
function toggleBox( id, show ) {
|
208 |
var $box = $boxes[id];
|
@@ -226,29 +277,32 @@ jQuery(window).load(function() {
|
|
226 |
if( days > 0 ) {
|
227 |
spuCreateCookie( 'spu_box_' + id, true, days );
|
228 |
}
|
229 |
-
}
|
230 |
-
|
231 |
-
//if is a centered popup, center it
|
232 |
-
if( $box.hasClass('spu-centered') ) {
|
233 |
|
234 |
-
|
235 |
-
|
236 |
-
}
|
237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
// show box
|
239 |
-
var animation = $box.data('
|
240 |
|
241 |
if( animation === 'fade' ) {
|
242 |
$box.fadeToggle( 'slow' );
|
243 |
} else {
|
244 |
$box.slideToggle( 'slow' );
|
245 |
}
|
|
|
|
|
246 |
if( show === true && $bgopa > 0 ){
|
247 |
$bg.fadeIn();
|
248 |
} else {
|
249 |
$bg.fadeOut();
|
250 |
}
|
251 |
-
|
252 |
return show;
|
253 |
}
|
254 |
|
@@ -286,3 +340,67 @@ function spuReadCookie(name) {
|
|
286 |
}
|
287 |
return null;
|
288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
// loop through boxes
|
19 |
$(".spu-box").each(function() {
|
20 |
|
21 |
+
// move to parent in safe mode
|
22 |
+
if( spuvar.safe_mode ){
|
23 |
+
|
24 |
+
$(this).prependTo('body');
|
25 |
+
|
26 |
+
}
|
27 |
|
28 |
// vars
|
29 |
var $box = $(this);
|
37 |
var triggerPercentage = ( triggerMethod == 'percentage' ) ? ( parseInt( $box.data('trigger-number'), 10 ) / 100 ) : 0.8;
|
38 |
var triggerHeight = ( triggerPercentage * $(document).height() );
|
39 |
|
40 |
+
facebookFix( $box );
|
41 |
//correct widths of sharing icons
|
42 |
$('.spu-google').width($('.spu-google').width()-20);
|
43 |
$('.spu-twitter').width($('.spu-twitter').width()-12);
|
99 |
toggleBox( id, false );
|
100 |
});
|
101 |
//not on the box
|
102 |
+
$('body' ).on(event,'.spu-box', function(event) {
|
103 |
event.stopPropagation();
|
104 |
});
|
105 |
|
194 |
toggleBox(id, true);
|
195 |
return false;
|
196 |
});
|
197 |
+
// Add generic form tracking
|
198 |
+
$box.find('form:not(".wpcf7-form, .gravity-form")').submit( function(e){
|
199 |
+
e.preventDefault();
|
200 |
+
var submit = true;
|
201 |
+
toggleBox(id, false );
|
202 |
+
|
203 |
+
return submit;
|
204 |
+
});
|
205 |
+
|
206 |
+
// CF7 support
|
207 |
+
$('body').on('mailsent.wpcf7', function(){
|
208 |
+
|
209 |
+
toggleBox(id, false );
|
210 |
+
});
|
211 |
+
|
212 |
+
// Gravity forms support (only AJAX mode)
|
213 |
+
$(document).on('gform_confirmation_loaded', function(){
|
214 |
+
|
215 |
+
toggleBox(id, false );
|
216 |
+
});
|
217 |
|
218 |
});
|
219 |
+
|
220 |
//function that center popup on screen
|
221 |
function centerBox( id ) {
|
222 |
var $box = $boxes[id];
|
231 |
});
|
232 |
}
|
233 |
|
234 |
+
//facebookBugFix
|
235 |
+
function facebookFix( box ) {
|
236 |
+
|
237 |
+
// Facebook bug that fails to resize
|
238 |
+
var $fbbox = $(box).find('.spu-facebook');
|
239 |
+
if( $fbbox.length ){
|
240 |
+
//if exist and width is 0
|
241 |
+
var $fbwidth = $fbbox.find('.fb-like > span').width();
|
242 |
+
if ( $fbwidth == 0 ) {
|
243 |
+
var $fblayout = $fbbox.find('.fb-like').data('layout');
|
244 |
+
if( $fblayout == 'box_count' ) {
|
245 |
+
|
246 |
+
$fbbox.append('<style type="text/css"> #'+$(box).attr('id')+' .fb-like iframe, #'+$(box).attr('id')+' .fb_iframe_widget span, #'+$(box).attr('id')+' .fb_iframe_widget{ height: 63px !important;width: 80px !important;}</style>');
|
247 |
+
|
248 |
+
} else {
|
249 |
+
|
250 |
+
$fbbox.append('<style type="text/css"> #'+$(box).attr('id')+' .fb-like iframe, #'+$(box).attr('id')+' .fb_iframe_widget span, #'+$(box).attr('id')+' .fb_iframe_widget{ height: 20px !important;width: 80px !important;}</style>');
|
251 |
+
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
//function that show/hide box
|
258 |
function toggleBox( id, show ) {
|
259 |
var $box = $boxes[id];
|
277 |
if( days > 0 ) {
|
278 |
spuCreateCookie( 'spu_box_' + id, true, days );
|
279 |
}
|
280 |
+
} else {
|
|
|
|
|
|
|
281 |
|
282 |
+
//if is a centered popup, center it
|
283 |
+
if( $box.hasClass('spu-centered') ) {
|
|
|
284 |
|
285 |
+
centerBox( id );
|
286 |
+
|
287 |
+
}
|
288 |
+
|
289 |
+
}
|
290 |
+
|
291 |
// show box
|
292 |
+
var animation = $box.data('spuanimation');
|
293 |
|
294 |
if( animation === 'fade' ) {
|
295 |
$box.fadeToggle( 'slow' );
|
296 |
} else {
|
297 |
$box.slideToggle( 'slow' );
|
298 |
}
|
299 |
+
|
300 |
+
//background
|
301 |
if( show === true && $bgopa > 0 ){
|
302 |
$bg.fadeIn();
|
303 |
} else {
|
304 |
$bg.fadeOut();
|
305 |
}
|
|
|
306 |
return show;
|
307 |
}
|
308 |
|
340 |
}
|
341 |
return null;
|
342 |
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Social Callbacks
|
346 |
+
*/
|
347 |
+
|
348 |
+
jQuery(function($) {
|
349 |
+
var SPUfb = false;
|
350 |
+
|
351 |
+
var FbTimer = setInterval(function(){
|
352 |
+
if( typeof FB !== 'undefined' && ! SPUfb) {
|
353 |
+
subscribeFbEvent();
|
354 |
+
|
355 |
+
}
|
356 |
+
},1000);
|
357 |
+
|
358 |
+
if ( typeof twttr !== 'undefined') {
|
359 |
+
twttr.ready(function(twttr) {
|
360 |
+
twttr.events.bind('tweet', twitterCB);
|
361 |
+
twttr.events.bind('follow', twitterCB);
|
362 |
+
});
|
363 |
+
}
|
364 |
+
|
365 |
+
|
366 |
+
function subscribeFbEvent(){
|
367 |
+
FB.Event.subscribe('edge.create', function(href, html_element) {
|
368 |
+
var box_id = $(html_element).parents('.spu-box').data('box-id');
|
369 |
+
if( box_id) {
|
370 |
+
SPU.hide(box_id);
|
371 |
+
//Track the conversion.
|
372 |
+
SPU.track( box_id, true);
|
373 |
+
}
|
374 |
+
});
|
375 |
+
SPUfb = true;
|
376 |
+
clearInterval(FbTimer);
|
377 |
+
}
|
378 |
+
function twitterCB(intent_event) {
|
379 |
+
|
380 |
+
var box_id = $(intent_event.target).parents('.spu-box').data('box-id');
|
381 |
+
|
382 |
+
if( box_id) {
|
383 |
+
SPU.hide(box_id);
|
384 |
+
}
|
385 |
+
}
|
386 |
+
});
|
387 |
+
function googleCB(a) {
|
388 |
+
|
389 |
+
if( "on" == a.state ) {
|
390 |
+
|
391 |
+
var box_id = jQuery('.spu-gogl').data('box-id');
|
392 |
+
if( box_id) {
|
393 |
+
SPU.hide(box_id);
|
394 |
+
}
|
395 |
+
}
|
396 |
+
}
|
397 |
+
function closeGoogle(a){
|
398 |
+
if( "confirm" == a.type )
|
399 |
+
{
|
400 |
+
var box_id = jQuery('.spu-gogl').data('box-id');
|
401 |
+
if( box_id) {
|
402 |
+
SPU.hide(box_id);
|
403 |
+
|
404 |
+
}
|
405 |
+
}
|
406 |
+
}
|
public/class-social-popup.php
CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
|
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
-
const VERSION = '1.
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
@@ -340,12 +340,12 @@ class SocialPopup {
|
|
340 |
wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
|
341 |
|
342 |
}
|
343 |
-
if( ! defined( 'SPU_UNLOAD_TW_JS') && empty( $opts['
|
344 |
|
345 |
wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
|
346 |
|
347 |
}
|
348 |
-
if( ! defined( 'SPU_UNLOAD_GO_JS') && empty( $opts['
|
349 |
|
350 |
wp_register_script( 'spu-google', 'https://apis.google.com/js/plusone.js', array('jquery'), self::VERSION, FALSE);
|
351 |
|
@@ -380,21 +380,22 @@ class SocialPopup {
|
|
380 |
$matches = true;
|
381 |
$spu_matches[] = $spu->ID;
|
382 |
|
383 |
-
$total_shortcodes[$spu->ID]
|
|
|
384 |
|
385 |
//if we have matches we check for shortcodes to add scripts later
|
386 |
if( has_shortcode( $spu->post_content, 'spu-facebook' ) ){
|
387 |
$facebook = true;
|
388 |
-
$total_shortcodes[$spu->ID]++;
|
389 |
}
|
390 |
if( has_shortcode( $spu->post_content, 'spu-twitter' ) ){
|
391 |
$twitter = true;
|
392 |
-
$total_shortcodes[$spu->ID]++;
|
393 |
}
|
394 |
if( has_shortcode( $spu->post_content, 'spu-google' ) ){
|
395 |
$google = true;
|
396 |
-
$total_shortcodes[$spu->ID]++;
|
397 |
-
$total_shortcodes['google'] = true;
|
398 |
}
|
399 |
}
|
400 |
}
|
@@ -404,7 +405,13 @@ class SocialPopup {
|
|
404 |
|
405 |
wp_enqueue_script('spu-public');
|
406 |
wp_enqueue_style('spu-public-css');
|
407 |
-
wp_localize_script( 'spu-public', 'spuvar',
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
|
409 |
if( $facebook ){
|
410 |
wp_enqueue_script( 'spu-facebook' );
|
23 |
*
|
24 |
* @var string
|
25 |
*/
|
26 |
+
const VERSION = '1.2.1';
|
27 |
|
28 |
/**
|
29 |
* Popups to use acrros files
|
340 |
wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
|
341 |
|
342 |
}
|
343 |
+
if( ! defined( 'SPU_UNLOAD_TW_JS') && empty( $opts['twitter'] ) ) {
|
344 |
|
345 |
wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
|
346 |
|
347 |
}
|
348 |
+
if( ! defined( 'SPU_UNLOAD_GO_JS') && empty( $opts['google'] ) ) {
|
349 |
|
350 |
wp_register_script( 'spu-google', 'https://apis.google.com/js/plusone.js', array('jquery'), self::VERSION, FALSE);
|
351 |
|
380 |
$matches = true;
|
381 |
$spu_matches[] = $spu->ID;
|
382 |
|
383 |
+
$total_shortcodes[$spu->ID] = array();
|
384 |
+
$total_shortcodes[$spu->ID][0] = 0;
|
385 |
|
386 |
//if we have matches we check for shortcodes to add scripts later
|
387 |
if( has_shortcode( $spu->post_content, 'spu-facebook' ) ){
|
388 |
$facebook = true;
|
389 |
+
$total_shortcodes[$spu->ID][0]++;
|
390 |
}
|
391 |
if( has_shortcode( $spu->post_content, 'spu-twitter' ) ){
|
392 |
$twitter = true;
|
393 |
+
$total_shortcodes[$spu->ID][0]++;
|
394 |
}
|
395 |
if( has_shortcode( $spu->post_content, 'spu-google' ) ){
|
396 |
$google = true;
|
397 |
+
$total_shortcodes[$spu->ID][0]++;
|
398 |
+
$total_shortcodes[$spu->ID]['google'] = true;
|
399 |
}
|
400 |
}
|
401 |
}
|
405 |
|
406 |
wp_enqueue_script('spu-public');
|
407 |
wp_enqueue_style('spu-public-css');
|
408 |
+
wp_localize_script( 'spu-public', 'spuvar',
|
409 |
+
array(
|
410 |
+
'is_admin' => current_user_can( 'administrator' ),
|
411 |
+
'disable_style' => @$this->spu_settings['shortcodes_style'],
|
412 |
+
'safe_mode' => @$this->spu_settings['safe']
|
413 |
+
)
|
414 |
+
);
|
415 |
|
416 |
if( $facebook ){
|
417 |
wp_enqueue_script( 'spu-facebook' );
|
public/includes/Mobile_Detect.php
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
* README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
|
21 |
* HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
|
22 |
*
|
23 |
-
* @version 2.8.
|
24 |
*/
|
25 |
|
26 |
class Mobile_Detect
|
@@ -64,7 +64,7 @@ class Mobile_Detect
|
|
64 |
/**
|
65 |
* Stores the version number of the current release.
|
66 |
*/
|
67 |
-
const VERSION = '2.8.
|
68 |
|
69 |
/**
|
70 |
* A type for the version() method indicating a string return value.
|
@@ -139,16 +139,16 @@ class Mobile_Detect
|
|
139 |
* @var array
|
140 |
*/
|
141 |
protected static $phoneDevices = array(
|
142 |
-
'iPhone' => '\biPhone
|
143 |
'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
|
144 |
'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
|
145 |
'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile',
|
146 |
// @todo: Is 'Dell Streak' a tablet or a phone? ;)
|
147 |
'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
|
148 |
'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925',
|
149 |
-
'Samsung' => 'Samsung|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E',
|
150 |
'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802)',
|
151 |
-
'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i',
|
152 |
'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
|
153 |
// @ref: http://www.micromaxinfo.com/mobiles/smartphones
|
154 |
// Added because the codes might conflict with Acer Tablets.
|
@@ -164,8 +164,16 @@ class Mobile_Detect
|
|
164 |
// Added simvalley mobile just for fun. They have some interesting devices.
|
165 |
// @ref: http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
|
166 |
'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
// @Tapatalk is a mobile app; @ref: http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
|
168 |
-
'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser'
|
169 |
);
|
170 |
|
171 |
/**
|
@@ -176,25 +184,26 @@ class Mobile_Detect
|
|
176 |
protected static $tabletDevices = array(
|
177 |
'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic.
|
178 |
'NexusTablet' => 'Android.*Nexus[\s]+(7|10)|^.*Android.*Nexus(?:(?!Mobile).)*$',
|
179 |
-
'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705C|SM-T535|SM-T331', // SCH-P709|SCH-P729|SM-T2558 - Samsung Mega - treat them like a regular phone.
|
180 |
// @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
|
181 |
'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE)\b',
|
182 |
// Only the Surface tablets with Windows RT are considered mobile.
|
183 |
// @ref: http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
|
184 |
-
'SurfaceTablet' => 'Windows NT [0-9.]+; ARM
|
185 |
// @ref: http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
|
186 |
-
'HPTablet' => 'HP Slate 7|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8',
|
187 |
// @note: watch out for PadFone, see #132
|
188 |
-
|
|
|
189 |
'BlackBerryTablet' => 'PlayBook|RIM Tablet',
|
190 |
-
'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200',
|
191 |
'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
|
192 |
'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
|
193 |
// @ref: http://www.acer.ro/ac/ro/RO/content/drivers
|
194 |
// @ref: http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
|
195 |
// @ref: http://us.acer.com/ac/en/US/content/group/tablets
|
196 |
// @note: Can conflict with Micromax and Motorola phones codes.
|
197 |
-
'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-830)\b|W3-810|\bA3-A10\b',
|
198 |
// @ref: http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
|
199 |
// @ref: http://us.toshiba.com/tablets/tablet-finder
|
200 |
// @ref: http://www.toshiba.co.jp/regza/tablet/
|
@@ -206,14 +215,14 @@ class Mobile_Detect
|
|
206 |
// Prestigio Tablets http://www.prestigio.com/support
|
207 |
'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD',
|
208 |
// @ref: http://support.lenovo.com/en_GB/downloads/default.page?#
|
209 |
-
'LenovoTablet' => '
|
210 |
// @ref: http://www.yarvik.com/en/matrix/tablets/
|
211 |
'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
|
212 |
'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
|
213 |
'ArnovaTablet' => 'AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT',
|
214 |
// http://www.intenso.de/kategorie_en.php?kategorie=33
|
215 |
// @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
|
216 |
-
'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab',
|
217 |
// IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
|
218 |
'IRUTablet' => 'M702pro',
|
219 |
'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
|
@@ -222,19 +231,24 @@ class Mobile_Detect
|
|
222 |
// @ref: http://www.allview.ro/produse/droseries/lista-tablete-pc/
|
223 |
'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
|
224 |
// @reference: http://wiki.archosfans.com/index.php?title=Main_Page
|
225 |
-
'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|
|
226 |
// @ref: http://www.ainol.com/plugin.php?identifier=ainol&module=product
|
227 |
'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
|
228 |
// @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
|
229 |
// @ref: Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
|
230 |
// @ref: http://www.sony.jp/support/tablet/
|
231 |
'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551',
|
|
|
|
|
232 |
// @ref: db + http://www.cube-tablet.com/buy-products.html
|
233 |
'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
|
234 |
// @ref: http://www.cobyusa.com/?p=pcat&pcat_id=3001
|
235 |
'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
|
236 |
// @ref: http://www.match.net.cn/products.asp
|
237 |
'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733',
|
|
|
|
|
|
|
238 |
// @ref: http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
|
239 |
// @ref: http://www.imp3.net/14/show.php?itemid=20454
|
240 |
'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
|
@@ -269,7 +283,7 @@ class Mobile_Detect
|
|
269 |
// @note: Avoid detecting 'PLAYSTATION 3' as mobile.
|
270 |
'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
|
271 |
// @ref: http://www.trekstor.de/surftabs.html
|
272 |
-
'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A',
|
273 |
// @ref: http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
|
274 |
'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
|
275 |
// @ref: http://www.advandigital.com/index.php?link=content-product&jns=JP001
|
@@ -327,7 +341,7 @@ class Mobile_Detect
|
|
327 |
// @note: no need to add all the tablet codes since they are guided by the first regex.
|
328 |
'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
|
329 |
// Generic Vodafone tablets.
|
330 |
-
'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10',
|
331 |
// French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
|
332 |
// Aka: http://www.essentielb.fr/
|
333 |
'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
|
@@ -359,16 +373,29 @@ class Mobile_Detect
|
|
359 |
// http://www1.viewsonic.com/products/computing/tablets/
|
360 |
'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
|
361 |
// http://www.odys.de/web/internet-tablet_en.html
|
362 |
-
'OdysTablet' => 'LOOX|XENO10|ODYS Space',
|
363 |
// http://www.captiva-power.de/products.html#tablets-en
|
364 |
'CaptivaTablet' => 'CAPTIVA PAD',
|
365 |
// IconBIT - http://www.iconbit.com/products/tablets/
|
366 |
'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
// @ref: http://www.tesco.com/direct/hudl/
|
368 |
'Hudl' => 'Hudl HT7S3',
|
369 |
// @ref: http://www.telstra.com.au/home-phone/thub-2/
|
370 |
'TelstraTablet' => 'T-Hub2',
|
371 |
-
'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4'
|
372 |
);
|
373 |
|
374 |
/**
|
@@ -386,7 +413,8 @@ class Mobile_Detect
|
|
386 |
// @reference: http://en.wikipedia.org/wiki/Windows_Phone
|
387 |
// http://wifeng.cn/?r=blog&a=view&id=106
|
388 |
// http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
|
389 |
-
|
|
|
390 |
'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
|
391 |
// http://en.wikipedia.org/wiki/MeeGo
|
392 |
// @todo: research MeeGo in UAs
|
@@ -417,20 +445,26 @@ class Mobile_Detect
|
|
417 |
'TeaShark' => 'teashark',
|
418 |
'Blazer' => 'Blazer',
|
419 |
// @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
|
420 |
-
'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile',
|
421 |
// @ref: http://en.wikipedia.org/wiki/Midori_(web_browser)
|
422 |
//'Midori' => 'midori',
|
423 |
'Tizen' => 'Tizen',
|
424 |
'UCBrowser' => 'UC.*Browser|UCWEB',
|
|
|
|
|
425 |
// @ref: https://github.com/serbanghita/Mobile-Detect/issues/7
|
426 |
'DiigoBrowser' => 'DiigoBrowser',
|
427 |
// http://www.puffinbrowser.com/index.php
|
428 |
'Puffin' => 'Puffin',
|
429 |
// @ref: http://mercury-browser.com/index.html
|
430 |
'Mercury' => '\bMercury\b',
|
|
|
|
|
|
|
|
|
431 |
// @reference: http://en.wikipedia.org/wiki/Minimo
|
432 |
// http://en.wikipedia.org/wiki/Vision_Mobile_Browser
|
433 |
-
'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger'
|
434 |
);
|
435 |
|
436 |
/**
|
@@ -511,6 +545,8 @@ class Mobile_Detect
|
|
511 |
'UC Browser' => 'UC Browser[VER]',
|
512 |
'MQQBrowser' => 'MQQBrowser/[VER]',
|
513 |
'MicroMessenger' => 'MicroMessenger/[VER]',
|
|
|
|
|
514 |
// @note: Safari 7534.48.3 is actually Version 5.1.
|
515 |
// @note: On BlackBerry the Version is overwriten by the OS.
|
516 |
'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ),
|
@@ -543,15 +579,15 @@ class Mobile_Detect
|
|
543 |
/**
|
544 |
* Construct an instance of this class.
|
545 |
*
|
546 |
-
* @param array
|
547 |
-
*
|
548 |
* @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
|
549 |
* from the $headers array instead.
|
550 |
*/
|
551 |
public function __construct(
|
552 |
array $headers = null,
|
553 |
$userAgent = null
|
554 |
-
){
|
555 |
$this->setHttpHeaders($headers);
|
556 |
$this->setUserAgent($userAgent);
|
557 |
}
|
@@ -666,8 +702,8 @@ class Mobile_Detect
|
|
666 |
|
667 |
$this->userAgent = null;
|
668 |
|
669 |
-
foreach($this->getUaHttpHeaders() as $altHeader){
|
670 |
-
if(!empty($this->httpHeaders[$altHeader])){ // @todo: should use getHttpHeader(), but it would be slow. (Serban)
|
671 |
$this->userAgent .= $this->httpHeaders[$altHeader] . " ";
|
672 |
}
|
673 |
}
|
@@ -847,14 +883,15 @@ class Mobile_Detect
|
|
847 |
public function checkHttpHeadersForMobile()
|
848 |
{
|
849 |
|
850 |
-
foreach($this->getMobileHeaders() as $mobileHeader => $matchType){
|
851 |
-
if( isset($this->httpHeaders[$mobileHeader]) ){
|
852 |
-
if( is_array($matchType['matches']) ){
|
853 |
-
foreach($matchType['matches'] as $_match){
|
854 |
-
if( strpos($this->httpHeaders[$mobileHeader], $_match) !== false ){
|
855 |
return true;
|
856 |
}
|
857 |
}
|
|
|
858 |
return false;
|
859 |
} else {
|
860 |
return true;
|
@@ -1072,11 +1109,11 @@ class Mobile_Detect
|
|
1072 |
* Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
|
1073 |
*
|
1074 |
* @param string $propertyName The name of the property. See self::getProperties() array
|
1075 |
-
*
|
1076 |
-
* @param string $type
|
1077 |
-
*
|
1078 |
-
*
|
1079 |
-
*
|
1080 |
*
|
1081 |
* @return string|float The version of the property we are trying to extract.
|
1082 |
*/
|
@@ -1245,4 +1282,4 @@ class Mobile_Detect
|
|
1245 |
//will receive the basic, C grade experience.
|
1246 |
return self::MOBILE_GRADE_C;
|
1247 |
}
|
1248 |
-
}
|
20 |
* README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
|
21 |
* HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
|
22 |
*
|
23 |
+
* @version 2.8.4
|
24 |
*/
|
25 |
|
26 |
class Mobile_Detect
|
64 |
/**
|
65 |
* Stores the version number of the current release.
|
66 |
*/
|
67 |
+
const VERSION = '2.8.4';
|
68 |
|
69 |
/**
|
70 |
* A type for the version() method indicating a string return value.
|
139 |
* @var array
|
140 |
*/
|
141 |
protected static $phoneDevices = array(
|
142 |
+
'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes
|
143 |
'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
|
144 |
'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
|
145 |
'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile',
|
146 |
// @todo: Is 'Dell Streak' a tablet or a phone? ;)
|
147 |
'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
|
148 |
'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925',
|
149 |
+
'Samsung' => 'Samsung|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750',
|
150 |
'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802)',
|
151 |
+
'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C6902|C6903|C6906|C6943',
|
152 |
'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
|
153 |
// @ref: http://www.micromaxinfo.com/mobiles/smartphones
|
154 |
// Added because the codes might conflict with Acer Tablets.
|
164 |
// Added simvalley mobile just for fun. They have some interesting devices.
|
165 |
// @ref: http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
|
166 |
'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
|
167 |
+
// Wolfgang - a brand that is sold by Aldi supermarkets
|
168 |
+
// http://www.wolfgangmobile.com/
|
169 |
+
'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
|
170 |
+
'Alcatel' => 'Alcatel',
|
171 |
+
// @ref: http://en.wikipedia.org/wiki/Amoi
|
172 |
+
'Amoi' => 'Amoi',
|
173 |
+
// @ref: http://en.wikipedia.org/wiki/INQ
|
174 |
+
'INQ' => 'INQ',
|
175 |
// @Tapatalk is a mobile app; @ref: http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
|
176 |
+
'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
|
177 |
);
|
178 |
|
179 |
/**
|
184 |
protected static $tabletDevices = array(
|
185 |
'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic.
|
186 |
'NexusTablet' => 'Android.*Nexus[\s]+(7|10)|^.*Android.*Nexus(?:(?!Mobile).)*$',
|
187 |
+
'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700', // SCH-P709|SCH-P729|SM-T2558 - Samsung Mega - treat them like a regular phone.
|
188 |
// @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
|
189 |
'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE)\b',
|
190 |
// Only the Surface tablets with Windows RT are considered mobile.
|
191 |
// @ref: http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
|
192 |
+
'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)',
|
193 |
// @ref: http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
|
194 |
+
'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10',
|
195 |
// @note: watch out for PadFone, see #132
|
196 |
+
// http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/
|
197 |
+
'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG',
|
198 |
'BlackBerryTablet' => 'PlayBook|RIM Tablet',
|
199 |
+
'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
|
200 |
'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
|
201 |
'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
|
202 |
// @ref: http://www.acer.ro/ac/ro/RO/content/drivers
|
203 |
// @ref: http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
|
204 |
// @ref: http://us.acer.com/ac/en/US/content/group/tablets
|
205 |
// @note: Can conflict with Micromax and Motorola phones codes.
|
206 |
+
'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b',
|
207 |
// @ref: http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
|
208 |
// @ref: http://us.toshiba.com/tablets/tablet-finder
|
209 |
// @ref: http://www.toshiba.co.jp/regza/tablet/
|
215 |
// Prestigio Tablets http://www.prestigio.com/support
|
216 |
'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD',
|
217 |
// @ref: http://support.lenovo.com/en_GB/downloads/default.page?#
|
218 |
+
'LenovoTablet' => 'Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)',
|
219 |
// @ref: http://www.yarvik.com/en/matrix/tablets/
|
220 |
'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
|
221 |
'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
|
222 |
'ArnovaTablet' => 'AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT',
|
223 |
// http://www.intenso.de/kategorie_en.php?kategorie=33
|
224 |
// @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
|
225 |
+
'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004',
|
226 |
// IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
|
227 |
'IRUTablet' => 'M702pro',
|
228 |
'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
|
231 |
// @ref: http://www.allview.ro/produse/droseries/lista-tablete-pc/
|
232 |
'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
|
233 |
// @reference: http://wiki.archosfans.com/index.php?title=Main_Page
|
234 |
+
'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b',
|
235 |
// @ref: http://www.ainol.com/plugin.php?identifier=ainol&module=product
|
236 |
'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
|
237 |
// @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
|
238 |
// @ref: Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
|
239 |
// @ref: http://www.sony.jp/support/tablet/
|
240 |
'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551',
|
241 |
+
// http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8
|
242 |
+
'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
|
243 |
// @ref: db + http://www.cube-tablet.com/buy-products.html
|
244 |
'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
|
245 |
// @ref: http://www.cobyusa.com/?p=pcat&pcat_id=3001
|
246 |
'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
|
247 |
// @ref: http://www.match.net.cn/products.asp
|
248 |
'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733',
|
249 |
+
// http://www.msi.com/support
|
250 |
+
// @todo Research the Windows Tablets.
|
251 |
+
'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b',
|
252 |
// @ref: http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
|
253 |
// @ref: http://www.imp3.net/14/show.php?itemid=20454
|
254 |
'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
|
283 |
// @note: Avoid detecting 'PLAYSTATION 3' as mobile.
|
284 |
'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
|
285 |
// @ref: http://www.trekstor.de/surftabs.html
|
286 |
+
'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab',
|
287 |
// @ref: http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
|
288 |
'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
|
289 |
// @ref: http://www.advandigital.com/index.php?link=content-product&jns=JP001
|
341 |
// @note: no need to add all the tablet codes since they are guided by the first regex.
|
342 |
'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
|
343 |
// Generic Vodafone tablets.
|
344 |
+
'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7',
|
345 |
// French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
|
346 |
// Aka: http://www.essentielb.fr/
|
347 |
'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
|
373 |
// http://www1.viewsonic.com/products/computing/tablets/
|
374 |
'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
|
375 |
// http://www.odys.de/web/internet-tablet_en.html
|
376 |
+
'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10',
|
377 |
// http://www.captiva-power.de/products.html#tablets-en
|
378 |
'CaptivaTablet' => 'CAPTIVA PAD',
|
379 |
// IconBIT - http://www.iconbit.com/products/tablets/
|
380 |
'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
|
381 |
+
// @ref: http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63
|
382 |
+
'TeclastTablet' => '\(Linux;\sAndroid\s[\d\.]+;\s[PXGAT]\d{2,}.*\sBuild/.*?\)',
|
383 |
+
'JaytechTablet' => 'TPC-PA762',
|
384 |
+
'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010',
|
385 |
+
// @ref: http://www.digma.ru/support/download/
|
386 |
+
// @todo: Ebooks also (if requested)
|
387 |
+
'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b',
|
388 |
+
// http://www.evolioshop.com/ro/tablete-pc.html
|
389 |
+
// http://www.evolio.ro/support/downloads_static.html?cat=2
|
390 |
+
// @todo: Research some more
|
391 |
+
'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b',
|
392 |
+
// http://www.pocketbook-int.com/ru/support
|
393 |
+
'PocketBookTablet' => 'Pocketbook',
|
394 |
// @ref: http://www.tesco.com/direct/hudl/
|
395 |
'Hudl' => 'Hudl HT7S3',
|
396 |
// @ref: http://www.telstra.com.au/home-phone/thub-2/
|
397 |
'TelstraTablet' => 'T-Hub2',
|
398 |
+
'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W'
|
399 |
);
|
400 |
|
401 |
/**
|
413 |
// @reference: http://en.wikipedia.org/wiki/Windows_Phone
|
414 |
// http://wifeng.cn/?r=blog&a=view&id=106
|
415 |
// http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
|
416 |
+
// http://msdn.microsoft.com/library/ms537503.aspx
|
417 |
+
'WindowsPhoneOS' => 'Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
|
418 |
'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
|
419 |
// http://en.wikipedia.org/wiki/MeeGo
|
420 |
// @todo: research MeeGo in UAs
|
445 |
'TeaShark' => 'teashark',
|
446 |
'Blazer' => 'Blazer',
|
447 |
// @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
|
448 |
+
'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
|
449 |
// @ref: http://en.wikipedia.org/wiki/Midori_(web_browser)
|
450 |
//'Midori' => 'midori',
|
451 |
'Tizen' => 'Tizen',
|
452 |
'UCBrowser' => 'UC.*Browser|UCWEB',
|
453 |
+
'baiduboxapp' => 'baiduboxapp',
|
454 |
+
'baidubrowser' => 'baidubrowser',
|
455 |
// @ref: https://github.com/serbanghita/Mobile-Detect/issues/7
|
456 |
'DiigoBrowser' => 'DiigoBrowser',
|
457 |
// http://www.puffinbrowser.com/index.php
|
458 |
'Puffin' => 'Puffin',
|
459 |
// @ref: http://mercury-browser.com/index.html
|
460 |
'Mercury' => '\bMercury\b',
|
461 |
+
// @ref: http://en.wikipedia.org/wiki/Obigo_Browser
|
462 |
+
'ObigoBrowser' => 'Obigo',
|
463 |
+
// @ref: http://en.wikipedia.org/wiki/NetFront
|
464 |
+
'NetFront' => 'NF-Browser',
|
465 |
// @reference: http://en.wikipedia.org/wiki/Minimo
|
466 |
// http://en.wikipedia.org/wiki/Vision_Mobile_Browser
|
467 |
+
'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
|
468 |
);
|
469 |
|
470 |
/**
|
545 |
'UC Browser' => 'UC Browser[VER]',
|
546 |
'MQQBrowser' => 'MQQBrowser/[VER]',
|
547 |
'MicroMessenger' => 'MicroMessenger/[VER]',
|
548 |
+
'baiduboxapp' => 'baiduboxapp/[VER]',
|
549 |
+
'baidubrowser' => 'baidubrowser/[VER]',
|
550 |
// @note: Safari 7534.48.3 is actually Version 5.1.
|
551 |
// @note: On BlackBerry the Version is overwriten by the OS.
|
552 |
'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ),
|
579 |
/**
|
580 |
* Construct an instance of this class.
|
581 |
*
|
582 |
+
* @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored.
|
583 |
+
* If left empty, will use the global _SERVER['HTTP_*'] vars instead.
|
584 |
* @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
|
585 |
* from the $headers array instead.
|
586 |
*/
|
587 |
public function __construct(
|
588 |
array $headers = null,
|
589 |
$userAgent = null
|
590 |
+
) {
|
591 |
$this->setHttpHeaders($headers);
|
592 |
$this->setUserAgent($userAgent);
|
593 |
}
|
702 |
|
703 |
$this->userAgent = null;
|
704 |
|
705 |
+
foreach ($this->getUaHttpHeaders() as $altHeader) {
|
706 |
+
if (!empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
|
707 |
$this->userAgent .= $this->httpHeaders[$altHeader] . " ";
|
708 |
}
|
709 |
}
|
883 |
public function checkHttpHeadersForMobile()
|
884 |
{
|
885 |
|
886 |
+
foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
|
887 |
+
if ( isset($this->httpHeaders[$mobileHeader]) ) {
|
888 |
+
if ( is_array($matchType['matches']) ) {
|
889 |
+
foreach ($matchType['matches'] as $_match) {
|
890 |
+
if ( strpos($this->httpHeaders[$mobileHeader], $_match) !== false ) {
|
891 |
return true;
|
892 |
}
|
893 |
}
|
894 |
+
|
895 |
return false;
|
896 |
} else {
|
897 |
return true;
|
1109 |
* Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
|
1110 |
*
|
1111 |
* @param string $propertyName The name of the property. See self::getProperties() array
|
1112 |
+
* keys for all possible properties.
|
1113 |
+
* @param string $type Either self::VERSION_TYPE_STRING to get a string value or
|
1114 |
+
* self::VERSION_TYPE_FLOAT indicating a float value. This parameter
|
1115 |
+
* is optional and defaults to self::VERSION_TYPE_STRING. Passing an
|
1116 |
+
* invalid parameter will default to the this type as well.
|
1117 |
*
|
1118 |
* @return string|float The version of the property we are trying to extract.
|
1119 |
*/
|
1282 |
//will receive the basic, C grade experience.
|
1283 |
return self::MOBILE_GRADE_C;
|
1284 |
}
|
1285 |
+
}
|
public/includes/class-spu-rules.php
CHANGED
@@ -223,14 +223,20 @@ class Spu_Rules
|
|
223 |
*/
|
224 |
function rule_match_same_site( $match, $rule ) {
|
225 |
|
226 |
-
|
|
|
227 |
|
228 |
$internal = str_replace( array( 'http://','https://' ), '', site_url() );
|
229 |
|
|
|
230 |
if( $rule['operator'] == "==" ) {
|
231 |
-
|
232 |
-
} else {
|
233 |
return !preg_match( '~' . $internal . '~i', $ref );
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
|
236 |
}
|
223 |
*/
|
224 |
function rule_match_same_site( $match, $rule ) {
|
225 |
|
226 |
+
|
227 |
+
$ref = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
|
228 |
|
229 |
$internal = str_replace( array( 'http://','https://' ), '', site_url() );
|
230 |
|
231 |
+
|
232 |
if( $rule['operator'] == "==" ) {
|
233 |
+
|
|
|
234 |
return !preg_match( '~' . $internal . '~i', $ref );
|
235 |
+
|
236 |
+
} else {
|
237 |
+
|
238 |
+
return preg_match( '~' . $internal . '~i', $ref );
|
239 |
+
|
240 |
}
|
241 |
|
242 |
}
|
public/views/popup.php
CHANGED
@@ -11,19 +11,27 @@
|
|
11 |
|
12 |
?><!-- Popups v<?php echo self::VERSION; ?> - http://wordpress.org/plugins/social-popup/--><?php
|
13 |
$box = get_post( $spu_id );
|
|
|
14 |
|
15 |
// has box with this id been found?
|
16 |
if ( ! $box instanceof WP_Post || $box->post_status !== 'publish' ) {
|
17 |
return;
|
18 |
}
|
19 |
|
20 |
-
$opts =
|
21 |
$css = $opts['css'];
|
22 |
$content = $box->post_content;
|
|
|
23 |
|
24 |
// run filters on content
|
25 |
$content = apply_filters( 'spu/popup/content', $content, $box );
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
do_action( 'spu/popup/before_popup', $box, $opts, $css);
|
28 |
|
29 |
?>
|
@@ -39,11 +47,11 @@ do_action( 'spu/popup/before_popup', $box, $opts, $css);
|
|
39 |
}
|
40 |
</style>
|
41 |
<div class="spu-bg" id="spu-bg-<?php echo $box->ID; ?>"></div>
|
42 |
-
<div class="spu-box spu-<?php echo esc_attr( $opts['css']['position'] ); ?> spu-total-<?php echo $total_shortcodes[$box->ID];?> <?php echo isset( $total_shortcodes['google'] ) ? 'spu-gogl' : '';?>" id="spu-<?php echo $box->ID; ?>"
|
43 |
data-box-id="<?php echo $box->ID ; ?>" data-trigger="<?php echo esc_attr( $opts['trigger'] ); ?>"
|
44 |
data-trigger-number="<?php echo esc_attr( absint( $opts['trigger_number'] ) ); ?>"
|
45 |
-
data-
|
46 |
-
data-auto-hide="<?php echo esc_attr($opts['auto_hide']); ?>" data-bgopa="<?php echo esc_attr($css['bgopacity']);?>" data-total="<?php echo $total_shortcodes[$box->ID];?>"
|
47 |
style="left:-99999px" <?php echo apply_filters( 'spu/popup/data_attrs', $data_attrs, $opts);?>>
|
48 |
<div class="spu-content"><?php echo $content; ?></div>
|
49 |
<span class="spu-close">×</span>
|
11 |
|
12 |
?><!-- Popups v<?php echo self::VERSION; ?> - http://wordpress.org/plugins/social-popup/--><?php
|
13 |
$box = get_post( $spu_id );
|
14 |
+
$helper = new Spu_Helper;
|
15 |
|
16 |
// has box with this id been found?
|
17 |
if ( ! $box instanceof WP_Post || $box->post_status !== 'publish' ) {
|
18 |
return;
|
19 |
}
|
20 |
|
21 |
+
$opts = $helper->get_box_options( $box->ID );
|
22 |
$css = $opts['css'];
|
23 |
$content = $box->post_content;
|
24 |
+
$data_attrs = '';
|
25 |
|
26 |
// run filters on content
|
27 |
$content = apply_filters( 'spu/popup/content', $content, $box );
|
28 |
|
29 |
+
// Qtranslate support
|
30 |
+
if ( function_exists('qtrans_useCurrentLanguageIfNotFoundShowAvailable') ) {
|
31 |
+
$content = qtrans_useCurrentLanguageIfNotFoundShowAvailable( $content );
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
do_action( 'spu/popup/before_popup', $box, $opts, $css);
|
36 |
|
37 |
?>
|
47 |
}
|
48 |
</style>
|
49 |
<div class="spu-bg" id="spu-bg-<?php echo $box->ID; ?>"></div>
|
50 |
+
<div class="spu-box spu-<?php echo esc_attr( $opts['css']['position'] ); ?> spu-total-<?php echo $total_shortcodes[$box->ID][0];?> <?php echo isset( $total_shortcodes[$box->ID]['google'] ) ? 'spu-gogl' : '';?>" id="spu-<?php echo $box->ID; ?>"
|
51 |
data-box-id="<?php echo $box->ID ; ?>" data-trigger="<?php echo esc_attr( $opts['trigger'] ); ?>"
|
52 |
data-trigger-number="<?php echo esc_attr( absint( $opts['trigger_number'] ) ); ?>"
|
53 |
+
data-spuanimation="<?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']); ?>"
|
54 |
+
data-auto-hide="<?php echo esc_attr($opts['auto_hide']); ?>" data-bgopa="<?php echo esc_attr($css['bgopacity']);?>" data-total="<?php echo $total_shortcodes[$box->ID][0];?>"
|
55 |
style="left:-99999px" <?php echo apply_filters( 'spu/popup/data_attrs', $data_attrs, $opts);?>>
|
56 |
<div class="spu-content"><?php echo $content; ?></div>
|
57 |
<span class="spu-close">×</span>
|