This is my new answer to, “What’s your favorite relatively unknown part of Core?” (Previously, it was the declaration of human rights embedded into has_cap() .) It turns out there’s a much better way to fetch post meta than get_post_meta() : It’s really that simple. Behind the scenes, the reference to $post->foo is handled by WP_Post‘s magic getter , which in turn calls get_post_meta( $post->ID, ‘foo’, true… [more]
Unfortunately, the WordPress.org plugin repository doesn’t provide a way to maintain your plugin with Git. In the past, I’ve either just used Subversion, or hosted an extra copy on GitHub, and setup Git and SVN side-by-side in the same directory . Awhile ago, I briefly considered using git-svn , because it would allow me to avoid using Subversion entirely, and do everything through Git. I dismissed the idea,… [more]
I wanted to find out which sites in a Multisite network had a certain plugin active, but couldn’t find an existing solution I was happy with. So, I wrote a WP-CLI command to do the job. Installation wp package install iandunn/wp-cli-plugin-active-on-sites Usage wp plugin active-on-sites Example > wp plugin active-on-sites eu-cookie-law-widget Checking each site 100% [======================================] 0:02 / 0:03… [more]
I wanted to update the database prefix one this site, but most of the tutorials out there have you do it manually. There are some plugins available, but I didn’t trust most of them, and the ones that I did were kind of bloated with other features, and I didn’t want to mess with the… [more]
We’ve opened the call for speakers for this year’s WordCamp Seattle . Give it a shot if you have any ideas, best practices, use cases, or stories you want to share with the community. I think people are often hesitant to put themselves out there, and that’s definitely understandable, but the WordPress community is really welcoming, and I think you’ll find it’s not as hard as you… [more]
I just finished the first version of a new WordPress installation template called Regolith . I’ve been using my personalized fork of Mark Jaquith’s WordPress Skeleton for the past several years, but recently came across Bedrock and really liked it. I started playing around with it, but quickly discovered that the tools and practices it embraced were a bit overkill for my personal projects, so I… [more]
TL;DR: If you get Symbolic link not allowed or link target not accessible errors, use relative symlinks to avoid permissions issues with absolute symlinks, and generate nested symlinks relative to their actual directories. I ran into some trouble setting up Deployer on Media Temple’s Grid service, and it took me awhile to find out the answer, so I figured… [more]