mychances
Member
Posted 3 years ago #
I'd like to modify just one function in capabilities.php. Specifically, I intend to modify the function "has_cap".
I don't want to modify capabilities.php directly, since by doing so, every upgrade will break my wordpress modifications. Is there a way to modify the functions in capabilities.php via plugin, or by any other way that won't break during an upgrade?
Can you do it via the functions.php file in your theme? I think that's loaded after the core functions, or at least that's my guess -- I've done a handful of additional functions in my theme that modify existing ones.
Well, more precisely: I've copied the function from the core, changed it to suit me, gave it a different name, and then called that function instead. Not sure if that'd work for whatever you're trying to do.