Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTrigger missing hooks when granting or revoking super admin permissions #20
Conversation
|
Logic seems not sound yet. Tests throw a notice on line 210 (https://github.com/wp-cli/super-admin-command/pull/20/files#diff-d6a2d26b46771bf2fec60753e981f488R210) because it wants to trigger a |
|
I'll get back to this soon, to fix the issues. |
|
@felixarntz Still planning to pick this up? |
|
@felixarntz Are you still up for this? |
|
@schlessera I don't have enough capabilities at the moment, but generally yes. I'll make a note to come back to it at some point the next month. |
|
Just a gentle ping to see if you're still up for this, @felixarntz... :) |
|
@schlessera Thanks for reminding me. It's not a big one, but I'll need a bit more time to tackle this. Should be able to between Christmas and New Years. :) |
|
@felixarntz, a fresh ping for the fresh year... ;) |
|
@schlessera Ah totally forgot about this, sorry. At the moment it's unlikely I can get to it in foreseeable future. |
felixarntz commentedFeb 14, 2018
When granting or revoking super admin permissions in WordPress, hooks are triggered which are missing in this implementation. By calling
grant_super_admin()orrevoke_super_admin()respectively, the following actions are triggered:grant_super_admin(before changes, always executed)granted_super_admin(after changes, executed only on success)revoke_super_admin(before changes, always executed)revoked_super_admin(after changes, executed only on success)This PR adds the hooks so that plugin functionality integrating with these hooks still works correctly.