Update While this article details my exploration in recreating the WordPress sanitize_title() behavior in JavaScript, since it was originally written WordPress core has added cleanForSlug(), which is part of the npm package @wordpress/url. I recommend using cleanForSlug() over this code. I was working on a project where I needed the functionality provided by the WordPress […]
WordPress Plugin
Why I prefer CMB2 over ACF
When working in WordPress, it is common to extend the platform with Custom Fields that go beyond the default functionality. Two popular choices are Advanced Custom Fields (ACF) and CMB2. My Preference My personal preference is CMB2. At the same time, there are many developers I know and respect who prefer ACF and use it […]
CMB2 Dependency with Composer
Here is the short answer for how I installed CMB2 as a dependency with Composer for my plugin.
Modify Comment Parent WordPress Plugin
This WordPress plugin allows you to modify the comment parent for a given comment. Why Would One Need This? Sometimes when replying to a comment, I fail to reply and instead create a new comment. This prevents the comment thread from displaying properly. In the past, I’ve fixed this directly in the database. This plugin, […]
Move Toolset Metabox Above WYSIWYG Editor
I recently had a request to move a WordPress custom metabox created with the Toolset Types plugin above the WYSIWYG Editor (a.k.a. Visual Editor). While this seems like a simple request, as so often happens in programming this was more complex than expected. The Solution The solution is to check the global variable $wp_meta_boxes early […]
Yoast SEO Eliminate Notifications
I am a huge fan of the WordPress plugin Yoast SEO, however I’m not a big fan of the notifications it includes. Leveraging the power of WordPress filters, we can suppress these messages. The following information is based on Yoast SEO 3.2.3 and may not be accurate for other versions. The Notifications to Eliminate There […]
SemVer for WordPress Plugins
I’m a big fan of Semantic Versioning, where each version is made up of three numbers: major version minor version patch (a.k.a. bug fix) version I’ve found there are some nuances when maintaining a WordPress plugin and maintaining SemVer for it. Here are some notes to help. Major Version Increment Anytime the plugin makes breaking […]
Increase “Tested up to” Value for WordPress Plugin
For the purpose of this exercise, I’m going to update the Tested up to value for my Stop Emails plugin, without creating a new release. Get Your Subversion Repository URL This URL is available on the Developers tab of your plugin on wordpress.org in the Subversion Repository link. In my case, the url is http://plugins.svn.wordpress.org/stop-emails/. […]
Loading a Private WordPress Plugin with Composer
Previously, I described my process in loading WordPress.org plugins via composer, however, a number of plugins I use are private plugins (either because they are commercial plugins I’ve purchased or internal plugins I’ve written). One can use composer to load these plugins by doing two things: Create a repository for the plugin (this can be […]
Composer WordPress.org Plugins
I’ve recently been introduced to managing WordPress.org plugins via Composer. This makes it more convenient when excluding plugins from your working repository. Composer is capable of doing far more than managing plugins but at this point, that is the extent of how I’m using it. This allows me to exclude my plugins via .gitignore yet […]