WordPress.org

Support

Support » Plugins and Hacks » Proper way to filter capabilities?

Proper way to filter capabilities?

  • I’m struggling a little with the proper/best way to filter capabilities.

    For the sake of discussion, how would I prevent Site Admins from switching the theme unless it’s currently Monday.

    I’m thinking I need to add a filter to user_has_cap / current_user_can, and inside that function, do my logic about what day of the week it currently is.

    Any ideas?

  • The topic ‘Proper way to filter capabilities?’ is closed to new replies.