It took a LOT longer than it should have to build an efficient query for WordPress users today. The query — an WP_User_Query INVERSE search. The list I was trying to generate was based on two things: – All users with a meta_key field ‘account_status’ containing the status ‘active’– EXCLUDE all users with a nicename ending with “at_slp_dot_guru” Turns out this is a LOT more difficult than it should be due to shortcomings in the WP_User_Query class. The solution that … Continue reading “WP_User_Query Inverse (NOT) Search”
Working with Varying Vagrant Vagrants today and having problems spinning up a new box? Don’t blame yourself. It appears that the PHP 7.2 libs… in fact ALL of the PHP libs for Ubuntu Trusty have gone away. The ppa:ondrej/php repository that is cited everywhere has decided it is not going to serve up any PHP code to your Vagrant boxes today. Maybe they’ll fix it soon. Maybe not. If anyone has a workaround please comment here.
As PHP continues its march into the future with improved support for objects, better memory management, and notable performance boosts WordPress seems to be dead-set in sticking to the “must support old technology no matter how bad it is”. As of this writing, on the verge of the much-anticipated WordPress 5.0 release with the almost-modern reactive components interface — the past continues to hamper the technology by insisting on clinging to PHP 5.2 as the baseline version that plugins … Continue reading “WordPress Needs To Abandon PHP 5.2 Compatibility”
Businesses have been hiring programmers for decades now. Back in the 70s it was something only Fortune 100 companies did. Today everyone from your local cafe to full-fledged software companies do it. Unfortunately few now how to hire a programmer. Nearly every-single business outside of the tech sector gets screwed when paying an outside agency to write their apps. If you’ve hired a programmer recently it is very likely you are on that list. If you don’t think you’ve … Continue reading “How To Hire A Programmer”
One of the common processes that runs in Store Locator Plus is deleting locations. For sites with a few dozen locations the process runs smoothly. For sites with thousands of locations but deleting one or two at a time, not a big deal. But for sites that are deleting tens-of-thousands of locations at a time the process becomes painfully slow. A mere 2,500 locations can take up to a full minute to be removed on a fairly … Continue reading “Improving wp_delete_post in WordPress Core”
WordPress LOVES backwards compatibility as can be witnessed by the minimum-allowed WordPress PHP version remaining at 5.2.4 a decade after its end-of-life date. It may be one of the reasons they have continued to garner market share. Don’t require people to do anything to improve their site and they’ll wallow in complacency. It makes sense. Inertia is a big thing to overcome. If you are a business focused on writing content, selling widgets, or doing just about anything else other than … Continue reading “Should The WordPress PHP Version Be Updated?”
While trying to figure out why the footer-loaded scripts in Store Locator Plus are not being output on some admin page, I went deep down the rabbit hole of the WordPress wp_enqueue_scripts function. Here are my notes from an analysis of WordPress (5.0-alpha-42191) . wp_enqueue_scripts /Users/lancecleveland/vagrant-local/www/wpslp/public_html/wp-includes/functions.wp-scripts.php This is a PHP inline function. /** * Enqueue a script. * * Registers the script if $src provided (does NOT overwrite), and enqueues it. * * @see WP_Dependencies::add() * @see WP_Dependencies::add_data() * @see … Continue reading “wp_enqueue_scripts Deep Dive”