1148 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
fillerspace says

For clients I host, I want to try a new way of charging them, based on an average of how many users are logged in at any given time (the idea is that logged-out users get a Varnish cached version, which is cheaper to serve, logged in users hit the server directly). Of course, since WordPress only tracks logins using a cookie, I’d have to use a plugin to track this. I found a plugin that tracks how many users are logged in using a db table. When a user logs in, this is recorded, and when they log out, it’s recorded. But this is useless if clients can disable the plugin. Is it possible to create a separate plugin directory that WordPress would also scan, but that users wouldn’t be able to see? I suppose I would also have to make it so they could not deactivate the plugin in the admin either.

Any ideas?

2061 posts
  • Has collected 50+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in United States
Landonw says

Hard code it into WordPress.

1045 posts Best-dressed man at PressNomics 2013
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Power Elite Author: Sold more than $1M on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
+10 more
Parallelus says
LandonWilson said
Hard code it into WordPress.

That’s a good idea, code it directly into the core and they can’t disable it.

122 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
+2 more
jayjdk says

Put the plugin file in wp-content/mu-plugins (create it if it doesn’t exists). It stands for “must-use” plugins. Any code (plugin) placed in the folder is run automatically

1148 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
fillerspace says
jayjdk said
Put the plugin file in wp-content/mu-plugins (create it if it doesn’t exists). It stands for “must-use” plugins. Any code (plugin) placed in the folder is run automatically

That might work perfectly. I’ll give it a try. I guess I could always hack the core if that doesn’t work, but that would be a hassle every time there’s an upgrade. The must use folder sounds like a winner. Thank everybody for the ideas!

1148 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
fillerspace says

Update: the mu-plugins folder works like a charm. I had no idea this existed. So any plugin here is automatically included and activated, but it doesn’t show up in the plugin list. Brilliant!

by
by
by
by
by
by