Changeset 974792
- Timestamp:
- 08/28/2014 05:52:14 PM (12 years ago)
- Location:
- sitewide-message/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
sitewide-message.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sitewide-message/trunk/readme.txt
r970978 r974792 37 37 == Changelog == 38 38 39 = 0.6 = 40 * New Feature - Hide Message for Logged in Users 41 39 42 = 0.5 = 40 43 * Bug Fixes -
sitewide-message/trunk/sitewide-message.php
r970976 r974792 6 6 Author: ThatBlogger 7 7 Author URI: http://thatblogger.co/ 8 Version: 0. 58 Version: 0.6 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 118 118 <?php $ischecked = ($options['status'] == "1" ? "checked" : ""); ?> 119 119 <?php $schedule_statusischecked = ($options['schedule_status'] == "1" ? "checked" : ""); ?> 120 <?php $hide_adminischecked = ($options['hide_admin'] == "1" ? "checked" : ""); ?> 120 121 121 122 <?php $checkbgcol = ($options['bgcol'] == NULL ? "#ff3233" : $options['bgcol']); ?> … … 161 162 <th scope="row">Message Text Colour</th> 162 163 <td><input type="text" name="tb_msg_settings[txtcol]" value="<?php esc_attr_e($checktxtcol); ?>" class="regular-text colorfield" data-default-color="#ffffff" /></td> 164 </tr> 165 166 <tr valign="top"> 167 <th scope="row">Hide When Logged In?</th> 168 <td><input name="tb_msg_settings[hide_admin]" type="checkbox" id="tb_msg_settings[hide_admin]" value="1" <?php esc_attr_e($hide_adminischecked); ?> /></td> 163 169 </tr> 164 170 </table> … … 256 262 257 263 function showMessage($nurl, $linkloc, $text){ 264 $options = get_option('tb_msg_settings'); 265 if($options['hide_admin'] == 1){ 266 if(is_user_logged_in()){ 267 return; 268 } 269 } 270 258 271 return "<div class=\"tb_notification_bar tb_fadeInDown\"><div class=\"tb_inner_bar\"><span class=\"tb_specific_text\"><a href=\"".$nurl."\" target=\"".$linkloc."\">".$text."</a></span></div></div>"; 259 272 } … … 266 279 $options = get_option('tb_msg_settings'); 267 280 if($options['status']){ 281 282 if($options['hide_admin'] == 1){ 283 if(is_user_logged_in()){ 284 return $classes; 285 } 286 } 287 268 288 // Check against date stuff 269 289 if($options['schedule_status']){
Note: See TracChangeset
for help on using the changeset viewer.