So I needed a notification bar to warn users that they were not logged in. This plugin was useful but it didnt have an option to hide the bar for logged-in users. So I edited it to add this functionality:
diff -rupN wordpress-notification-bar/inc/class-plugin.php wordpress-notification-bar-patched/inc/class-plugin.php
--- wordpress-notification-bar/inc/class-plugin.php 2016-08-20 20:44:25.000000000 +0530
+++ wordpress-notification-bar-patched/inc/class-plugin.php 2016-08-20 20:42:23.000000000 +0530
@@ -30,6 +30,15 @@ class SeedProd_WordPress_Notification_Ba
}
function render_notification_bar($hook){
+ /* Code added by Joel G Mathew, to disable notification bar if user is logged in\
+
+ // We need to disable in this function.
+ // Dont show bar if user is logged in
+ if ( is_user_logged_in() ) {
+ return false;
+ }
+ */
+
global $seed_wnb;
$options = $seed_wnb->get_options();
You can patch with patch -1
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.