WordPress.org

Support

Support » Plugins and Hacks » Modifying functions within capabilities.php – possible via plugin?

Modifying functions within capabilities.php – possible via plugin?

  • 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?

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Modifying functions within capabilities.php – possible via plugin?’ is closed to new replies.
Skip to toolbar