voltronik on "[Plugin: Better Notifications for WordPress] Role Change Notification"

ساخت وبلاگ

Hi socialman,
Thanks for clarifying.

Just so you know, the database and WordPress are essentially two separate things. WordPress interacts with the database but if changes are made in the database, WordPress has no real way of knowing what has changed. What BNFW does is uses the hooks that WordPress provides that inform it of when something is happening. In the situation of User Role Changes, there is a hook called set_user_role which I can use to know when a user's role has changed. Other plugins might have their own way of detecting these changes through new hooks that they've added. If the s2member plugin has one of these, I should be able to use it but haven't found any information on that if there is one. Unfortunately, the popular Members plugin, which allows multiple user roles to be selected for each user, won't work with the notification that I'm trying to add because it doesn't use the above hook and doesn't seem to provide it's own.

I have the part working where using the standard WordPress method of changing a user's role, i.e. going to Profile > User > Changing their use role. I'll include it in an update of the plugin shortly.

Hope this helps.

Thanks,
Jack

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 71 تاريخ : سه شنبه 14 ارديبهشت 1395 ساعت: 15:32