Changeset 1247977
- Timestamp:
- 09/17/2015 10:47:06 PM (11 years ago)
- Location:
- quickiebar/trunk
- Files:
-
- 5 edited
-
admin/controllers/settings.php (modified) (2 diffs)
-
admin/js/settings.js (modified) (6 diffs)
-
admin/views/settings.html (modified) (1 diff)
-
quickiebar.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quickiebar/trunk/admin/controllers/settings.php
r1178641 r1247977 52 52 53 53 update_option('qb_archive_page_visibility', $settings['archive_page_visibility']); 54 55 update_option('qb_custom_post_type_visibility', $settings['custom_post_type_visibility']); 54 56 } 55 57 … … 132 134 'device_visibility' => get_option('qb_device_visibility'), 133 135 'archive_page_visibility' => get_option('qb_archive_page_visibility'), 134 'bar_zindex' => get_option('qb_bar_zindex') 136 'bar_zindex' => get_option('qb_bar_zindex'), 137 'custom_post_type_visibility' => get_option('qb_custom_post_type_visibility') 135 138 ) ); 136 139 } -
quickiebar/trunk/admin/js/settings.js
r1163740 r1247977 32 32 device_visibility: ko.observable(), 33 33 archive_page_visibility: ko.observable(), 34 bar_zindex: ko.observable() 34 bar_zindex: ko.observable(), 35 custom_post_type_visibility: ko.observable() 35 36 } 36 37 self.settings.cache = { … … 49 50 device_visibility: ko.observable(), 50 51 archive_page_visibility: ko.observable(), 51 bar_zindex: ko.observable() 52 bar_zindex: ko.observable(), 53 custom_post_type_visibility: ko.observable() 52 54 } 53 55 … … 180 182 self.settings.cache.archive_page_visibility(self.settings.archive_page_visibility()); 181 183 self.settings.cache.bar_zindex(self.settings.bar_zindex()); 184 self.settings.cache.custom_post_type_visibility(self.settings.custom_post_type_visibility()); 182 185 183 186 } … … 198 201 self.settings.device_visibility() != self.settings.cache.device_visibility() || 199 202 self.settings.archive_page_visibility() != self.settings.cache.archive_page_visibility() || 200 self.settings.bar_zindex() != self.settings.cache.bar_zindex() 203 self.settings.bar_zindex() != self.settings.cache.bar_zindex() || 204 self.settings.custom_post_type_visibility() != self.settings.cache.custom_post_type_visibility() 201 205 ){ 202 206 return true; … … 276 280 device_visibility: self.settings.device_visibility(), 277 281 archive_page_visibility: self.settings.archive_page_visibility(), 278 bar_zindex: self.settings.bar_zindex() 282 bar_zindex: self.settings.bar_zindex(), 283 custom_post_type_visibility: self.settings.custom_post_type_visibility() 279 284 } 280 285 }, … … 357 362 self.settings.archive_page_visibility(qb_settings.archive_page_visibility); 358 363 self.settings.bar_zindex(qb_settings.bar_zindex); 364 365 self.settings.custom_post_type_visibility(qb_settings.custom_post_type_visibility); 359 366 360 367 //if page exceptions or post exceptions, toggle those menus visibility accordingly -
quickiebar/trunk/admin/views/settings.html
r1200438 r1247977 140 140 </div> 141 141 </div><!--/.embedded-option--> 142 143 <div class="embedded-option"> 144 <div class="embedded-option-label">Show Bar on Custom Post Types?</div> 145 <div> 146 <div class="embedded-option-value" data-bind="click: function(){ custom_post_type_visibility('hide'); }, css: {selected: custom_post_type_visibility() == 'hide' }">HIDE</div> 147 <div class="embedded-option-value" data-bind="click: function(){ custom_post_type_visibility('show'); }, css: {selected: custom_post_type_visibility() == 'show' }">SHOW</div> 148 </div> 149 </div><!--/.embedded-option--> 142 150 143 151 </div> -
quickiebar/trunk/quickiebar.php
r1231663 r1247977 4 4 Plugin URI: https://quickiebar.com 5 5 Description: QuickieBar makes it easy for you to convert visitors by adding an attractive and easily customizable conversion bar to the top or bottom of your site. 6 Version: 1. 7.26 Version: 1.8.0 7 7 Author: Phil Baylog 8 8 Author URI: https://quickiebar.com … … 17 17 18 18 global $QB_VERSION; 19 $QB_VERSION = '1. 7.2';19 $QB_VERSION = '1.8.0'; 20 20 21 21 class QuickieBar{ … … 75 75 76 76 //If user is activating the plugin for the first time 77 if(!get_option('QB_VERSION') && !quickiebar()->is_ajax_call() ){77 if(!get_option('QB_VERSION') && !quickiebar()->is_ajax_call() && is_admin()){ 78 78 79 79 $settings_url = admin_url('admin.php?page=quickiebar'); … … 193 193 if(!get_option('qb_bar_zindex')){ 194 194 update_option('qb_bar_zindex', '100'); 195 } 196 197 //New options with 1.8.0 198 if(!get_option('qb_custom_post_type_visibility')){ 199 update_option('qb_custom_post_type_visibility', 'hide'); 195 200 } 196 201 … … 390 395 return true; 391 396 } 392 else if($visibility == 'postsonly' && is_sing le()){397 else if($visibility == 'postsonly' && is_singular('post')){ 393 398 return true; 394 399 } … … 428 433 429 434 } 430 else if(is_sing le()){435 else if(is_singular('post')){ 431 436 432 437 $post_id = get_the_ID(); … … 505 510 506 511 } 512 else if(is_singular() && !is_singular('post') && !is_page() && !is_attachment()){ 513 //custom post type 514 515 $custom_post_type_visibility = get_option('qb_custom_post_type_visibility'); 516 517 if($custom_post_type_visibility == 'show'){ 518 return true; 519 } 520 else{ 521 return false; 522 } 523 } 507 524 else{ 508 525 //no idea what kind of page/post/archive/category this is... -
quickiebar/trunk/readme.txt
r1231663 r1247977 5 5 Donate Link: https://quickiebar.com/pricing 6 6 Tested up to: 4.3.0 7 Stable tag: 1. 7.27 Stable tag: 1.8.0 8 8 License: GPLv2 9 9 … … 134 134 == Changelog == 135 135 136 = 1.8.0 | Sep 15, 2015 = 137 * Feature: Visibility for custom post types can now be togged on or off 138 * Fix: Fixed bug which caused QuickieBar welcome message to be displayed by mistake 139 136 140 = 1.7.2 | Aug 26, 2015 = 137 141 * Tweak: Added background styling to "wrap" class in QuickieBar to prevent some theme styles from affecting bar styles
Note: See TracChangeset
for help on using the changeset viewer.