At the September clinic there were a couple of replies to the question posed in the meetup “Do you have a WordPress problem to solve?” We may not have addressed these properly. Here’s an attempt to correct that for these two responses.
- What PHP code editor do you use?
- Advice on plugin development
Question: What PHP code editor do you use?
I want to migrate away from DreamWeaver. I need built-in ftp and am currently looking at Netbeans.
Answers: Not Netbeans. Several use PHPStorm. You have to buy a licence and if you want to keep it up to date then you have to renew it each year. If you don’t renew it at least you have a perpetual licence for the version purchased. Attend PHPHants and you might win a licence in the monthly draw.
Others use Visual Studio Code – VSCode, which is free and available for Windows, macOS and Linux.
Christopher Churchill shared a number of useful links related to VSCode:
Source Code for VSCode
Platform VSCode is built on
Making the code terminal command available for MacOS
Learn more about Intellisense
Intelephense – Highly recommend this one for WordPress Development, more why further down
WordPress Stubs for intelephense
Got a plugin that you need stubs for? Generate them yourself
Ligatures in Fonts for developing is awesome, give it a try!
You didn’t know abou Emmet? You’re still typing your HTML by hand? You’re missing out!
Local development made easy and useful
Why doesn’t VSCode close my tags? Not anymore.
Do you get lost with all the brackets and parenthesis and curly brackets? This will make your live easier.
Because sometimes opening the browsers inside VSCode can be helpful
Let’s make my VSCode sexy AF
Where does this css class come from, can I change it real quick? Sure!
I need access to that database to take a quick look at something. Sure, here it is!
Debugging PHP step by step with variable stack peeking is easy.
Just install this and activate it for WordPress, autocompletion for WP on Steroids:
Hey you PHP code, smile! Nice screenshot!
I’m too sexy for my code, too sexy for my code, so sexy it hurts…
Make HTTP requests like with Postman but simpler and without leaving VSCode? There’s an extension for that.
Make code edits directly on the clients server, back it up, sync it, all with this awesome extension.
Make code is great, what are you talking about? No, it’s not, this will tell you how to fix it!
Take notes inside the code and have them listed all in the same place? Sure!
Measure how much time you dedicate to each project, efficiently
Question: Advice on plugin development
Need advice on books and methods to start developing simple plugins as an entry into the development world of WordPress.
Answer: Introduction to Plugin Development
WordPress plugins can be as simple or as complicated as you need them to be, depending on what you want to do. The simplest plugin is a single PHP file. The Hello Dolly plugin is an example of such a plugin. The plugin PHP file just needs a Plugin Header, a couple of PHP functions, and some hooks to attach your functions to.
While these books may now be out of date, my versions were written 11 years ago, they do cover all the basics of the PHP side of WordPress.
Visit developer.wordpress.org for Developer Resources including
- Code Reference
- Coding Standards
- Block Editor
- Common APIs
- REST API
- Intro to WordPress Core Development
- Local Development Environment
Visit learn.wordpress.org for Learn WordPress
- Lesson Plans
Learn WordPress is being populated. Visit it regularly to see what’s there.