Follow up to the September clinic

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.

  1. What PHP code editor do you use?
  2. 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 CodeVSCode, 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
https://github.com/microsoft/vscode

Platform VSCode is built on
https://www.electronjs.org

Official Website
https://code.visualstudio.com/

Making the code terminal command available for MacOS
https://code.visualstudio.com/docs/setup/mac

Learn more about Intellisense
https://code.visualstudio.com/docs/introvideos/intellisense

Intelephense – Highly recommend this one for WordPress Development, more why further down
https://intelephense.com

WordPress Stubs for intelephense
https://github.com/php-stubs/wordpress-stubs

Got a plugin that you need stubs for? Generate them yourself
https://github.com/GiacoCorsiglia/php-stubs-generator

Ligatures in Fonts for developing is awesome, give it a try!
https://github.com/tonsky/FiraCode

You didn’t know abou Emmet? You’re still typing your HTML by hand? You’re missing out!
https://docs.emmet.io/cheat-sheet/

Local development made easy and useful
https://laravel.com/docs/7.x/valet

Why doesn’t VSCode close my tags? Not anymore.
https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag

Do you get lost with all the brackets and parenthesis and curly brackets? This will make your live easier.
https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2

Because sometimes opening the browsers inside VSCode can be helpful
https://marketplace.visualstudio.com/items?itemName=auchenberg.vscode-browser-preview

Let’s make my VSCode sexy AF
https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-community-material-theme
https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme
https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme-icons
https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode

Where does this css class come from, can I change it real quick? Sure!
https://marketplace.visualstudio.com/items?itemName=pranaygp.vscode-css-peek
https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css

I need access to that database to take a quick look at something. Sure, here it is!
https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2

Debugging PHP step by step with variable stack peeking is easy.
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug

Just install this and activate it for WordPress, autocompletion for WP on Steroids:
https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client

Hey you PHP code, smile! Nice screenshot!
https://marketplace.visualstudio.com/items?itemName=pnp.polacode

I’m too sexy for my code, too sexy for my code, so sexy it hurts…
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

Make HTTP requests like with Postman but simpler and without leaving VSCode? There’s an extension for that.
https://marketplace.visualstudio.com/items?itemName=humao.rest-client

Make code edits directly on the clients server, back it up, sync it, all with this awesome extension.
https://marketplace.visualstudio.com/items?itemName=liximomo.sftp

Make code is great, what are you talking about? No, it’s not, this will tell you how to fix it!
https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarlint-vscode

Take notes inside the code and have them listed all in the same place? Sure!
https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree

Measure how much time you dedicate to each project, efficiently
https://marketplace.visualstudio.com/items?itemName=WakaTime.vscode-wakatime

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.

Books

I ( Herb ) started with Professional WordPress Design and Development then Professional WordPress Plugin Development.

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.

Resources

Visit developer.wordpress.org for Developer Resources including

  • Code Reference
  • Coding Standards
  • Block Editor
  • Common APIs
  • Themes
  • Plugins
  • REST API
  • WP-CLI
  • Intro to WordPress Core Development
  • Local Development Environment
  • etc

Visit learn.wordpress.org for Learn WordPress

  • Workshops
  • Courses
  • Lesson Plans

Learn WordPress is being populated. Visit it regularly to see what’s there.