Open JoryHogeveen opened 4 years ago
@bonny
Viewing the above, what do you think about me adding an integration addon as a PR to your plugin? I'll make sure it's all based on WP actions so it doesn't have to rely on classnames etc.
Also, just an idea. What do you think about (optionally) adding a "switched from" status to other logs when a user does things while switched to another user?
Cheers, Jory
Hi @JoryHogeveen ! A PR would definitely be nice, support for View Admin As would benefit users that use both our plugins.
The "swithed from" is a nice idea, I never though of that when I added support for User Switching. Not sure right now how that would be displayed however. If you have any ideas let me know.
Awesome, I'll think about the "switched from" implementation and do some testing. Cheers!
@bonny
I also think these type of loggers should be opt-in, agreed? Related: https://github.com/bonny/WordPress-Simple-History/issues/204
Especially the "switched from" part. I can imagine both pro and con's for these type of logs.
@bonny
Found a bottleneck while testing. View Admin As makes all changes really early in WP load time (first prio on plugins_loaded
). At that point the loggers aren't available yet.
Any suggestions to how I could get around that?
Cheers, Jory
@bonny
I've tried several ways without modifying your plugin but it's currently impossible to make our plugins compatible.
View Admin As hangles view changes very early-on in the WP hooks and it directly returns AJAX data after that.
Because of this the after_setup_theme
hook is never fired and this the loggers aren't loaded.
There will be some changes required to your plugin as well to make this compatible. I'll make a PR for you to review.
Cheers, Jory
Request: https://wordpress.org/support/topic/simple-history-integration/ https://wordpress.org/plugins/simple-history/
Requirements:
vaa_view_admin_as_update_view
: https://github.com/JoryHogeveen/view-admin-as/commit/c1c2ebd5f1c638a18525bc9f501b30538ff268c5vaa_view_admin_as_reset_view
: https://github.com/JoryHogeveen/view-admin-as/commit/6df0f836264b42c8bb132618311ead330ace2344vaa_view_admin_as_cleanup_views
: https://github.com/JoryHogeveen/view-admin-as/commit/c3b91661078df19d405ed4d350ca46d7ea529038vaa_view_admin_as_reset_all_views
: https://github.com/JoryHogeveen/view-admin-as/commit/98cfb0f039934da937b2aa7874e43208a4f041d8Example addon: https://github.com/bonny/WordPress-Simple-History/blob/master/loggers/PluginUserSwitchingLogger.php
Required PR: https://github.com/bonny/WordPress-Simple-History/pull/227