I’m excited to see that our #2019AWPCHALLENGE is going strong. The entries we’ve been getting are showcasing how many highly skilled developers we have in AWP, and encouraging those who are growing quickly to share and get great feedback on their projects.
This round of submissions I think is summed up well with: “Learning by Doing”. Whether it’s a simple snippet, or building tools for others to learn from, these posts contribute great value to any dev’s arsenal. Let’s jump in.
NOTE: AWP members can click on the image links to see the original posts which have much more detail and great conversations. Another reason to join if you haven’t already
Extending WP-Admin JS Objects
Sometimes the cleanest code you can build in plugins and themes is the code that extends existing WordPress Core functions and objects. Ty Bailey wanted to dig into available tools in wp-admin and working out how to set primary categories helped him dig into that. He said:
It’s not yet Gutenberg compatible, so don’t install this on a live site, but Ty would love your feedback on the post or on his Github repo.
SlotFill in Gutenberg
Gutenberg exposes all kinds of new development practices for WordPress developers. AWP Member Ryan Welcher — a Lead Web Engineer at 10up, dropped by to share his experiments with the slotFill pattern in WordPress. Personally, I had to look this up to grasp what’s going on. The Gutenberg handbook describes this as:
Slot and Fill are a pair of components which enable developers to render elsewhere in a React element tree, a pattern often referred to as “portal” rendering. It is a pattern for component extensibility, where a single Slot may be occupied by an indeterminate number of Fills elsewhere in the application.
Featured Posts on Term Archive Pages
Personally, I’ve often struggled with extending the Terms and Category admin pages and fields. Russell tackles them with a nice JS-based UI for adding “featured posts” to your Term Archive pages. It’s a unique approach for specific needs that I’m sure plenty content-driven websites could find useful.
Check out his Github repo here.
Lighting Round on Going Deep with Debug Logging
Kevin Hoffman returns to the AWP Challenge with a succinct but thorough post on the reason for debug logging and how to take it to the next level. Kevin breaks it down like this:
When developing functionality based on AJAX requests, cron jobs, or other server-side processes, it can be difficult to understand when a problem occurs because there is no error printed on screen. This is where a debug log can become your window into the server-side process so you can see what’s going wrong.
He walks through the basics of debugging logging in WordPress, but then introduces iTerm2 Triggers. He explains that:
iTerm2 users can set up triggers to be alerted when a certain string is detected in the terminal window. A trigger action can be a subtle bell sound or a more in-your-face notification with a customizable message.
Kevin’s post sparked some good conversation on how others do debug logging as well.
By far the most popular post of this round was Eric Greenfield’s Ignition Press starter theme. Several users were eager to give it a spin and commented later how nice it is. Eric highlighted it’s main features as:
With sass, postCSS, really cool ACF fields, easy scroll animations and a CSS grid it doesn’t get better!
Check out the website, and the Github repo. Who doesn’t love a free starter theme to play with on a weekend!?
Deleting Local and Remote Github Branches
Last but certainly not least is AWP Admin Ahmad Awais. Ahmad is prolific for sharing his open source projects and being a very energetic and eager educator on all things best practices and open source.
This post was a very deep dive into a routine part of devlife. Ahmad wants to make your life easier by deleting both local and remote Github branches in “one go”. His post came full with:
- A detailed (and emoji-filled) walkthrough
- A Youtube video (below)
- Code Example
What are You Learning?
We’re just starting this challenge — we’re going to going strong all year long. So get your snippets, articles, or fullsite projects ready to share. Subscribe to our blog to get notifications of more of these roundups in the future. If you’re already an AWP member, start working on your AWPChallenge for this week for us to include in the round up next week. If you’re not a member, why not!? Join today.
Subscribe for AWP Updates
Featured Image Photo by Markus Spiske temporausch.com from Pexels
Matt is Partner and Head of Support and Outreach at GiveWP.com and Impress.org. He is the author of several popular free plugins, the Lead Organizer of the Advanced WordPress Facebook group (which boasts over 30K members), and blogs occasionally at his personal site mattcromwell.com about WordPress, Family life, and Religion and Politics.