Posted on August 31, 2019Categories Programming, WordPressTags , , ,   Leave a comment on WP_User_Query Inverse (NOT) Search

WP_User_Query Inverse (NOT) Search

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”

Posted on May 8, 2019Categories PHP, Programming, Technology, WordPressTags , , , , 2 Comments on Ubuntu Trusty: PHP 7.2 MIA

Ubuntu Trusty: PHP 7.2 MIA

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.

Posted on August 23, 2018Categories JavaScript, Plugin Development, Programming, Programming Languages, Technology, WordPressTags , , , , , ,   Leave a comment on Vue – JavaScript Library Outside Google/Facebook Control

Vue – JavaScript Library Outside Google/Facebook Control

Vue is running on several projects to create a better admin user experience. Vuetify is layered on top and baked into WordPress themes and plugins. You will need to add a little custom CSS to stop WordPress from stomping on the UX. You’ll also add a small localize script to seed Vue with relevant data from WordPress. A little REST applet to serve Vue requests and you get a fast good looking responsive app with far less effort than custom … Continue reading “Vue – JavaScript Library Outside Google/Facebook Control”

Posted on July 17, 2018Categories Programming, WordPressTags , ,   Leave a comment on WordPress Needs To Abandon PHP 5.2 Compatibility

WordPress Needs To Abandon PHP 5.2 Compatibility

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”

Posted on May 8, 2018Categories Programming, TechnologyTags , , , , ,   Leave a comment on How To Hire A Programmer

How To Hire A Programmer

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”

Posted on February 13, 2018Categories Programming, Quality AssuranceTags , , , , , , , , 1 Comment on Setting Up WebdriverIO For Automated Website Testing

Setting Up WebdriverIO For Automated Website Testing

I’ve been writing about Selenium IDE for years , telling anyone that would listen how it helps automate user experience testing.    Recently , with the demise of Selenium IDE along with the engine updates to Firefox, I started talking about migrating to Selenium Webdriver.    Think of Selenium Webdriver as the “professional version” of Selenium IDE.    It is far more powerful but is a pain to setup and does require minimal JavaScript coding skills. By installing a few … Continue reading “Setting Up WebdriverIO For Automated Website Testing”

Posted on February 8, 2018Categories PHP, Programming, WordPressTags , , , , 1 Comment on Improving wp_delete_post in WordPress Core

Improving wp_delete_post in WordPress Core

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”

Posted on December 15, 2017Categories PHP, Programming, Programming Languages, Technology, WordPressTags , , ,   Leave a comment on Should The WordPress PHP Version Be Updated?

Should The WordPress PHP Version Be Updated?

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?”

Posted on December 4, 2017Categories PHP, Programming, Programming Languages, WordPressTags , , , , , ,   Leave a comment on wp_enqueue_scripts Deep Dive

wp_enqueue_scripts Deep Dive

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”