Jetpack local Environment Patch

I was reading a recent article on WPTavern and thought to myself, “Hey, this is a great little plugin but doesn’t Jetpack already handle this?”

More or less it does but there are a few “local” conditions that may have been over-looked and I thought I would offer a patch to pick up on some of those conditions.

Currently Jetpack looks to the site_url() for its conditional test on whether or not the TLD has a “.” (dot, period, point, etc.) which is all well and fine but what about “.dev” or “.local” or even certain IP address ranges that are considered “local”?

My initial patch was just expanding the existing conditional statement to include the “.dev” and “.local” extensions but after some discussions I also included a filterable case to also be available for the environment test conditions.

Here’s a link to the pull request on GitHub, what do you think?

wp_get_shortlink() Should Always Return a URL

It was about two years ago that I noticed there was a minor issue with how wp_get_shortlink handled things with the default permalink structure. This is what I wrote in my original ticket:

Currently the code used in the link-template.php file causes the wp_get_shortcode function to return an empty result if the WordPress installation is using the default permalink structure. This causes at least issues with the_shortcode function and can be expected to cause issues any place that wp_get_shortcode is called when the default permalink structure is being used.

Obviously this was not a pressing issue but it was fixed on the 25030 Changeset. Props went out to sillybean, layotte, and cais (me!).

I Quit My Job Yesterday

I started 24 years ago … and I quit yesterday! I tendered an appropriate Letter of Resignation but I’ve always wanted to say:

I Quit! Cha-Cha-Cha!

(Although I did write my wife after using that as the subject line … we both laughed about it later.)

It reminds me of an old television ad for the lottery. I didn’t actually win lottery, I did something better.

I have taken a position with a great company that works with WordPress; no, it’s not Automattic even though someone tried guessing on Twitter.

My new title will be: Lead Happiness Engineer – … er, well, if I gave my whole new title then what fun would it be for anyone else playing along.

Care to guess?

Empty Page Title Not Handled in Menu System

Empty Page Title Not Handled in Menu System” seemed to cover what I found about five months ago (as of this writing according to the WordPress Trac system). Simply put, if you had a page without a title and you used that page in your WordPress navigation menu you could expect to have some issues with its display.

Several comments later; a commit by Mark Jaquith today; and, these issues are well taken care of now … cool! I’m happy to have been part of the process.

New WordPress Plugin BNS Bio

Just a quick note … BNS Bio is available from the WordPress Extend Plugins repository. The more current working version is available from this repository on GitHub. Enjoy!

To see the Nota Bene click here.To hide the Nota Bene click here.
NB: The current version of BNS Bio (0.1) requires PHP version 5.3 or higher due to the use of closures; the next release (scheduled for November 20, 2012) will have a lower PHP version requirement

20th Chess.com Tournament (1601-1800) – Round 1

Game results in the order of their finish:

[pgn]
[Event “20th Chess.com Tournament (1601-1800) – Round 1”]
[Site “Chess.com”]
[Date “2012.09.01”]
[White “Cais”]
[Black “vk2008”]
[Result “0-1”]
[WhiteElo “1662”]
[BlackElo “1655”]
[TimeControl “1 in 3 days”]
[Termination “vk2008 won by resignation”]

1.d4 d5 2.Nc3 Nc6 3.Nf3 Nf6 4.e3 a6 5.Bd3 Nb4 6.O-O Nxd3 7.Qxd3 e6 8.a3 Bd7 9.Re1 c5 10.dxc5 Bxc5
11.b4 Ba7 12.Ne5 O-O 13.e4 Bc6 14.Nxc6 bxc6 15.exd5 cxd5 16.Qg3 Bb8 17.Qf3 Qc7 18.Bf4 Qxf4 19.Qxf4 Bxf4 20.g3 Bh6
21.a4 Rac8 22.Ra3 Bd2 0-1
[/pgn]

I will not be advancing in this tournament. Please feel free to have a look at the balance of the game below.

Continue reading “20th Chess.com Tournament (1601-1800) – Round 1”

A New Workflow

After an interesting discussion on twitter with @curtismchale, @ericmann, @mikeschenkel, and @rarst I have decided its time to have another look at “local development”.

The basics so far have been the following downloads:

  1. Tortoise SVN
  2. Git
  3. WampServer
  4. PhpStorm

Tortoise SVN and Git are for the version control aspects of this project; WampServer (since I am testing on a Windows PC) is for the “local” environment; and PhpStorm is a recently discovered IDE that ties all of these together.

The next step was choosing a plugin and theme as well as setting up WordPress, my preferred CMS for development. I chose to go with the Nightly Builds version of WordPress, keeping it up to date via the core subversion access.

The plugin and theme are respectively ‘BNS Theme Add-Ins’ and ‘NoNa’. The first, a new WordPress plugin I recently released; and the second, one of my WordPress Themes due to be updated. To test the version control aspects these are now being maintained via github.

Although it has been a bit of a stumbling, grumbling affair I am finding the mix of these tools to have some interesting potential. I have been doing most of my current development work on “live” test servers (all I need is access to the Internet) and have always found everything goes quite well.

Transferring an existing project into the new process goes along these lines:

  1. Download existing project via FTP into the local environment folder.
  2. Share the new plugin/theme with GitHub.
  3. Develop and test in local environment.
  4. Deploy to a test server for online testing.
  5. Commit/push changes to GitHub.
  6. Repeat steps 3 through 5 as needed.
  7. Release to the appropriate WordPress repository.

Starting a new project would work in a similar fashion … maybe.

The discussions on twitter gave me reason to reconsider local development so I will give this some time, namely the 30 day demonstration period attached to PhpStorm. If all works out I may just spend the $99 for the application and make this my new workflow.

BNS Theme Add-Ins 0.1 Live

Sometimes I look for any reasonable excuse to post; this one is just to hard to pass up as a new “status” post.

The following is from one of the newer Plugin repository enhancements: an email notification when an update is made to a plugin you contribute to.

Revision
445926
Author
cais
Date
2011-09-30 22:30:33 +0000 (Fri, 30 Sep 2011)

Log Message

Added Paths

Diff

Property changes: bns-theme-add-ins/tags/0.1

Added: bugtraq:number

Added: bns-theme-add-ins/tags/0.1/bns-child-theme-add-ins.php (0 => 445926)

Long story short: the first iteration of “BNS Theme Add-Ins” is now available on the WordPress Extend Plugin repository.