Changeset 1414536
- Timestamp:
- 05/11/2016 09:52:09 AM (10 years ago)
- Location:
- toggleable-admin-bar/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
toggleable-admin-bar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
toggleable-admin-bar/trunk/readme.txt
r1373714 r1414536 41 41 = 1.2 = 42 42 * Fixed responsive styles + no-js styles. 43 44 = 1.3 = 45 * Moved JS to footer to eliminate render blocking. -
toggleable-admin-bar/trunk/toggleable-admin-bar.php
r1373704 r1414536 5 5 Description: Allows you to toggle the admin bar on the front end. Useful for websites with fixed positioned elements, as the admin bar can get in the way. Now has quick-links. 6 6 Author: Michael Smyth 7 Version: 1. 27 Version: 1.3 8 8 Author URI: http://www.michaelsmyth.co.uk 9 9 */ … … 174 174 } 175 175 </style> 176 <?php 177 } 178 } 179 180 function toggleable_admin_bar_js() { 181 182 if ( is_user_logged_in() && is_admin_bar_showing() ) { 183 ?> 176 184 <script type="text/javascript"> 177 185 jQuery(document).ready(function() { … … 186 194 } 187 195 188 add_action( 'wp_footer', 'toggleable_admin_bar', 100 ); 196 add_action( 'wp_head', 'toggleable_admin_bar', 100 ); 197 add_action( 'wp_footer', 'toggleable_admin_bar_js', 100 ); 189 198 add_action( 'get_header', 'remove_admin_margin' ); 190 199 ?>
Note: See TracChangeset
for help on using the changeset viewer.