Adding a missing function definition
Using the VS Code Intelephense Extension.
You get a squiggly line under a function you know exists.
![](https://toggen.com.au/wp-content/uploads/2020/06/mailparse.png)
When you hover over it the popup says “Undefined function … “
![](https://toggen.com.au/wp-content/uploads/2020/06/undefined-function-1024x149.png)
Go to Preferences and Settings [ Ctrl + , ], search for stubs and scroll to the bottom of the Extensions => intelephense stubs screen and click Add item. Enter the name of the extension and click OK
![](https://toggen.com.au/wp-content/uploads/2020/06/stubs-add-1.png)
To find the name to add you need to find the extension that the function comes from and have a look at the name
![](https://toggen.com.au/wp-content/uploads/2020/06/extension_name.png)
WordPress Stubs
If you are developing a WordPress plugin and missing the WordPress core function definitions add wordpress
to the stubs list.
![](https://toggen.com.au/wp-content/uploads/2020/08/Screenshot-from-2020-08-18-11-42-29.png)
0 Comments