Changeset 769999
- Timestamp:
- 09/11/2013 12:02:11 AM (12 years ago)
- Location:
- wp-js-detect/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-js-detect.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-js-detect/trunk/readme.txt
r769575 r769999 5 5 Requires at least: 3.5 6 6 Tested up to: 3.6 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv2 9 9 … … 67 67 = 1.0.3 = 68 68 * NEW : Plugin option tabs has been added. 69 = 1.0.4 = 70 * NEW : Ability to customize pop-up window from the backend has been added. -
wp-js-detect/trunk/wp-js-detect.php
r769576 r769999 9 9 Plugin URI: https://github.com/git-kuf/wp-js-detect 10 10 Description: This plugin is used to display a notification message if the browser's Javascript is disabled. 11 Version: 1.0. 311 Version: 1.0.4 12 12 Author: Kuflievskiy Alex <[email protected]> 13 13 Author URI: https://github.com/git-kuf/ … … 44 44 public function wp_non_js_notification(); 45 45 public function plugin_settings_link($links); 46 public function paypal_donate_button(); 46 47 } 47 48 … … 82 83 $wp_non_js_notification_text = __('For full functionality of this site it is necessary to enable JavaScript. Here are the <a href="http://www.enable-javascript.com/" target="_blank"> instructions how to enable JavaScript in your web browser</a>.'); 83 84 add_option('wp_non_js_notification_text', $wp_non_js_notification_text, '', 'yes'); 85 86 $plugin_path = get_bloginfo('url') . '/wp-content/plugins/wp-js-detect/'; 87 $wp_non_js_notification_css = " 88 /*no JS message*/ 89 #jsDisabled { 90 position: fixed; 91 width: 100%; 92 height: 100%; 93 background: url(".$plugin_path."images/dark-bg.png) repeat; 94 z-index: 2000; 95 } 96 #jsDisabled p { 97 position: absolute; 98 top: 50%; 99 left: 50%; 100 width: 100%; 101 width: 500px; 102 margin-left: -323px; 103 margin-top: -75px; 104 border-radius: 5px; 105 box-shadow: 0 0 10px #000; 106 padding: 30px 30px 30px 120px; 107 background: #fef5f2 url(".$plugin_path."images/symbol_error.png) 30px 50% no-repeat; 108 font-size: 20px; 109 text-align: left; 110 color: #333; 111 line-height: 26px; 112 } 113 #jsDisabled p a { 114 color: #d13131; 115 } 116 "; 117 add_option('wp_non_js_notification_css', $wp_non_js_notification_css, '', 'yes'); 84 118 } 85 119 … … 95 129 { 96 130 delete_option('wp_non_js_notification_text'); 131 delete_option('wp_non_js_notification_css'); 97 132 } 98 133 … … 121 156 { 122 157 123 if (isset($_POST['wp_non_js_notification_text'])) { 158 if (isset($_POST['wp_non_js_notification_text'])) 159 { 124 160 update_option('wp_non_js_notification_text', $_POST['wp_non_js_notification_text']); 125 161 } … … 128 164 <div id="icon-tools" class="icon32"><br/></div> 129 165 <h2>Js Detect Settings</h2> 130 <a class="nav-tab " href="/wp-admin/admin.php?page=js-detect-settings">Plugin Settings</a> 131 <a class="nav-tab " href="/wp-admin/admin.php?page=js-detect-settings&tab=contact">Contacts</a> 166 <a class="nav-tab <?php echo ($_GET['tab'] == '') ? 'nav-tab-active' : ''; ?>" href="/wp-admin/admin.php?page=js-detect-settings">Plugin Settings</a> 167 <a class="nav-tab <?php echo ($_GET['tab'] == 'css') ? 'nav-tab-active' : ''; ?>" href="/wp-admin/admin.php?page=js-detect-settings&tab=css">Plugin CSS</a> 168 <a class="nav-tab <?php echo ($_GET['tab'] == 'contact') ? 'nav-tab-active' : ''; ?>" href="/wp-admin/admin.php?page=js-detect-settings&tab=contact">Contacts Me</a> 132 169 <?php if($_GET['tab'] === 'contact'): ?> 133 170 <table cellspacing="0" class="widefat post fixed" style="width: 100%"> … … 152 189 </tbody> 153 190 </table> 154 191 <?php elseif($_GET['tab'] === 'css'): ?> 192 <table cellspacing="0" class="widefat post fixed" style="width: 100%"> 193 <thead> 194 <tr> 195 <th style="width:200px;" class="manage-column"></th> 196 <th></th> 197 </tr> 198 </thead> 199 <tfoot> 200 <tr> 201 <th class="manage-column"></th> 202 <th></th> 203 </tr> 204 </tfoot> 205 <tbody> 206 <tr> 207 <td class="column"> 208 <label for="wp_non_js_notification_css">No Js Notification CSS:</label> 209 </td> 210 <td align="right" class="column"> 211 <form action="#" method="post"> 212 <textarea rows="50" class="large-text code" id="wp_non_js_notification_css" 213 name="wp_non_js_notification_css"><?php echo get_option('wp_non_js_notification_css'); ?></textarea> 214 <input type="submit" value="<?php _e('Update'); ?>" 215 class="button button-primary button-large"> 216 </form> 217 </td> 218 </tr> 219 <tr> 220 <td colspan="2" class="column"> 221 <?php echo $this->paypal_donate_button(); ?> 222 </td> 223 </tr> 224 </tbody> 225 </table> 155 226 <?php else: ?> 156 227 <table cellspacing="0" class="widefat post fixed" style="width: 100%"> 157 228 <thead> 158 229 <tr> 159 <th style="width:200px;" class="manage-column"> 160 </th> 230 <th style="width:200px;" class="manage-column"></th> 161 231 <th></th> 162 232 </tr> … … 184 254 <tr> 185 255 <td colspan="2" class="column"> 186 <p>Donate to support further development.</p> 187 188 <p>Im glad that you like my wordpress plugin and that you want to show your appreciation by 189 donating. With your help I can make these plugins even better!</p> 190 191 <p>You can donate money using the PayPal-button below (any amount makes me happy!)</p> 192 193 <p> 194 <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&[email protected]&item_name=Donation+for+Wp+Js+Detect" 195 target="_blank" title="Make a Donation for Wp Js Detect Plugin"> 196 <img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt=""/> 197 </a> 198 </p> 256 <?php echo $this->paypal_donate_button(); ?> 199 257 </td> 200 258 </tr> … … 213 271 public function wp_non_js_notification() 214 272 { 215 $plugin_path = get_bloginfo('url') . '/wp-content/plugins/wp-js-detect/';216 273 ?> 217 274 <div id="jsDisabled"><p><?php echo get_option('wp_non_js_notification_text'); ?></p></div> … … 223 280 </script> 224 281 <style> 225 /*no JS message*/ 226 #jsDisabled { 227 position: fixed; 228 width: 100%; 229 height: 100%; 230 background: url(<?php echo $plugin_path; ?>images/dark-bg.png) repeat; 231 z-index: 2000; 232 } 233 #jsDisabled p { 234 position: absolute; 235 top: 50%; 236 left: 50%; 237 width: 100%; 238 width: 500px; 239 margin-left: -323px; 240 margin-top: -75px; 241 border-radius: 5px; 242 box-shadow: 0 0 10px #000; 243 padding: 30px 30px 30px 120px; 244 background: #fef5f2 url(<?php echo $plugin_path; ?>images/symbol_error.png) 30px 50% no-repeat; 245 font-size: 20px; 246 text-align: left; 247 color: #333; 248 line-height: 26px; 249 } 250 #jsDisabled p a { 251 color: #d13131; 252 } 282 <?php echo get_option('wp_non_js_notification_css'); ?> 253 283 </style> 254 284 <?php … … 262 292 * 263 293 */ 264 public function plugin_settings_link($links) { 294 public function plugin_settings_link($links) 295 { 265 296 266 297 array_unshift($links, '<a target="_blank" href="/wp-admin/admin.php?page=js-detect-settings">Settings</a>'); … … 270 301 return $links; 271 302 } 303 304 /** 305 * Function paypal_donate_button 306 * This function is used to output paypal donate button. 307 * 308 */ 309 public function paypal_donate_button() 310 { 311 ?> 312 <p><?php _e('Donate to support further development.'); ?></p> 313 <p><?php _e('I’m glad that you like my wordpress plugin and that you want to show your appreciation by 314 donating. With your help I can make these plugins even better!'); ?></p> 315 <p><?php _e('You can donate money using the PayPal-button below (any amount makes me happy!)'); ?></p> 316 <p> 317 <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&[email protected]&item_name=Donation+for+Wp+Js+Detect" 318 target="_blank" title="Make a Donation for Wp Js Detect Plugin"> 319 <img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt=""/> 320 </a> 321 </p> 322 <?php 323 } 272 324 } 273 325
Note: See TracChangeset
for help on using the changeset viewer.