Posts

WP NoteUp 1.1.4 is out, with cats!

A while back, someone reported that maybe WP NoteUp wasn’t working in the latest 4.7. Turns out there was major thing going wonky. First off, the content was totally lost when the metabox was moved from the side panel to the “normal” section.

But, that’s been fixed and now the NoteUp panel simply isn’t draggable to the side anymore, leaving your content un-harmed. Minor change, but should be working in WP 4.7.2!

Also there were some activation issues, code cleanup, and cleaner code deployed to SVN. You can read all about it. Thanks to @WebDevStudios (who I work for) for allowing us to give back 5% of our time to WordPress for #5ftf!

FED’s vs BED’s: The first day.

Okay, first off, it’s been a while. Ever since joining WDS, I haven’t really had a reason to blog here, because well I blog there. But! I have an opporitunity to blog about more personal stuff with a series of posts centered around an experiment me and Eric Fuller are doing.

First off, we’re creating a new WordPress plugin centered around creating a todo list you can use when logged into your WordPress site. It basically will operate like this:

But, the reason we’re working on this project is because we want to experiment with the relationship between backend developers and front-end developers. We feel that the relationship between a FED (Eric) and a BED (me) can be a lot more smooth if we can only clearly identify who takes care of what and draw harder lines between (and even change completely) what a FED does and what a BED does when creating a feature.

So, I’ll be blogging the process here!

Day One

This week I basically scaffolded a base plugin using WDS’s plugin generator, definitely a BED task since it’s a plugin and not really a theme. One big hurtle for me was when I showed Eric what I had done. Thinking like a BED, I had tried to setup a template system of some kind that will allow Eric to add new templates and template parts/pieces, but then he told me, “I’m going to basically delete all that and have Js handle all the templates.” As a BED that really confused me initially, but Eric explained to me that he most likely was going to use Js/jQuery to build the HTML elements on the fly using JS, which for a BED means I don’t build any (maybe a bit here and there) markup, he does; that’s his job! I think too often BED get into the markup game, when really that’s a FED’s job.

So, next, Eric is going to basically build out what you see in that gif above, without any functionality. Well, almost. If you look at #6, he’s going to basically setup a static dataset for his UI to use. So, upon loading the page, his UI will be pushed to the DOM and populated with dummy data and should work for that page load instance. Creating a list or a new list item would simply push data to his dummy dataset (I think), deleting would remove it, etc. His entire UI is going to work off of a static dataset in JS loaded only for that page load. When the page reloads, it starts all over. I will be coming in when he is done and replacing that dummy data with actual data from an API request. The idea is he should have all the structure for the data worked out, I only need to ensure that data ends up being persistent.

Axios & Promises

One big change for me, as a BED, was Eric’s suggestion to use Axios and the understanding of JS Promises. Once I finally got my mind wrapped around Promises, it make complete sense to use Axios (a Promise based system) going forward instead of your typical $.ajax() system jQuery uses. Usually the handling of data is handled by the $.ajax() request itself, using callbacks like success and compete which disconnects the JS. Promises are functions that run our AJAX requests, etc, and simply pass the data back to the caller instead of passing the data to it’s own success method, etc.

Basically, Promises are functions that wait until your either resolve it or reject it, and that tells the caller when to continue using .then. It was a bit to wrap around my head, but check out Axios and do your own research on Promises, they’re way better than passing the handling of a request, such as an AJAX request, to another function.

So, he can just setup a new axios.get( functionThatReturnsJsonData() ) and later on, when I build the API endpoint for that data, I can just replace it with axios.get( 'http://.../data' ). At the end of the day, as a BED, I do little markup! That is the FED’s job! The meeting place for BED and FED work will simply be JS, yet the FED drives most of the JS.

Working Backwards

Me and Eric are working backwards than what we’re usually used to doing, which is basically: BED go create all the things then have the FED simply style it using SCSS. This time Eric, the FED, is going to drive “building all the things” since he is in charge of UI and UX! UX here is the most important, so it’s important that the FED (the designer) drive the UX initially. But, he’s not going to build out the data, that’s going to be my job after he gets the UI and UX going!

Takehome

One thought we had was that using the build UI/UX first, and using dummy data initially is a good thing; to the point that we think any client could simply approve of the UI/UX first at that point without any BED intervention. Once a client approves of the UI and UX then the BED can come in and build out all the data. All too often changes in the UX/UI cause a lot of work to be done when it’s all build-out. This ensures the client approves only the UX/UI, and if they don’t we save the BED from having to do any extra work. The FED simply changes the UI/UX around, and makes a few tweaks to the dummy data (if necessary), then when the client is fully happy, the BED just has to ensure the right data ends up in the right places (they don’t have to worry about UI/UX changes at all, yey!).

This also ensures that the BED can design the storage for these items separate from the FED. The BED can also get a better grasp of how he might design the storage areas for this data (e.g. a CPT, or custom tables, etc) by having a good understanding of how the data will look. As a BED seeing the data first is always a good thing, rather than designing it before the UI/UX.

Takehome: UX/UI (FED) drives data (BED), not the other way around.

Follow # for more! Check out our repo, we are clearly identifying what is FED and BED!

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

Provisioning’s a Bitch

timeWhat am I most excited for? Never having to run vagrant up --provision again. Spinning up a new build everyday can be time consuming! Simply, I was starting to feel like VVV was just getting in the way of being productive. I got things to do!

Those are My RAMS (Performance)

VVV will take up about 1GB of memory working or not (and don’t try and lower it). This isn’t really VVV’s fault, mainly my own. I bought a new Macbook Air and started with the lower-end hardware. Though things ran faster (because of the SSD), I had less RAM’s and less HD space now. On my Macbook Pro (may it rest in peace) I never had to worry about RAM, but as soon as I started hitting projects all day it became apparent I needed all the resources I could get out of my machine.

I’m probably not even using VVV all-the-way!

Ultimately, this is what it really comes down to. I just haven’t felt like it was that much better than a MAMP or XAMPP solution. Ever since I fired it up I haven’t really found anything great about it far from other solutions (except that it’s Linux), but that’s probably my fault anyways. I just don’t use a lot of the powerhouse things Vagrant probably does and I feel like I’m sacrificing a lot.

XAMPP

When I first broke up with MAMP for VVV, it seemed like a good fit (and it was the hip thing everyone was doing). I thought the right thing to do was run my dev environment in a box that worked most like the Internet does, on Linux. But, after using it for about a year, and throwing that --provision switch a few hundred times, I’m trying out XAMPP, which just runs Apache, PHP, MySQL. That’s all I really need to do what I do and sudo xampp restart gets it done in under 10 seconds!

We broke up, but we’re still friends

But that doesn’t mean you shouldn’t try out VVV! People swear by it, and there’s a reason, I’m just not sure if I’m aware of it yet… It was also built by very smart people that work on very smart projects. And, It’s still on my machine! Anytime I need to test a site outside of the typical Apache box (with NGINX becoming more and more popular), it’ll be there for me.

VVV probably does a lot of great things, but you better have a slow coffee machine–provisioning is a bitch!