Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 135 of 428)

WordCamp US 2016, Post Status Publish, and Instagram

This post is going to be weird:

It’s a deviation from my normal content, it’s going to cover WordCamp US 2016, an event prior to that, and social media.

I said it was weird. But hang with me.

I’m not an avid user of Instagram in that I don’t really, you know, post pictures or anything like that. At least not right now.

I have, however, been using the story feature a little bit (much like Snapchat but without the absolutely terrible UI and pathetic stories shared by “news” outlets).

It’s also fun to follow along with those who do share photos and stories. I just don’t have that much to share given that I work out of my house, live in my house, and generally hang around my house during the week.

Continue reading

WordPress Deals for Black Friday 2016

This is that day of the year where everyone is offering deals for different products and services at a discount. It’s a pretty sweet deal, isn’t it?

It’s also one of those times where a lot of people try to build up affiliate links to make some extra cash along with promoting said products and services. I don’t necessarily think there’s anything wrong with that, but it’s not my style.

So I thought I’d try something new for this Black Friday: Earlier this week, I asked anyone and everyone I knew to share the sales they had going on, so I’ve listed what I’ve found below.

None of the links are affiliate links – they are just responses (or tweets) or emails I’ve received over the past week.

Continue reading

Happy Thanksgiving!

We’re celebrating Thanksgiving in the United States today. If you’re doing the same, Happy Thanksgiving!

Happy Thanksgiving 2016

Meghan did an awesome job with the table – if was left to me, there’d be no photo. :)

If not, I hope your day is going well and that maybe you’ve still got a thing or two or nine for which to be thankful. 🙂

Continue reading

Buffering WordPress Content with PHP

I know: If you’ve been working with WordPress for any amount of time creating themes or plugins, then you’re probably familiar with filters. Even if you’re not really sure how they work, you’ve likely worked with something like the_content.

And by that, you’ve likely written a line of code that looks like this:

It’s enough to work with, too. Usually, this is used whenever you want to modify the content before sending it to the browser to render.

But I recently had to work with it in a somewhat unusual way that required the usual of this filter, a template file, and PHP’s output buffer such that I was buffering WordPress content.

Continue reading

Properly Writing WordPress Plugin Constructors

One of the things that many of us see (and are guilty of abusing) are WordPress plugin constructors.

If you’re using object-oriented programming, you’re likely familiar with constructors. However, the purpose they serve isn’t always clear at least in the world of WordPress.

The definition of a constructor well-defined in Wikipedia:

In class-based object-oriented programming, a constructor (abbreviation: ctor) in a class is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.

But here’s the key thing to notice for anyone working with constructors and object-oriented programming in WordPress plugin development:

It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.

And this is where many of us, and WordPress plugin developers, fail. We abuse constructors for a purpose they are not intended.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑