profile

Hi! I'm Josh.

I wrote a new book Refactoring WordPress Plugins: Part 1

Published 11 months ago • 1 min read

👋 Hi Everyone. I'm back from my time off and have some new stuff ready to go.

Earlier this year I wrote about my plans to pivot Plugin Machine. The two big new ideas that I talked about were mini-courses or eBooks and a membership. The first eBook I wrote was soft-launched this week. It is completed and on sale on my site. I am still tweaking things and will announce and publish it on Gumroad next week. You can purchase this book standalone or as part of a site membership.​

I will be publishing a blog post about the book and membership site next week. I appreciate you sharing it on social media if you see it.

🌱 Refactoring WordPress Plugins: Part 1

My first eBook about WordPress development in a while is for experienced WordPress developers who are looking to improve the PHP in their plugins, use new modern best practices and adopt test-driven development.

I asked Jonathan Bossenger, who works at Automattic as a full-time contributor to the WordPress project, working with the Training team on Learn WordPress. Here is part of his review:

Josh has taken a complex topic and broken it down in such an accessible way, that I doubt any developer of any level would get to the end of the book and not understand what's happening. His use of real-world examples of code he's written for production helps the reader follow the process: from quickly hacking together some code to solve a problem, to refactoring it for prime time.

It's a short book that should take about an hour to read, aimed at experienced WordPress developers. This book focuses on PHP: writing tests, making code reusable, and refactoring singletons. Part 2 will cover converting shortcodes to blocks and admin-ajax to Rest API or GraphQL.

  • How to remove singletons
  • Code examples based on plugins I’m working on now. Often with links to pull requests.
  • How to write tests with phpunit for WordPress plugins
  • How to make your plugin easier to extend by third-party developers
  • Pictures of my dog, also flowers.

🌵 Early Access Discount

I am calling this a soft launch as I'm still tweaking the content and figuring out the business model. If you would like to purchase the book now, you can buy it here:​
​
https://pluginmachine.com/course/refactoring-wordpress-plugins/ You can use the discount code PMBOOK1EARLY to save $10.

🌳 Membership Plans

Members will be able to download eBooks, read in-progress content, as well as the ability to request code samples. This is running on the site now, using a new membership plugin I wrote this week. The code sample request feature is not live yet, but members can email me.

  • Access To All eBooks
  • Request New Code Samples
  • Early Access To Content

Join the site here: https://pluginmachine.com/learn/​

🌱🌵🌲,

Josh

​

Hi! I'm Josh.

Josh Pollock

I write a newsletter about PHP and JavaScript development with WordPress, Laravel and React

Read more from Hi! I'm Josh.

🌱I Pressed The Published Button Last week I sent y'all a message about my upcoming Refactoring WordPress Plugins. I uploaded A version 1.0.0 and pressed publish on everything after finishing up work today. i wanted these books to be useful but also fun. I have been working on this eBook and rebuilding the website as a side project for a while now. I've also been working a lot less. I'm also walking the dog more and the book contains photos of flowers and my dog. I hope if you choose to read...

10 months ago • 1 min read

Hi! Isn't the intro to a newsletter trying to be all personal always so awkward? Maybe that's just me. Anyway, I wrote some posts about building stuff with AI, using TypeScript and started working on an open-source app with it. 🌱Why LangChain? Last summer I started playing with HuggingFace, but was super busy with actual work to write Python for a side project, since I don't really know Python. Then I started actually building stuff with the openai-php client, including the API server for my...

almost 1 year ago • 2 min read

🌱 Stuff I've Written Recently Using React's useEffect In WordPress In the last newsletter, I mentioned a post about creating reusable React hooks. Since then I wrote a new post about how to use the useEffect hook in WordPress. This post has several examples of using that hook -- to load WordPress posts via API and to remove admin notices from wp-admin. I also explained how to use the hook to manage pagination, as an example of how the dependencies argument works. I would appreciate if you...

about 1 year ago • 1 min read
Share this post