Q2W3 Fixed Widget - Version 2.2.2

Version Description

  • Fixed PHP Error
  • Mobile Detect updated to version 2.5.8
Download this release

Release Info

Developer Max Bond
Plugin Icon 128x128 Q2W3 Fixed Widget
Version 2.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

Files changed (3) hide show
  1. q2w3-fixed-widget.php +3 -3
  2. q2w3-mobile-detect.php +17 -7
  3. readme.txt +10 -5
q2w3-fixed-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Q2W3 Fixed Widget
4
  Plugin URI: http://www.q2w3.ru/q2w3-fixed-widget-wordpress-plugin/
5
  Description: Fixes positioning of the selected widgets, when the page is scrolled down.
6
  Author: Max Bond
7
- Version: 2.2.1
8
  Author URI: http://www.q2w3.ru/
9
  */
10
 
@@ -22,6 +22,8 @@ if ( is_admin() ) {
22
 
23
  } else {
24
 
 
 
25
  add_action('template_redirect', array( 'q2w3_fixed_widget', 'init' ));
26
 
27
  add_filter('widget_display_callback', array( 'q2w3_fixed_widget', 'check' ), 10, 3);
@@ -78,8 +80,6 @@ class q2w3_fixed_widget {
78
 
79
  if ( $options['disable-phone'] == 'yes' || $options['disable-tablet'] == 'yes' ) {
80
 
81
- require 'q2w3-mobile-detect.php';
82
-
83
  $detect = new Q2W3_Mobile_Detect();
84
 
85
  $device_type = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
4
  Plugin URI: http://www.q2w3.ru/q2w3-fixed-widget-wordpress-plugin/
5
  Description: Fixes positioning of the selected widgets, when the page is scrolled down.
6
  Author: Max Bond
7
+ Version: 2.2.2
8
  Author URI: http://www.q2w3.ru/
9
  */
10
 
22
 
23
  } else {
24
 
25
+ require_once 'q2w3-mobile-detect.php';
26
+
27
  add_action('template_redirect', array( 'q2w3_fixed_widget', 'init' ));
28
 
29
  add_filter('widget_display_callback', array( 'q2w3_fixed_widget', 'check' ), 10, 3);
80
 
81
  if ( $options['disable-phone'] == 'yes' || $options['disable-tablet'] == 'yes' ) {
82
 
 
 
83
  $detect = new Q2W3_Mobile_Detect();
84
 
85
  $device_type = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
q2w3-mobile-detect.php CHANGED
@@ -29,12 +29,12 @@
29
  * @link Official page: http://mobiledetect.net
30
  * GitHub Repository: https://github.com/serbanghita/Mobile-Detect
31
  * Google Code Old Page: http://code.google.com/p/php-mobile-detect/
32
- * @version 2.5.7
33
  */
34
 
35
  class Q2W3_Mobile_Detect {
36
 
37
- protected $scriptVersion = '2.5.7';
38
 
39
  // External info.
40
  protected $userAgent = null;
@@ -50,7 +50,7 @@ class Q2W3_Mobile_Detect {
50
  protected $phoneDevices = array(
51
  'iPhone' => '\biPhone.*Mobile|\biPod|\biTunes',
52
  'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
53
- '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|ADR6425|001HT|Inspire 4G',
54
  'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile',
55
  // @todo: Is 'Dell Streak' a tablet or a phone? ;)
56
  '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',
@@ -78,6 +78,9 @@ class Q2W3_Mobile_Detect {
78
  'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1010|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-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-P6810|GT-P7501',
79
  // @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
80
  'Kindle' => 'Kindle|Silk.*Accelerated',
 
 
 
81
  'AsusTablet' => 'Transformer|TF101',
82
  'BlackBerryTablet' => 'PlayBook|RIM Tablet',
83
  'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200',
@@ -123,12 +126,16 @@ class Q2W3_Mobile_Detect {
123
  'HuaweiTablet' => 'MediaPad|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim',
124
  // Nec or Medias Tab
125
  'NecTablet' => '\bN-06D|\bN-08D',
 
 
126
  // Broncho Tablets: http://www.broncho.cn/ (hard to find)
127
  'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)',
128
  // @ref: http://versusuk.com/support.html
129
  'VersusTablet' => 'TOUCHPAD.*[78910]',
130
  // @ref: http://www.zync.in/index.php/our-products/tablet-phablets
131
  'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900',
 
 
132
  // @ref: https://www.nabitablet.com/
133
  'NabiTablet' => 'Android.*\bNabi',
134
  // @note: Avoid detecting 'PLAYSTATION 3' as mobile.
@@ -154,7 +161,7 @@ class Q2W3_Mobile_Detect {
154
  // http://en.wikipedia.org/wiki/Maemo
155
  // @todo: research Maemo in UAs
156
  'MaemoOS' => 'Maemo',
157
- 'JavaOS' => 'J2ME/MIDP|Java/',
158
  'webOS' => 'webOS|hpwOS',
159
  'badaOS' => '\bBada\b',
160
  'BREWOS' => 'BREW',
@@ -164,7 +171,7 @@ class Q2W3_Mobile_Detect {
164
  // @reference: https://developers.google.com/chrome/mobile/docs/user-agent
165
  'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
166
  'Dolfin' => '\bDolfin\b',
167
- 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera',
168
  'Skyfire' => 'Skyfire',
169
  'IE' => 'IEMobile|MSIEMobile',
170
  'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile',
@@ -185,10 +192,14 @@ class Q2W3_Mobile_Detect {
185
  'Mercury' => '\bMercury\b',
186
  // @reference: http://en.wikipedia.org/wiki/Minimo
187
  // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
188
- 'GenericBrowser' => 'NokiaBrowser|OviBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision'
189
  );
190
  // Utilities.
191
  protected $utilities = array(
 
 
 
 
192
  'TV' => 'SonyDTV115', // experimental
193
  'WebKit' => '(webkit)[ /]([\w.]+)',
194
  'Bot' => 'Googlebot|DoCoMo|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|facebookexternalhit',
@@ -225,7 +236,6 @@ class Q2W3_Mobile_Detect {
225
  // http://en.wikipedia.org/wiki/NetFront
226
  'NetFront' => 'NetFront/[VER]',
227
  'NokiaBrowser' => 'NokiaBrowser/[VER]',
228
- 'NokiaBrowser' => 'NokiaBrowser/[VER]',
229
  'Opera' => 'Version/[VER]',
230
  'Opera Mini' => 'Opera Mini/[VER]',
231
  'Opera Mobi' => 'Version/[VER]',
29
  * @link Official page: http://mobiledetect.net
30
  * GitHub Repository: https://github.com/serbanghita/Mobile-Detect
31
  * Google Code Old Page: http://code.google.com/p/php-mobile-detect/
32
+ * @version 2.5.8
33
  */
34
 
35
  class Q2W3_Mobile_Detect {
36
 
37
+ protected $scriptVersion = '2.5.8';
38
 
39
  // External info.
40
  protected $userAgent = null;
50
  protected $phoneDevices = array(
51
  'iPhone' => '\biPhone.*Mobile|\biPod|\biTunes',
52
  'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
53
+ '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|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b',
54
  'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile',
55
  // @todo: Is 'Dell Streak' a tablet or a phone? ;)
56
  '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',
78
  'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1010|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-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-P6810|GT-P7501',
79
  // @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
80
  'Kindle' => 'Kindle|Silk.*Accelerated',
81
+ // Only the Surface tablets with Windows RT are considered mobile.
82
+ // @ref: http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
83
+ 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;',
84
  'AsusTablet' => 'Transformer|TF101',
85
  'BlackBerryTablet' => 'PlayBook|RIM Tablet',
86
  'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200',
126
  'HuaweiTablet' => 'MediaPad|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim',
127
  // Nec or Medias Tab
128
  'NecTablet' => '\bN-06D|\bN-08D',
129
+ // Pantech Tablets: http://www.pantechusa.com/phones/
130
+ 'PantechTablet' => 'Pantech.*P4100',
131
  // Broncho Tablets: http://www.broncho.cn/ (hard to find)
132
  'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)',
133
  // @ref: http://versusuk.com/support.html
134
  'VersusTablet' => 'TOUCHPAD.*[78910]',
135
  // @ref: http://www.zync.in/index.php/our-products/tablet-phablets
136
  'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900',
137
+ // @ref: http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/
138
+ 'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA',
139
  // @ref: https://www.nabitablet.com/
140
  'NabiTablet' => 'Android.*\bNabi',
141
  // @note: Avoid detecting 'PLAYSTATION 3' as mobile.
161
  // http://en.wikipedia.org/wiki/Maemo
162
  // @todo: research Maemo in UAs
163
  'MaemoOS' => 'Maemo',
164
+ 'JavaOS' => 'J2ME/|Java/|\bMIDP\b|\bCLDC\b',
165
  'webOS' => 'webOS|hpwOS',
166
  'badaOS' => '\bBada\b',
167
  'BREWOS' => 'BREW',
171
  // @reference: https://developers.google.com/chrome/mobile/docs/user-agent
172
  'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
173
  'Dolfin' => '\bDolfin\b',
174
+ 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|OPR/[0-9.]+',
175
  'Skyfire' => 'Skyfire',
176
  'IE' => 'IEMobile|MSIEMobile',
177
  'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile',
192
  'Mercury' => '\bMercury\b',
193
  // @reference: http://en.wikipedia.org/wiki/Minimo
194
  // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
195
+ 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision'
196
  );
197
  // Utilities.
198
  protected $utilities = array(
199
+ // Experimental. When a mobile device wants to switch to 'Desktop Mode'.
200
+ // @ref: http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
201
+ // @ref: https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
202
+ 'DesktopMode' => 'WPDesktop',
203
  'TV' => 'SonyDTV115', // experimental
204
  'WebKit' => '(webkit)[ /]([\w.]+)',
205
  'Bot' => 'Googlebot|DoCoMo|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|facebookexternalhit',
236
  // http://en.wikipedia.org/wiki/NetFront
237
  'NetFront' => 'NetFront/[VER]',
238
  'NokiaBrowser' => 'NokiaBrowser/[VER]',
 
239
  'Opera' => 'Version/[VER]',
240
  'Opera Mini' => 'Opera Mini/[VER]',
241
  'Opera Mobi' => 'Version/[VER]',
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: sidebar, widget, scroll, fixed, floating, sticky, russian, q2w3
5
  Requires at least: 3.0
6
  Tested up to: 3.5.1
7
- Stable tag: 2.2.1
8
 
9
  Fixes positioning of the selected widgets, when the page is scrolled down.
10
 
@@ -31,6 +31,7 @@ Note two. The plugin is not working with all themes. Theme requirements:
31
 
32
  * Widgets must have unique IDs (see FAQ).
33
  * No JavaScript errors
 
34
 
35
  In some cases theme CSS changes required.
36
 
@@ -51,7 +52,7 @@ There are several reasons:
51
  2. Javascript errors on page. Commonly caused by buggy plugins. Check javascript console of your browser. If you find errors, try to locate and fix its source.
52
  3. No `wp_head()` and `wp_footer()` functions in template. Check header.php and footer.php files of your active theme.
53
 
54
- = How to prevent overlaping with the footer? =
55
 
56
  Make sure you have updated plugin to version 2.x. Go to WP admin area, Appearance -> Fixed Widget Options. Here you can define top and bottom margins. Set bottom margin value >= footer height. Check the result.
57
 
@@ -73,8 +74,12 @@ This option defines (in milliseconds, 1 sec = 1000 ms) how often plugin recalcul
73
 
74
  == Changelog ==
75
 
 
 
 
 
76
  = 2.2.1 =
77
- * Fixed PHP [Warning](http://wordpress.org/support/topic/error-with-the-new-update-22?replies=2#post-3963422)
78
 
79
  = 2.2 =
80
  * Now the plugin is able to reflect dynamic page content changes (infinite scroll, ajax basket and other javascript stuff)!!!
@@ -87,11 +92,11 @@ This option defines (in milliseconds, 1 sec = 1000 ms) how often plugin recalcul
87
  * Fixed javascript error when no sidebars exists on a page.
88
 
89
  = 2.0 =
90
- * Fixed footer overlaping problem! Now users can customize top and bottom margins for the fixed widgets from the admin area (Appearance -> Fixed Widget Options).
91
  * Added localization support
92
 
93
  = 1.0.3 =
94
- * Normalized plugin behavior when sidebar is longer then main content. Note: possible overlaping with footer is still exists.
95
 
96
  = 1.0.2 =
97
  * Fixed problem with widgets displayed only on certain pages.
4
  Tags: sidebar, widget, scroll, fixed, floating, sticky, russian, q2w3
5
  Requires at least: 3.0
6
  Tested up to: 3.5.1
7
+ Stable tag: 2.2.2
8
 
9
  Fixes positioning of the selected widgets, when the page is scrolled down.
10
 
31
 
32
  * Widgets must have unique IDs (see FAQ).
33
  * No JavaScript errors
34
+ * jQuery 1.7 or later
35
 
36
  In some cases theme CSS changes required.
37
 
52
  2. Javascript errors on page. Commonly caused by buggy plugins. Check javascript console of your browser. If you find errors, try to locate and fix its source.
53
  3. No `wp_head()` and `wp_footer()` functions in template. Check header.php and footer.php files of your active theme.
54
 
55
+ = How to prevent overlapping with the footer? =
56
 
57
  Make sure you have updated plugin to version 2.x. Go to WP admin area, Appearance -> Fixed Widget Options. Here you can define top and bottom margins. Set bottom margin value >= footer height. Check the result.
58
 
74
 
75
  == Changelog ==
76
 
77
+ = 2.2.2 =
78
+ * Fixed PHP [Error](http://wordpress.org/support/topic/breakes-with-php-53)
79
+ * Mobile Detect updated to version 2.5.8
80
+
81
  = 2.2.1 =
82
+ * Fixed PHP [Warning](http://wordpress.org/support/topic/error-with-the-new-update-22)
83
 
84
  = 2.2 =
85
  * Now the plugin is able to reflect dynamic page content changes (infinite scroll, ajax basket and other javascript stuff)!!!
92
  * Fixed javascript error when no sidebars exists on a page.
93
 
94
  = 2.0 =
95
+ * Fixed footer overlapping problem! Now users can customize top and bottom margins for the fixed widgets from the admin area (Appearance -> Fixed Widget Options).
96
  * Added localization support
97
 
98
  = 1.0.3 =
99
+ * Normalized plugin behavior when sidebar is longer then main content. Note: possible overlapping with footer is still exists.
100
 
101
  = 1.0.2 =
102
  * Fixed problem with widgets displayed only on certain pages.