Tagged Questions
1
vote
0answers
55 views
Selectively applying action based on role
I've added an action to my functions.php file that forces a plugin (Content Scheduler) to act on posts, even when it wasn't explicitly enabled by the person writing the post.
I've got that working, ...
6
votes
1answer
1k views
add_role() run only once?
I was surprised to discover that add_role() modifies the database and fails if the role already exists. There are two implications here, one first more serious than the other: 1) if you're in ...
1
vote
2answers
634 views
What action should I hook into when adding roles and capabilities?
I'm going to be using add_role() and $role->add_cap() to set up a new custom role and attach a new capability to existing roles.
I'm wondering where the best place to do this is? Obviously I can do ...