Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 361 of 427)

Change the Email Sender in WordPress

If you're an experienced developer, you can skip to the code by clicking here.

If you’re in the business of hosting WordPress-based sites or at least managing WordPress-based sites, then it’s likely that you’re also responsible for managing email accounts or how email is relayed from the site and the server to its visitors.

And depending on the nature of your setup, this may not be a problem; however, if you’re operating on some type of hosted solution, some type of managed hosting, or aren’t using a third-party solution such as Google Apps, then there’s a chance that site visitors are receiving emails from their favorite WordPress-based site with incorrect or unclear email sender information.

Case in point: I manage a site where comment notification emails were being sent with the following formation:

[ Site Name ] [My Email Address] via [Server Name ]

Obviously, this is okay if it’s my site, but a client’s site? Negative.

Continue reading

Category Sticky Post and Tag Sticky Post Updates

As the release candidates of WordPress 3.5 were being release, I spent time updating my plugins to make sure they were fully compliant with the latest version. Specifically, I’ve been trying to patch any outstanding bugs and issues before working on new features.

Last week, I updated both Category Sticky Post and Tag Sticky Post.

Since the plugins are so similar, I’m covering updates for both plugins in this post.

What’s New?

Because both plugins serve the same purpose save for the taxonomy on which they operate, the updates are nearly identical. That said, only a single new feature has been introduced:

  • Added a function to dynamically create custom.css if the file doesn’t exist.

Since users often want to style the look and feel of their plugin to match the color scheme of their blog, this particular solution works as it conditionally introduces a stylesheet that will only be added if it doesn’t already exist.

That means that if an update occurs, a user won’t lose their styles.

Other Updates

The outstanding issues that exist that are now resolved are:

  • Updating localization files
  • Updating function calls to use updated PHP conventions
  • Verifying compatibility with WordPress 3.5

Obviously, relatively minor stuff.

What’s Up Next?

As of now, there’s nothing on the roadmap other than making sure the plugins continue to be compliant with WordPress best practices. They are narrowly scoped plugins that attempt to solve a very specific need without feature bloat.

That said, I’m always up for suggestions and comments so feel free to shoot them my way.

Quick Tip: Looping Through an Array with jQuery

When it comes to writing jQuery-based JavaScript, there are generally two camps of people:

  • Those who believe that you should intermingle jQuery with vanilla JavaScript for when you need it
  • Those who believe that if you’re importing jQuery, then you should use it as much as possible

Both camps have their own sets of arguments neither of which I’m looking to explore in this particular post; however, one of the features that’s all too common is having to loop through a vanilla array using JavaScript.

The two main ways that you can do about doing this are to use a standard for, while, or do loop or use jQuery’s iterator.

If you fall into the former camp, but are looking to use an iterator, here’s how you can begin looping through an array with jQuery.

Continue reading

How To Customize WordPress Emails

Customize WordPress Emails

One of the lesser known features of the API is how to customize WordPress emails.

There are a number a pluggable and extensible functions that make this possible, but they don’t crop up that often in articles, documentation, or in discussion when building products built using WordPress.

In my latest series over on Envato, I attempt to provide more information on exactly this.

Continue reading

JavaScript Screencasts From Bocoup

Aside from working with WordPress, I’m also a big fan of JavaScript and have been trying to slowly include more content about the language.

Generally speaking, I think JavaScript is an important language to learn because it’s a core component of WordPress for both plugins and themes, and for public-facing code as well as the administration area of JavaScript.

Despite the fact that WordPress uses jQuery, I think that it’s always important to explore and understand the core language, too.  Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑