开发者 |
pixelverbieger
khehl |
---|---|
更新时间 | 2024年4月5日 18:20 |
PHP版本: | 5.5 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv2 or later |
/wp-content/plugins/
on your webserver.It's the german word for «login snitch».
In short: you install it, you select a user to receive the notification mails and you're done. If you like to, you can customize the subject and body of the mails. There are placeholders available that you can insert into your template: username, blogname, date and time.
Yes, there's a filter for that. Add the following lines to your (child) theme's functions.php
and customize the array – you can provide usernames, IDs and roles (even mixed) in an array.
add_filter( 'loginpetze_blockers', function ( $ignorelist ) { $ignorelist = array ( 'username', '123', 'administrator' ) ; return $ignorelist; } );
Loginpetze 1.x does not work on Multisite installations, but we intend to add Multisite support to a future version.
Occasionally (especially when setting up websites for clients) we wanted to be notified if – or when – anybody logged in to the staging websites. For this purpose we used to add some lines to our functions.php
files, which was not very comfortable. For conveniance, we turned our code into this plugin.
It was also a good opportunity to learn and to completely play through the process of plugin creation.
Deactivating the plugin will just stop the notification mails. Nothing will happen to your settings (which are stored in the database). However, if you delete the plugin, this will remove your settings from the database. If you then re-install it, the default settings will be applied.
This will also stop the notification mails, but since the uninstall routine is not called, nothing will be removed from your database. If you re-install Loginpetze, your custom settings will still be available.
Loginpetze will warn you about this and you can check your settings. In case this warning is ignored, Loginpetze will automatically switch the recipient to the Standard Blog Admin.
No :)