Same WordPress plugin, new name

A little while ago, I created a plugin called Suspend Transients. It is a helpful tool that allows developers to bypass get_transient()  calls on any page by clicking a button on the admin bar.

I felt that the name was not accurate so I have renamed it and it is now available for download on WordPress.org as Bypass Transients.

Development is happening on GitHub and pull requests are welcome along with any and all feedback in the comments below!

Thanks Adam!

WordPress 4.7 was just released and it marks the sixth release in a row that I have been lucky enough to contribute to.

Contributing to WordPress core has always been a personal goal for me and while I had made attempts in the past, it wasn’t until I joined 10up that I was finally able to contribute back to the open source project that pays my bills.

Contributing to WordPress Core is not hard in and of itself but what can be hard is the ramp up. WordPress is 13 years old, that’s a lot of project history to grok! Besides that, there is trac and the technical side that a new contributor has to figure out before they can even get to place to start writing code.

Having someone to help you navigate the waters of WordPress core contribution is invaluable. For me, that person was ( and still is ) Adam Silverstein, a friend,  and fellow 10upper. Without his help, guidance and patience, I would probably still be trying to figure out how to get someone to look at my tickets 🙂

Adam was recently given commit access to WordPress Core and I wanted to congratulate and thank him for everything he has done for me personally and for the larger WordPress community.

 

Setting up Unit Testing for WordPress Core

Recently I was running into issues with VVV running some units tests for AJAX. I was not able to remedy the issue so I decided to create a testing environment from the SVN repo directly.

I went to the page on the codex and while the information there was great, part of the instructions are to setup a different database for your tests but not how to get mysql setup and ready for anything to connect to it.

After a bit of digging around I found a simple approach for setting up a test suite for WordPress core unit tests. This setup does not account for viewing WordPress in a browser it was really only meant for unit testing but you could easily set that up as well if required.

Using homebrew, install mysql

Once installed, start the server

Once the server has started you can login using the default user (root) and password (blank)

You may be prompted for a password  if so, just hit enter.

Now you can create the tables as needed. There are two commands here because we need a database for WordPress regular use and one for unit testing because the test suite will drop all of the tables in the database each time it’s run.

That’s it! Now your databases are all setup to use.

Next, checkout the WordPress repo into your user folder and change to that directory

Now edit the wp-config.php and wp-test-config.php adding in the appropriate database connection info for each.

I found that I needed to set the DB_HOST constant to 127.0.0.1 instead of localhost to have the connection work.

If everything is setup correctly, you can run the unit test suite from inside the root of the core repo.

Once you’re done with your testing you stop the mysql server as it can cause conflicts with other tools that use their own mysql installations.

That’s it! Happy unit testing!

 

First WordPress core props!

It was a very simple patch, just removing some code that is no longer needed, but now that ticket #31485 has been committed, I will have contributor props for WordPress 4.2!

Update: 4.2 was released today and I am very happy to have played a (small) part in it!

Photos or it didn’t happen!Window_and_Credits_‹_Ryan_Welcher_—_WordPress

 

Change the WordPress post updated messages

Sometimes it is necessary to modify or remove the default WordPress post updated messages that are displayed when making changes to a Post in WordPress. One example is when you are creating a custom post type that does not have a permalink. When you save a draft, publish or update a published post, you are presented with messaging that includes a link to the post – which in that case will take the user to a 404 page. Continue reading “Change the WordPress post updated messages”

Custom post types with no permalinks

When I was at WordCamp Ottawa this year, I was asked a question about how to create custom post types without generating permalinks. This is actually something I do a lot of as I am creating internal content types that are not meant to be viewed individually at their own url.

The snippet below will register the post type and you’ll notice that there is no Permalink line below the title. Continue reading “Custom post types with no permalinks”

Creating a skinnable WordPress widget

Building custom widgets is fun, rebuilding them because we need to change the way it looks is not. With that in mind, lets build a skinnable WordPress widget that separates how it looks from what it does. For the purposes of this tutorial, I am assuming that you are comfortable creating a Widget and working with the API. Please refer to the Widget API as needed. Continue reading “Creating a skinnable WordPress widget”

WordPress Stuck In Maintenance Mode

If you ever have an automatic update fail sometimes your WordPress install can get stuck in maintenance mode. I just had this happen to me and was able to find a quick solution.

Log into your server via FTP and look for a .maintenance file, delete it and you should be up and running again.

3 Jewels in my Crown

3 Jewels in my Crown was a very fun WordPress theme to work on. It features may different custom image sizes based on a Featured Image and does all of the resizing work for the user. One really great feature is the ability to select certain posts as “Featured’ by using a custom taxonomy I set up. I could have used a category for this but wanted to avoid any duplicate content issues with search engines.

Overall this was a great learning experience for me and I really dove into the lower level features that WordPress has to offer.

Les Stroud Official Website

As the resident “web guy” for Les Stroud Productions, I was tasked with maintaining and improving upon the flagship website for Les Stroud.

Built on WordPress this site has seen many changes since I started working on it and is a great example of a “working” site. Many website are built and then left alone but this site is constantly evolving.

Whether it be the addition of jquery scrollbars and lightboxes, HTML 5 video fallback for iOS or Flash video on the homepage (with graceful fallback of course) this site is always looking to provide it’s visitors with a great user experience.

The original artwork was done by Luke Despatie & The Design Firm.