Bird
0
0

Which function is used to add a new user role in WordPress?

easy📝 Syntax Q12 of 15
Wordpress - WordPress Settings and Configuration
Which function is used to add a new user role in WordPress?
Aadd_user_role()
Badd_role()
Ccreate_role()
Dnew_role()
Step-by-Step Solution
Solution:
  1. Step 1: Recall WordPress role functions

    The correct function to add a new role is add_role().
  2. Step 2: Verify function names

    Other options like add_user_role() or create_role() do not exist in WordPress core.
  3. Final Answer:

    add_role() -> Option B
  4. Quick Check:

    Adding roles = add_role() [OK]
Quick Trick: Use add_role() to create new roles [OK]
Common Mistakes:
  • Using add_user_role() which is not a WordPress function
  • Confusing with create_role() or new_role()
  • Trying to add roles without this function

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes