Go To Implementation not recoginsing classes in Wordpress integration.

When using Go to Implementation or Go to Definition in Wordpress `functions.php` file, the following code example works as expected:

```

add_action('after_setup_theme', 'foo');

function foo()
{

}

```

That is, clicking Go to Implementation on 'foo' as the second `add_action()` argument properly goes to the function definition.

 

However, the following does not work as expected:

```

class Abc {

    public static function init() {

        add_action('after_setup_theme', array(__CLASS__, 'foo'));

    }

 

     public static function foo() {

    }

}

Abc::init();

```

That is, clicking Go to Implementation on 'foo' as the second `add_action()` argument properly _does not_ go to the function definition.

2 comments
Avatar
Vladimir Luchansky
Comment actions Permalink

Hello,

It looks like we already have a related issue submitted to our issue tracker here: https://youtrack.jetbrains.com/issue/WI-22825 . You can vote for it in order to move it up in the queue and receive notifications regarding the progress of the feature. See more information on working with tracker at <https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications>.

If you don't feel this matches your case, it would be great if you could submit a separate request here: <http://youtrack.jetbrains.com/issues/WI#newissue=yes>.

0
Comment actions Permalink

Thank you. I believe that the linked issue is not related, so I opened the following issue:

https://youtrack.jetbrains.com/issue/WI-36325

0

Please sign in to leave a comment.