It has no longer been 2 years since Easy Photo Album has been updated! 1.3.6 is out!

As a part of Five for the Future at WebDevStudios we get to work on Open Source WordPress projects every last Friday of the month all day, and as a result I was able to help the 7000+ Easy Photo Album get a working plugin.

Easy Photo Album is a plugin that I crossed while helping some users with this support request. I noticed that the plugin was old and hadn’t been updated in over 2 years! I tried to contact the owner for a few months, and finally we were able to work together to get the plugin updated at last!

1.3.6

1.3.6 features major updates to get the plugin working again:

  • Major fixes to missing minified files (previously fixed in 1.3.5 but came back) and WP Media
  • Simplified screen for creating Albums so Saving/Publishing is easier to understand
  • Fixes to TinyMCE button/modal when no albums were created
  • Can now organize Albums into categories called “Shelves,” props @kammak

Now on Github!

The plugins development is now on Github where other’s can contribute!

The Future

This plugin is used by a lot of people, so I would hope that I can help in contributing more! If you have any ideas or feedback, checkout the Support page on WordPress.org. This is why I love OSS!

Notice: bp_setup_current_user was called incorrectly [FIX]

Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /…/wp-includes/functions.php on line 3622

If you’re getting the above notice, you’re going to need to disable _doing_it_wrong for the bbp_setup_current_user() function, here’s how!

/**
 * Disables trigger_error for doing_it_wrong_trigger_error filter.
 *
 * @return boolean false disables the if condition to trigger the error display.
 */
function remove_bbp_setup_current_user_notice_filter() {
    return false; // Disable trigger_error.
}

/**
 * If bbp_setup_current_user() runs _doing_it_wrong(), disable trigger_error.
 *
 * @param  string $function The function, here we test for bbp_setup_current_user().
 * @param  string $message  The message (no modifications here).
 * @param  string $version  Version (not used here).
 */
function remove_bbp_setup_current_user_notice( $function, $message, $version ) {
    if( 'bbp_setup_current_user' === $function ) {

        // Filter trigger_error
        add_filter( 'doing_it_wrong_trigger_error', 'remove_bbp_setup_current_user_notice_filter' );
    }
}
add_action( 'doing_it_wrong_run', 'remove_bbp_setup_current_user_notice', 10, 3 );

WP NoteUp 1.1 “Cube”

WP NoteUp, dubbed “Cube” (read more about Ice Cube) was just released to WordPress.org! Development around Cube was focused around releasing a version of NoteUp that allowed the user to format their notes, e.g.:

WP NoteUp 1.1 Cube

All the new features were accomplished because of the great CMB2 (which we use @WebDevStudios all the time). Now you can bold, italic, add links and images. You can even add bulleted lists.

I hope this allows users to really get more out of having a place to put content or takes notes without having to fudge up your content. If you enjoyed the update, let me know in the comments!

Checkout the plugin on WordPress.org, or checkout out development of 1.2 at Github

Nginx and Post Preview (Preview Changes) not working [DigitalOcean/Fix]

Recently I have been experiencing an issue with Preview Changes not working in WordPress on a Nginx VPS over at DigitalOcean. I use a few common config files from nginx-common-config. Before, the configuration did not fix the problem, but after it did. Thanks to the /VVV guys for a configuration that solved the problem.

To fix you can just clone down nginx-common-config and include the nginx.wp.conf file.

#wcphx: What I took away from my first WordCamp

WordCamp Phoenix Logo

So, I’ve been waiting all day to write this blog! The last day of WordCamp Phoenix was awesome! I’d have to say the contributor sessions today were great and really brought home WordCamp for me!

Google Destination URL

I’ve also completed my goal of publishing a plugin during WordCamp Phoenix. You can now use Google Destination URL by installing from the WordPress.org repository. I tried to use as many things I learned at WCPHX while developing it. You can see more about the process from the GitHub commits.

Google Destination URL will allow you to add link in the WordPress editor by searching Google for the link. Check it out.

But! The other part I wanted to blog about was, “What did I learn at WordCamp Phoenix?” I’m going to cover the stuff I’ve retained; the stuff that really stuck out. Let’s start with…

Day 1

The first day was, obviously, my first time at a WordCamp. But, right away I was learning new things! I really think most people owe it to themselves (as a developer) to learn things from going to WordCamp.

During day 1 I learned more about the things that I didn’t know much about before, or didn’t use as much. It was the most informal day for me. The best part was when Konstantin Obenland and Michael Cain did “Cain and Obenland in the Morning” talk-show like event. But it was also awesome to learn some cool stuff from Brad Parbs and Cliff Seal.

Where to always use filters: return;

Brad Parbs told me this one.

The first thing I learned was something that felt like something I should have considered or thought of before. When you’re returning a value from a function, you can automatically give other developers an automatic advantage by allowing someone to hook into the values you are returning. Now I can use filters easily.

I kind-of show how you can do this in this example:

[gist]https://gist.github.com/aubreypwd/8513348[/gist]

Send PHP data to JS using  wp_localize_script

How I’ve usually accomplished this is by embedding an inline script to set a JS variable with values in it. Turns out WordPress already does this quite well.

In these examples you can see how I setup a JS var called google_destination_url_js on the PHP side.

[gist id=d5dfe84dbcdc7dd68dc1]

[gist id=4f44061f41642a27f2fc]

Using Transients for Caching

Cliff Seal showed us this one.

I had known about transients before WCPHX, but I never really thought about how to use them. In the example below I show you how I cached Google Search results in my new plugin.

If you were to type aubrey, and then modify what you typed to aubrie, the search (on keyup) will return another result (the same result) for a, u, b, and r all over again, even though you already typed each of those chars less than a second ago (while typing).

You can see what I mean in the examples below. I cache each keyup result so that, if the delete button is hit and aub is typed twice in two different searches, we are bugging the Google API once for a, au, and aub.

[gist id=e69f898b656f38703816]

Day 2

Day 2 was one of those days when I just couldn’t decide what talk I wanted to attend. They were themed into 3 groups, one was client/beginner based, the next business based, and the last one developer based. I would get stuck trying to decide, WordPress Mobile App Development, or Managing Client Expectations from Start to Finish?

Some things I took away from Day 2…

Turn down work that isn’t for you or your company

It’s pretty self explanatory, but I heard this talked about and said so much on Day 2 that it became obvious that taking on work that doesn’t fit your style or company just spells disaster.

You can make Apps out of your WordPress sites

I always knew that there might be a way to do this, but one of the talks that day confirmed for me that, indeed, it can be done.

Look into AppPresser for more info.

I’m still not ready for Capistrano

Though the talk was really good, using Capistrano still frightens me haha! It was probably the only talk where I felt like it would be easier to just make the symlink myself.

Paul Clark Still uses MAMP, and that’s OK! (Varying Vagrant Vagrants)

Throughout the camp, people were raving about VVV (Varying Vagrant Vagrants). Now, it doesn’t frighten me as much as using Capistrano, but I’ve just always just trusted MAMP. But, like I said, Paul Clark said he still uses MAMP, and know what, so do I.

Varying Vagrant Vagrants is from the guys at 10up.

Day 3 (today)

Day 3 is probably my favorite day. I spend all day in a small room with a bunch of other WordPress loving people. The day wasn’t about making money off Websites, or how to use new API’s, etc, it was about the thing I love about WordPress: contributing.

And, the things I took away are:

WordPress people want YOU to get involved

The overall feeling I got from the people in this particular part of the camp was that they really really want people to get involved. It may look like the WordPress god’s in IRC or Make don’t really need your help, but you’d be wrong.

WordPress people are so welcoming to people who want to help, but you kind of got to get in there and let them know. I asked a few questions about how to really get in there and start working on things, and it turns out that if you just show up, you’re probably on the list! But, you need to…

Ask Questions or Get Help!

There were tons of WordPress people that said, “please, tweet me, I will help you out,” the whole time I was there. Brave up, ask questions, bug someone (but be nice).

I plan on bugging Mike Schroder on how to get involved in core…well…because he told me to.

The new way to build new things for core is build a plugin

I asked about how to get involved in building new features, and the experiment with MP6 is still on-going. There are people (and teams) who are devising plans to get new things into core today! They build a plugin, everyone checks it out, and walla it’s in core (or not).

But, if it doesn’t make it, hey it’s still a plugin…Beautiful!

The key is getting in touch with these teams. IRC is the sure way to get involved, and get involved today! Now is the time to do it (as of January). They are working on building teams for 3.9!

And, finally…

The overall thing I took away from the camp is that there is a community. From the far reaches of the inter-webs it may seem like there are a lot of hidden people working on WordPress that don’t need your help. Being my first WordCamp, I came from a place where I knew I could get involved, but (I don’t know how to explain it) there was just something missing…

…It was going to a WordCamp! You’re going to meet those people, put some faces on them, and get a renewed sense to get involved!

WordCamps are also a great place to learn the ropes. Sure you can read up on things, and like me learn through experience, but the “pros” at WordCamps will show you how to box with your gloves off. Plus it’s just an eye-opener. You’ll hear and see things you hadn’t before…promise.

Well, that’s pretty much it! The great people who made WordCamp Phoenix happen deserve more recognition that they probably get! I’ll be coming back next year, I might also be going to other one’s too, who knows!

What did you get out of it!?

Moving to Git

Among the many things I learned at #wcphx this weekend is that a lot of developers are on Git vs. Bitbucket, so starting with GDU (Google Destination URL), I’ll be moving my public repos to Git (that are now on BitBucket).

So, please note GDU is now on Git.

And, by the way, this was pretty awesome at converting a mercurial repo to Git.

Google Destination URL: Added Caching & Better Ajax Performance

So, it’s only Saturday and I think I’m ready to deploy this plugin to WordPress.org so I can accomplish my goal to launch a new plugin during #wcphx!

I re-worked a few things…

…and so, I think the plugin is ready to go. I’ve submitted a previous version to the WordPress.org Plugin team and am awaiting a pass/go to deploy the plugin up!

If you want to check it out you can download the tip at BitBucket.