Quantcast
Channel: My Monkey Do
Browsing latest articles
Browse All 26 View Live

Free Web Hosting

Today I realized I needed a reliable web host that I can use for development purposes.  Either for demoing to clients or testing things out, it needed to be online, free (because I wouldn’t use it for...

View Article



Google Analytics Measurement Protocol for Subscriptions

Send Analytics Data Directly From Your Server Google Analytics Measurement Protocol is available for Google’s Universal Analytics.  It was released in the first part of 2013 and is as of this writing...

View Article

PHP –‘anything’ in_array 0 is true

$orderby = 'something'; $column_names = array( 0, 1, 2, 3, 'acolumn' ); if ( in_array( $orderby, $column_names ) ) { $orderby = 'got here'; } else { $orderby = ''; } // shows 'got here' echo $orderby;...

View Article

How does WordPress redirect mistyped URLs to the correct one?

Well, I’m not sure exactly because it is A LOT of code, but to make it stop, you can use the filter ‘redirect_canonical’ and return false.  like so: So say you have a post named “mission” at...

View Article

edit_users capability on multisite

No matter how hard you try, if you add the edit_user capability to a user on multi-site and that user is not a super-admin, the user will not have the edit_user capability.  This is hard-coded into...

View Article


WordPress Heartbeat API

I could not find any extensive documentation on the WordPress Heartbeat API, so I am writing here to remember what I have learned through various tutorials throughout the web. The Heartbeat API is...

View Article

Order Non-hierarchical Custom Post Types

Non-hierarchical post types are like regular posts which normally do not have a menu_order attribute.  Hierarchical post type are like pages which allows a parent/child and is normally ordered by the...

View Article

Where is wp_capabilities?

Problem After creating a user with a certain role I need to do a custom sql query where it only selected users of a specific role.  This failed to find anything: select u.ID, u.display_name,...

View Article


PHP 7.2 and the 502 error

My site was running fine and dandy for a few years.  I made the necessary adjustments to make it compatible with PHP 7.2 and upgraded the server.  A few days later I started receiving random 502...

View Article


Shorthand for array

Recently I jumped on a project that uses the shorthand to declare an array by using the brackets []. I wondered why I have been using “array()” this whole time besides it being common in WordPress....

View Article
Browsing latest articles
Browse All 26 View Live




Latest Images