wpdever
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Notification Bell] Option to remove/clear notificationsHi,
Thanks for sharing the solution to hide old notifications. You can use the ‘wnbell_notification_conditions’ filter hook to make changes in your functions.php file instead of modifying the code:
add_filter('wnbell_notification_conditions','add_notification_conditions',10); function add_notification_conditions(){ $registered = date('Y-m-d H:i:s', strtotime($udata->user_registered)); $local_registered = get_date_from_gmt( $registered, 'Y-m-d H:i:s' ); $query =" AND posts.post_date > '$registered' "; return $query; }I was not able to reproduce the notification order issue. Notifications use the ‘post_date’ in the posts table which should be the publish date. Also, when I follow the steps, “First post” is the first notification in the list.
Is it possible you could have some code that changes the post_date value for some reason?Hi,
The css class for the dot/menu is ‘wnbell-count-menu’ (I’m unsure I understand how you’d use it though).
You can maybe use the ‘wnbell_count_notifications’ filter hook (for logged in users) or the ‘wnbell_conditions_visitor_count’ filter hook (for guests) to change the sql query in your functions.php file to add conditions based on the category.
Forum: Plugins
In reply to: [WP Notification Bell] Show Custom Post TypesHi,
There’s a ‘Recipient role’ dropdown field in the metabox in the ‘add new’ post editor. But there’s no way currently to select a user role for notifications created automatically. I’ll try to add that in the next update.
Forum: Plugins
In reply to: [WP Notification Bell] Target linksHi,
Thanks for your suggestion. I’ll add this option in the next update.
Forum: Plugins
In reply to: [WP Notification Bell] Responsive CSS issueHi,
The same ids and classes used in desktop should work on smaller screen with @media.
Can you share some of what you did in both?
Also, maybe you want to test a different max-width?Forum: Plugins
In reply to: [WP Notification Bell] Option to remove/clear notificationsHi,
About the issue of the seen_posts array, the “wnbell_seen_notification_post” should store 20 ids so I’m not sure why it’s only storing 7. But regardless, it might be better to create your own user_meta instead of “wnbell_seen_notification_post” to have better control over it (particularly since this one is updated when the link is clicked while you need to update your value when the clear button is clicked).
About old notifications, the count on the bell is set to 1 if 1 or many notifications already exist when the user creates an account, but they can see all notifications since some sites might want to show older notifications (older posts, calls to subscribe to a newsletter… ). It would suit most use cases I believe.
Also, since you mention a large number of notifications, you might want to delete older ones (from a few months ago…) manually to reduce the cost on your servers (and since users might not need to see those).Hi,
I’ve just released an update to allow spaces in the usernames. Let me know if it fixes your problem.
Forum: Plugins
In reply to: [WP Notification Bell] Bell triggeredHi,
For now, this is the most basic behavior that would suit most types of use cases (some sites might want to immediately grab the user’s attention even if they do not end up scrolling).
If I do get more requests of this type, I can consider adding it to the list of features to implement in the future.
Forum: Plugins
In reply to: [WP Notification Bell] Option to remove/clear notificationsHi,
I’ve added the css class “wnbell_user_item” in the latest update to style user notifications.
This hook “wnbell_notification_conditions” only works with the default/post/cpt notifications, instead there’s this code that deletes comment notifications after they were viewed by the user, you can modify it to work with the delete button, and add it to your theme’s functions.php file or a custom plugin:
add_action(‘wnbell_add_unseen’, ‘delete_seen_callback’,11,1); function delete_seen_callback($notification_id){ $current_user_id = get_current_user_id(); $user_meta_field = ‘wnbell_unseen_comments’; $unseen_array = get_user_meta($current_user_id, $user_meta_field, true); if (!$unseen_array) { $unseen_array=array(); } foreach($unseen_array as $key=>$notification){ if($notification[‘type’]===’cfc’ && $notification[‘comment_id’]==$notification_id){ //unset unset($unseen_array[$key]); } } update_user_meta($current_user_id, ‘wnbell_unseen_comments’, $unseen_array); }Forum: Plugins
In reply to: [WP Notification Bell] Replace bell iconHi,
If you’ve updated to the latest version of the plugin, you can add this to your theme’s functions.php file:
add_filter('wnbell_bell_icon', 'new_wnbell_icon'); function new_wnbell_icon() { $icon = '<img src="https://www.educaenvivo.com/wp-content/uploads/2022/01/icons8-facebook.svg" alt="facebook test">'; return $icon; }I’d love to hear your suggestions. You can contact me here if you want to share more: [email protected]
Forum: Plugins
In reply to: [WP Notification Bell] Replace bell iconI’ll add a hook in the next update so you can add the code in your theme’s functions.php file.
Forum: Plugins
In reply to: [WP Notification Bell] Replace bell iconHi,
Could maybe try with this:
<img src="https://www.educaenvivo.com/wp-content/uploads/2022/01/icons8-facebook.svg" alt="facebook test">Forum: Plugins
In reply to: [WP Notification Bell] Replace bell iconWhat custom image do you want to use? Does it have the same problem as the font awesome icons?
Forum: Plugins
In reply to: [WP Notification Bell] Replace bell iconHi,
In the website url that you sent, I don’t see any sign of the bell in the source code. Did you remove it from that page? Or maybe you’re using the shortcode for logged-in users?
Forum: Plugins
In reply to: [WP Notification Bell] Replace bell iconHi,
Which display option are you using (add bell icon to menu, shortcode, floating bell…) ?
Also, can you test fas instead of the first fa in class:<i class="fas fa-bars">