Gambit Plugin Updates for April 2018

When Gambit was established, we had a goal that drove us – to simplify and revolutionize the WordPress world. It sounds a little fluffy, but since the beginning,…

Next Page Caching: A Whole New Way to Speed Up Your Site

There’s a new method of speeding up your site: “next page caching”.

Single Command to Remove Missing Files and Add New Files into SVN

This is a short entry. If you have a WordPress.org theme/plugin, here’s a single command to add all new files and remove all missing files in SVN: svn…

How to Perform an Action Only Once in WordPress

The add_action function is the main function to use when creating WordPress plugins. You mainly use it for executing code at various run time points within WordPress. With…

PHPUnit Installer Script that Works in Travis CI and Locally for VVV

Travis CI is great and we’re using a very (VERY) simple singular test that just checks whether or not Titan Framework encounters any activation errors. As of the…

Using IDs or query_vars instead of slug names in get_post_types

Here’s one that had my head scratching for a while. We are currently developing a much-sought-after update for Carousel Anything, and it involves enumerating post types, taxonomies and…

Converting Relative URLs to Absolute URLs in PHP

We needed to convert relative URLs to absolute URLs inside CSS files for our upcoming plugin Combinator. There are a lot of code floating online that partially worked.…

How to Use the Javascript YouTube API Across Multiple Plugins

When using the YouTube API, you are required to create the function onYouTubePlayerAPIReady. There is a huge problem with this. If you have multiple WordPress plugins that use…

WordPress: How to Add a Button in the Admin Bar

This snippet will add a button on the admin bar: add_action( ‘admin_bar_menu’, array( $this, ‘addToggleButton’ ), 99 ); public function addToggleButton( $adminBar ) { $args = array( ‘id’…

Tip: Detecting a Mobile Browser with Javascript

There are a lot of existing ways to detect whether the browser is being used in a mobile device. You can use Modernizr to check for Touch support,…