Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 195 of 218)

Articles, tips, and resources for WordPress-based development.

Properly Instantiating WordPress Plugins

One of the things that Pippin, Norcross, and I have been talking about during the course of building Comments Not Replied to is the best practices for instantiating WordPress Plugins.

Specifically, we’ve gone from simply creating an instance of the plugin, to storing it within the PHP $GLOBALS variable, as well and then debating whether or not to implement the plugin as a singleton.

Screen Shot 2013-02-19 at 10.27.46 AM

There’s more to this that I’ll cover in a follow-up post, but the most significant thing worth sharing in this post is why we’re discussing how to instantiate our plugin.

Continue reading

Should I Do This in a WordPress Theme or Plugin?

Last week, a fellow WordPress developer and I were having a conversation about a particular feature that he’s been contracted to implement for an existing site.

In short, he was trying to decide between introducing the new feature in the form of a child theme or in the form of a plugin.

It’s a question that I see raised more often than not, but I think there’s a series of questions that we can ask ourselves before jumping into writing any code.

Generally, it has to do with the true definition of a theme and the true definition of a plugin. Of course, there’s room for deliberation, but here’s how I normally see it.

Continue reading

The Ethics of WordPress Developer Responsibilities

Earlier this week, I shared a post on You Can’t Ask Users To Upgrade WordPress To Fix Their ProblemsIn the post, I shared a few reasons as to why it’s dangerous to expect and/or trust your customers to upgrade WordPress.

You can read the full article for my reasons why, but Mike brought up an interesting statement in the comment feed that got me thinking about the ethics of our responsibilities a developers for building projects for clients.

Though ethics are subjective and that you’ll rarely hear me talk about them on this particular blog, I think that there is room for discussion as to what constitutes the ethics of programmers in the case of building, releasing, and maintaing software for others, and, in this case, within the WordPress space.

Continue reading

You Can’t Ask Users To Upgrade WordPress To Fix Their Problems

I think one of the major characteristics of anyone who’s a digital native – that is, anyone who spends a vast amount of time on the Internet and that has a certain level of proficiency – has no problem upgrading their apps to the latest version and tinkering around with the new features and/or looking for new bugs.

I mean, we can always roll back, right?

And when it comes to WordPress – especially for those who build things for the platform – it’s not at all uncommon to see us urging our users and others to upgrade, as well.

I love updates as the next geek, but we can’t blame others for wanting to wait to upgrade WordPress immediately, nor can we expect everyone to upgrade WordPress as quickly as we do.

Continue reading

Save Custom Post Meta – Revisited, Refactored, Refined.

About a month ago, I shared a post that discussed the code that’s required to save custom post meta data. Generally speaking, this is a lot of boilerplate that’s required to make sure that the data being saved is permitted and that the author has permissions to do so.

Of course, depending on the nature of your project, the code will vary a little, but for the majority of the cases, it’s all the same.

But thanks to several commenters and contributors, the code has been completely refactored, and I’ve actually been using it in a recent project.

Continue reading

« Older posts Newer posts »

© 2024 Tom McFarlin

Theme by Anders NorenUp ↑