WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

need to customise a plugin function but would rather not edit the plugin itself so updates wont remove the custom changes.

function iss in a class called UserAccessManager and the function is;

public function showGroupMembership($link, $postId)
    $uamAccessHandler = &$this->getAccessHandler();
    $groups = $uamAccessHandler->getUserGroupsForObject('post', $postId);

    if (count($groups) > 0) {
        $link .= ' | '.TXT_UAM_ASSIGNED_GROUPS.': ';

        foreach ($groups as $group) {
            $link .= $group->getGroupName().', ';

        $link = rtrim($link, ', ');

    return $link;

is this possible? OR can i affect it with a filter?

Any help appreciated! Dc.

share|improve this question
Exactly what you want to edit in this code? – Mamaduka Aug 23 '11 at 16:33
wanted it to stop adding the text to my edit the post output which it laches onto... – daniel Crabbe Aug 23 '11 at 16:55
up vote 0 down vote accepted

I'm afraid you cannot alter the output of this function unless you directly modify the plugin code. The plugin author hasn't given you any filter to use.

So what can you do about it?

  1. Continue to alter the plugin file and update each time the plugin updates.
  2. Ask the plugin author nicely to add a filter to this function.
  3. Make a fork of the plugin.
share|improve this answer
ah - ok well thanks for your input. Will make a fork of it... – daniel Crabbe Aug 23 '11 at 16:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.