Changeset 1347863
- Timestamp:
- 02/10/2016 10:11:01 PM (10 years ago)
- Location:
- wp-useragent/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
wp-useragent-options.php (modified) (3 diffs)
-
wp-useragent.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-useragent/trunk/readme.txt
r1171065 r1347863 5 5 Requires at least: 2.0 6 6 Tested up to: 4.2.2 7 Stable tag: 1.0. 77 Stable tag: 1.0.8 8 8 9 9 == Description == … … 66 66 67 67 == Changelog == 68 69 = v1.0.8 = 70 * Added option to display User Agent information in comments only in the Admin Section 71 68 72 69 73 = v1.0.7 = … … 607 611 == Upgrade Notice == 608 612 609 = v1.0.7 = 610 * Added detection for Microsoft Edge, Seznam.cz, Coc Coc, Google Search App, WebPositive, Vivaldi, luakit, wOSBrowser, Puffin, NetFront Life, Ninesky, Palm WebPro browsers. 611 * Optimized/reduced filesize of 31 images 612 * Added detection for Windows Phone 10 613 * Updated Windows 10 detection 614 * Cleaned up syntax 613 = v1.0.8 = 614 * Added option to display User Agent information in comments only in the Admin Section -
wp-useragent/trunk/wp-useragent-options.php
r1171065 r1347863 37 37 $ua_hide_unknown_bool = get_option('ua_hide_unknown_bool'); 38 38 $ua_output_location = get_option('ua_output_location'); 39 $ua_admin_only_bool = get_option('ua_admin_only_bool'); 39 40 ?> 40 41 … … 211 212 <table class="form-table" style="margin-top: 0"> 212 213 <tbody> 214 <tr valign='top'> 215 <th scope='row'>Admin Section Only:</th> 216 <td><div style="overflow:auto;max-height:100px;"> 217 <select id="ua_admin_only_bool" name="ua_admin_only_bool"> 218 <option value="true" <?php if($ua_admin_only_bool=="true") echo 'selected="selected"' ?>>True</option> 219 <option value="false" <?php if($ua_admin_only_bool!="true") echo 'selected="selected"' ?>>False</option> 220 </select> 221 </div></td> 222 </tr> 213 223 <tr valign='top'> 214 224 <th scope='row'>UserAgent Output Location:</th> … … 304 314 305 315 <input type="hidden" name="action" value="update" /> 306 <input type="hidden" name="page_options" value="ua_doctype, ua_comment_size, ua_track_size, ua_show_text, ua_image_style, ua_image_css, ua_text_surfing, ua_text_on, ua_text_via, ua_text_links, ua_show_ua_bool, ua_hide_unknown_bool, ua_output_location " />316 <input type="hidden" name="page_options" value="ua_doctype, ua_comment_size, ua_track_size, ua_show_text, ua_image_style, ua_image_css, ua_text_surfing, ua_text_on, ua_text_via, ua_text_links, ua_show_ua_bool, ua_hide_unknown_bool, ua_output_location, ua_admin_only_bool" /> 307 317 <p class="submit"> 308 318 <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> -
wp-useragent/trunk/wp-useragent.php
r1171065 r1347863 4 4 Plugin URI: http://kyleabaker.com/goodies/coding/wp-useragent/ 5 5 Description: A simple User-Agent detection plugin that lets you easily insert icons and/or textual web browser and operating system details with each comment. 6 Version: 1.0. 76 Version: 1.0.8 7 7 Author: Kyle Baker 8 8 Author URI: http://kyleabaker.com/ … … 55 55 $ua_hide_unknown_bool = get_option('ua_hide_unknown_bool'); 56 56 $ua_output_location = get_option('ua_output_location'); 57 $ua_admin_only_bool = get_option('ua_admin_only_bool'); 57 58 58 59 // Include our main UA detection functions … … 293 294 // If the user selected to display output in a standard location 294 295 // and not a custom location then lets add a filter here. 295 if($ua_output_location!='custom') 296 if($ua_admin_only_bool=='true' && is_admin()) 297 { 298 if($ua_output_location!='custom') 299 { 300 add_filter('comment_text', 'wp_useragent'); 301 } 302 } 303 else if($ua_admin_only_bool!='true' && $ua_output_location!='custom') 296 304 { 297 305 add_filter('comment_text', 'wp_useragent');
Note: See TracChangeset
for help on using the changeset viewer.