Featured post

Parenthood – The journey begins

Parenthood:

Parenthood is a never-ending journey and every day is a new adventure into making mistakes while trying to keep some sanity. Parenthood has no rules, guidelines or even a reference guide but it is still a great thing to be a part of. I entered upon this journey on June 7. Okay not entirely but that was the day my little boy, Salvador, was born so I will count that as the actual day the journey began. I will add more and more pages as time goes on and I get time to share these little life lessons.

Parenthood and the rules

Really there have been no rules for either one of us since SJ was born. SJ because his middle name of course begins with a “J” and if you were to look at my little man you would say that is a big name for a little guy. Now I’m just getting a little off track. The things that both of us have learned are things that people often tell us. A good example is when people tell us that we won’t be getting any sleep. I’m used to not sleeping so that is not really new to me. My body has been so REM deprived over the last years that I am more than capable of functioning on three or four hours of sleep a day. The one thing that has changed about that is that the so-called sleep pattern is more random that ever.

Parenthood and the guidelines

Okay the basic guidelines are pretty simple when you get down to it: Don’t kill the baby. That is the basic guideline and the one thing to really follow. Everyday is an exploration into a world of how to. How to keep the little one entertained while keeping your sanity, how to keep him quiet long enough to make a bottle so he won’t scream your ears off. No one thing will work the same way the next day. That is one thing you can count on to be true. There are moments when you will want to be alone to think, read or do something so simple as taking a shower but it can feel like forever because you are changing, feeding, burping and then changing again just to keep your little one from bawling.

What can oftentimes make things easy is having somebody there to help out to accomplish those basic everyday tasks like doing laundry, eating, cooking, cleaning or taking a bath. Unfortunately, I know some people out there don’t often have that luxury and I often wonder about how they manage to do it and have a huge amount of respect for them for being able to pull it off.

Several changes coming up

It has been a long time coming but I am finally beginning to clear out a lot of posts from this site. Yes, a lot of site cleaning. The reason for this is because over the last three years I had my site hosted on webhostinghub.com I made a lot posts that really didn’t pertain to the direction I wanted to take.

The reason I made the site was to explore and learn. Along the way I posted personal things I know I should have put on my WordPress.com hosted site instead.

In the following weeks I’ll be making a lot of changes to that and have begun removing a lot of posts and I mean a lot. There are several images that I will have to re-upload and a lot more things to take care of but for the most part I’ll be chipping away slowly. I think the biggest one will be change to the code syntax highlighting done in a lot of the posts. I may just use gists for that but for the time being they will be broken.

Along side that I’ll be taking the steps to committing more code to the WordPress theme I began long ago. I’ll be refactoring a lot of that code and simplifying by removing some files. I don’t know that’s still up in the air but will try to also add support for EDD somehow.

My gripe with widgets

Yes, I don’t like widgets. Okay that is not entirely true because I am using a few but it’s not what I’m referring to. What I’m referring to is when themes include widgets.

Themes that include widgets for contact forms, testimonials, group -or team- members of a company. Dare I say it? Newsletter widget. Cue dramatic music. Yes, I am referring to most of those. The reason I hate them is because you lose it once you switch a theme. It reminds me of the shortcut icons I see being used by a lot as well. It does drive me up a wall.

Up a wall, you say?

Yes. The reason for that is because there are dozens, and dozens of plugins that can do it and possibly do it better. Some things are not meant to change. The shortcut icon ( favicon ) should be one. In my opinion some widgets should be the same way. I make an exception only because I know there is at least one theme that unregisters core widgets and includes their own extended version of that widget. You still lose that functionality ( keyword right there ) once you make a switch to a new theme.

I know you may be asking and even wondering what argument, or arguments, could be made. Well, some people never change their themes. True. The thing to remember too is that even down the road they may just think about changing that theme. It will be a bad experience once they change that theme and lose the widget(s) they had.

There are some that are purely aesthetic and add to the theme’s experience but should that be the end all to turn to for widget design, functionality? I don’t know but it does seem a little strange that I haven’t seen many themes proclaiming support for certain widgets.

Start a trend

Yes, it would be nice. At least to see some theme authors supporting more and more plugins or specialized widgets. I mean after all that is what the description is for or even the theme’s documentation, right?

Why a theme’s changelog is important

Having some history is a good thing and knowing what changes were made and why is even better. That is one of the reasons that I love seeing a changelog when I look in a theme’s folder. Supposing they have one.

Not all themes are created equal

It’s true. When I speak of themes I generally refer to the themes submitted and maintained in the WordPress.org repository. I don’t mean those that you buy either. I don’t like to because I feel you pay for a certain level of not just support but dare I say care? I don’t know. Just two slightly different areas to me.

The reason I bring this up is because in the middle of making a change to my current project at hand I wanted to know why I chose to use a specific method and why it wasn’t working. At least on my working copy of the project. I tried to think back on what changes I had made and realized I hadn’t kept track of any changes; let alone major ones.

It reminds me a bit of history class. Military History to be exact. Yes, I took that class in high school. It was fun and a neat class to take. I learned a bit about why you use certain strategies and when. Kind of see where I’m getting at? Tactics, planning and thinking ahead were all at play. I just didn’t really think about it at the time. That and documentation. I didn’t do that part.

A little flashback

Over a year ago I came across two trac tickets. #45 on the WordPress meta side and #22810 on the core side. The downside is that is hasn’t had a lot of attention. ( That needs to change ). Personally I think it is a step in the right direction for themes. Users, end-users and developers alike. The reason is of course to keep track of what changes were being made and why. A good thing to look at and know so things won’t break and if they do you’ll have an idea of why and what to look for.

A good example is WordPress core itself. If you checkout the timeline it shows you what changes ( if you look at the changesets ) are made to the project itself. It’s a great reference point to keep if something breaks down the road. One reason I’ve liked using some form of version control is because of that.

Many themes I’ve come across could benefit from this because they make a lot of changes.

A long road ahead

Yes, there is a lot to be done when it comes to themes and better practices. I think a changelog is good one to have. It’s a lot easier when you are using a version control system. Just append the commit message to the file and you have your changelog. Do keep in mind that is one way of doing it, there are others.

I think this may be the bigger hurdle to get over. The formatting of said changelog. I’ve seen more and more that link to a github repository of all the commits, which can be good if you have an internet connection and a reliable one at that.

If you feel like that changelog needs to happen then please go and comment on the tickets. Create a patch. Do something about it.

My 500 and counting

The beginning of the year I promised myself that I would try to review 500 themes by the end of the year. I finally managed to reach that point and was super ecstatic about it that I just had to tweet about it:

Yes, a tweet. Just one tweet. And I even went ahead and made another little challenge for myself for the next goal: 750. No timeframe for that just yet but I am happy I completed the 500 and am making some good traction for the next goal.

Since making that little challenge to myself a few things have changed. One of which is that I am now able to push themes live as well as others. Makes for reducing the queue a little easier and tolerable in my point of view. There are a few other things but I’ll leave that for another post and another time.

Making a Portable Object Template for your WordPress theme or plugin

Yes, a bit of a lengthy title but I feel will get the point across and it is after all what I’m wanting to share with you today.

A what now?

A .pot ( or a Portable Object Template ) file is what WordPress uses and many PHP programs use for translation purposes. There are three files used. According to icanlocalize.com the files are:

  • MO – Machine Object. The MO file includes the same contents as PO file. The two files differ in their format. While a PO file is a text file and is easy for humans to read, MO files compiled and are easy for computers to read. Your web server will use the MO file to display the translations.
  • PO – Portable Object. This is the file that you receive back from the translators. It’s a text file that includes the original texts and the translations.
  • POT – Portable Object Template. This is the file that you get when you extract texts from the application. Normally, you send this file to your translators.

The one we will worry about is the last one. The POT file. There are several ways to create this file but the one I’ve found most useful was the one Otto was awesome enough to post for theme reviewers. It is super simple and does need a little tinkering and getting over the fear of the command line.

Yes, the command line. You know that little program that uses only text. No, not a text editor. Would be cool but no. Depending on the platform you are using it will be called a terminal window, command prompt or even powershell. All of these will work for what we will be creating.

Steps and requirements

Sorry, did I not mention there would be some requirements? The basic requirement is the command line and having PHP installed. The next would be getting the needed files from the repository. If you aren’t developing themes using a development version of WordPress leave your address in the comments below, I will find you and I will hit you. Hard. Even a release candidate is worth your investment unless you like to break things and have people yelling at you.

The tools and files you will need are in one of two locations. The first being in the svn developer site. You will need some sort of SVN software in order to get it, of course. The other would be from my github repo I created and modified. Yes, I created it just for this reason.

So the steps are as follows:

  1. Get files
  2. Extract files to correct folder
  3. Open command line
  4. Do some magic – or Voodoo, your choice
  5. Do happy dance!

Getting the correct files

I mentioned and linked two places where to get the needed files. The github link is the one I will go over. Part of that reason is not everybody will be fully familiar with version control or comfortable enough to not break things. Once that is downloaded we can open the zipped folder and move on to the next step!

Extracting the files

This is super simple thing to do. Extract the files to the root of your WordPress folder. It should look something like the image.

WordPress folder

WordPress folder

Open the command line

Now, there are several tools that are available for this. For Windows user there are two that I will often switch between: command prompt and powershell. I like using powershell more. We then will change to the directory where we have our WordPress installation.

For the next step will be going over some code, so be prepared.

Doing the magic

So here is where the real magic will happen. Once we are in the folder of our installation we will once more change directories to the i18n folder where all translation files reside. From there we will run a quick line of code that will create our new POT file.

$ php makepot.php wp-theme /path/to/theme /path/to/languages/theme-slug.pot

The thing to keep in mind is the

$

is just a placeholder for the current directory you are in. It may differ from machine to machine. Once we have run that it will create a new file ( theme-slug.pot ) with all translation-ready strings. So try not to forget to translate all text strings!

How it works

I know there are a few people wondering how this actually works. I know I was for bit. I’ll try my best to make it a little more understandable why you need to have certain things in your command line.

The first thing you need to know is what you are doing. When you state

php

you are to a degree saying, “I want to run PHP code and use this file.” The next three things are what you are going to pass that file.

  1. The first thing we passed is what type of project you are creating the pot file for. In our case it is a
    wp-theme

    . There are a few other you can decide from like

    wp-plugin

    ,

    wp-admin

    ,

    wp-core

    and a few more that I just won’t list.

  2. The second thing we passed is the location of where to look for the translation functions. If you read through the list of what functions it looks for you are in for a treat because that list you can add to Poedit. (I’ve slowly walked away from that but would still recommend for beginners.)
  3. The last thing is the output of the file. Both the location and the name ( be sure to include the extension as well ) are what we will be using.

Now, you can do this with your plugins as well. Just be sure that the folder you are creating the POT file to does exist otherwise you will get errors and it won’t create the file for you.

I stated earlier that it works with a few changes; it’s true. The reason being I know there are some people who don’t like to use a development version of WordPress. Why? I don’t know but I made a few tweaks for it to work the way it works. Okay, I only changed three things but it works for the time being. I say that only because I’ve tested it on/off since the original post. If you encounter any issues please be sure to let me know!

Celebration will begin

There we have a newly created POT file ready to be sent to a translator. So, yes, by all means do your happy dance. Not only did you get over the slight fear of the command line but you possibly learned something new along the way.

Notes

If you don’t specify a path of where your theme/plugin resides it will create an error and will not work!
If you don’t specify a path, just a name for the file it will create the file in the
i18n

folder.

Keeping count of reviews

I hate posting this but I have to do it; sort of a status check for myself. To see where I stand and where I can be better. We all do it. I choose to do it publicly.

I can’t recall when I said I wanted to have my review count to be at 500 by the end of the year but I did. What review count you ask? Theme review of course. Since the beginning of the year I wanted to allot more time to reviewing and helping release more themes.

I can’t help it, I like to help when I can. It hasn’t been easy for me only because of the way I try and balance work and everyday life at the moment. I get home from work and I just want to review more themes when I should be sleeping.

As of this writing the tally is around 330 themes that I’ve looked over and read just about every single line of code. There are some that I glance over but for the most part I read all the code and of course look for key things when it comes to new themes.

I’m glad I’m keeping a good pace so far and will try and post an update when I finally reach that 500 theme mark.

Making a little music

I’ve been meaning to post an audio file for some time and today I got the nerve to get down and dirty with some settings. I have to say I am super happy with the sound since it’s been far too long since I dabbled with any type of audio. The last time I did that I was creating random sine waves to test speaker response and trying to create some audio filters with capacitors and a few resistors.

So here it is me randomly playing Tempestad on my Flamenco guitar. Enjoy!

( Edit: had to add one more: Lagrima – practice )

Organizing all the media

Yeah, media. I love it. Most people live it and some are just indifferent about it. Blah! Is what I say to them. The reason I say it is because I love entertainment. Surprised? Don’t be. I am super easily amused. Like super easy. Like two-year-old easily.

A little history

The last couple of months I was trying to think of a way to organize my media library. No, not my computer. That would require way too much effort on my part and I just don’t have the attention span for it. I mean for my WordPress site. One thing that I felt could be improved. At least the experience.

My current library is the default one. Why? Because I never got a chance to get to it. I’ve wanted to change the layout for some time and use a grid system to display all the items. Do keep in mind I mostly have photos and very little audio and little-to-no video. For the time being. I will change that down the road, of course.

So here is the current look:

Media Library core

Recently I came across an amazing plugin that helped me do what I would like to do. At least for the time being. It’s called media grid. Simple solution that will hopefully make its way to core. As I write this out I’m also testing the development version and tweaking, trying to figure out how to break things and where it may break. It’s fun. You should try it one day. As Ferris Bueller once said:

“It is so choice; if you have the means, I highly recommend picking one up.”

Yes. I do believe in the plugin that much. Enough to write about it. Running through the paces I do have to say I love how it works on a desktop environment. The ability to change from thumbnail to a larger image is nice and being able to batch delete is great. Next phase – I feel – will be being able to preview the other media. Do remember that ever since WordPress 3.6 video and audio support were added and there are several plugins that also add other formats to the mix.

For me, the ones that matter most are video, audio, and of course images. So with the plugin enabled it does look like:

media-grid It is a little edited since the version I’m using wasn’t playing nice with the screen but that gives you an idea of what to expect. Pretty cool, right? So go, download it, try it out and if you’re feeling up to it: review it!

Forget your incentive

For some time the Theme Review team was doing fairly good when it came to keeping the ticket count down. Part of that was because those that got more reviews done for the month would get rewarded.

A reward?

Why yes. A reward for reviewing themes. A lot. I figured why not? Sounds like a great idea. Gamify theme reviews. Might work. Let the winner(s) choose a theme so it can be featured.

Here is where I think most people went wrong. They could feature their own. Don’t get me wrong I would almost fall into that category.

My initial thought was that the chosen theme would be one that was reviewed that month. Clearly it wasn’t the case. Many chose their own. Repeatedly. Over. And over again. Month, after month, after month and, you get the idea.

The issue

The biggest issue I noticed was that most were rushing the reviews. I am by no means the greatest reviewer on the team but do feel like I know my way around most frameworks now. At least I should by now. I say this only because I don’t always assign myself for a review. What I often do is actually look over what most people write, respond and change in some themes.

There are some things that are always missed. I admit I miss a few things as well. I feel bad when that happens but I am human. I don’t expect to catch every single error that one theme has let alone five.

Yeah, you read that right: five. There are some that will review multiple themes at once. I can’t do it. Part of that reason is the code from one theme will be on my mind as I look over another. Or I will forget what tab I’m in and put the wrong required issue on the wrong theme. It can get messy.

More trouble brewing

Those who chose their own themes I feel hurt the community.

Let me elaborate on that. In order to do that I have to really break things down a bit. I have to ask a few questions:

  • What is feature worthy?
  • What sets it apart?
  • Who designed it?

So, what makes a theme feature worthy? I feel that the design as well as the code have a huge impact on that. I’ve seen a few themes that use frameworks and often feel bloated.

A good example would be option frameworks that are included in a few themes. Often times they include so many files for such a simple thing like the ability to change text color. I feel that we should make decisions not give options. If they want to change it then they should be able to but it shouldn’t be expected. Just like I don’t expect to walk in to a restaurant and have the server ask me what kind of cup I would like to use for my water.

What would set themes apart then, right? If they all just followed the earlier rule then it would all be conformity and bland. Very uninspiring. But here is the kicker: creativity. What really sets a featured theme apart is in the creative way it leverages WordPress.

Twenty Fourteen is a fairly good example of what I mean. From the navigation used to the templates that are included the theme stands out more than the others. Looking through the code you can see both the complexity and simplicity of it all. Basic core template tags pushed and manipulated to create a symphony of design and code.

Do keep in mind that several people had input in the release of the theme.

So, a group of people working on a single theme should be featured? No, that’s not what I mean. To a certain extent there really is more than one person working on a theme. The developer/designer and the theme reviewer. Both are working together to get that theme approved and out to the world.

So what’s the beef?

The last month has brought on a few changes. The program has been put on hold until a decision has been made. Some people are upset, some are happy and I’m just thinking of a better way to review themes so that not only reviewers benefit but everybody does as well. I mean what good is contributing if it only benefits oneself? It would be like tickling a bear. Sure you can get him to laugh and you’ll laugh but in the end he will bite your head off. Okay, maybe not the greatest example but you get the idea.

I think what I find most troubling is that now that the program has been suspended many have stopped reviewing themes. Did we really need an incentive? Yes and no. Honestly is a little hard to justify either one I guess. I never really needed one; partially true.

My incentive: being a part of something bigger than myself.

Making a few commits

Let me give you a little bit of a back story first.

2 years ago

I began posting on the WordPress.org forums to help people out. I would only post on things that I knew for sure I knew the answers to or would help out. It felt like it at the time. Who knows really. It was, after all, two years ago. Not only that I would only really post at most twice a week. It was fine only because I didn’t have a goal in mind.

Yes and no. I had a goal in mind: to help; to share my knowledge. A lot has changed since then of course. Now, I have a slightly different goal in mind: make a career out of helping people. Yes, it may sound a little cheesy but it is true. A lot of it does stem from working at Starbucks. Many of the ‘regulars’ know that I won’t lie to them and will try my hardest to find something they will like. Now, I’m getting a little sidetracked.

Push forward

Over those last two years I kept mentioning a theme I was working on. Funny thing is I did and I didn’t. Part of that reason was I kept putting it aside. I would do a theme review, post a solution to the forums or see how I could help out somebody in the IRC channels. You know what? I loved every encounter and every sentence I wrote and read. So really it’s hard to be upset. I learned a lot from it all. Not just WordPress but programming in general.

Yes, I did also pick up a few other things along the way like the basics of SVN and Git and how to create a simple repository with those tools.

It’s safe to say the last two years I have been fairly busy. I have reviewed more themes, posted more often on the forums, make an attempt to post on IRC more frequently and have the honor of being one of  the Theme Review Team reps. It’s been an awesome year for me so far.

Say what?

Up until recently I never really said much about my theme. Yeah, I posted one or two photos of what it might look like but never any code. Okay maybe some code but never really said it was.

I began my theme with one thing in mind: simplicity. It sounds overly repetitive since a lot of themes claim the same thing. You know what? That’s fine. Over time I realized one thing: I don’t want complete simplicity. It would be nice to have but I don’t think I would achieve it without deleting the entire project. I mean how much simpler can you get with no code?

So, here goes, what I have been working on/off for the last year or so: Solea

Yeah, it’s not finished. There are a few things missing here and there but you know what? It can be expanded upon.