Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 215 of 427

WordPress Menu Pages and “Cheatin’ Uh?”

When working with WordPress menu page permissions, you there’s a chance that you’ll eventually come across the “Cheatin’ uh?” message.

Cheatin uh

In short, this particular message shows up whenever a user of a certain role with a certain set of capabilities is trying to do something that they aren’t permitted to do. For example, say that you have an Editor who is trying to save options on a page created by the Settings API.

Technically speaking, this should be straightforward:

  1. Create the options menu (via, say, add_menu_page)
  2. Populate the page using the Settings API
  3. Allow the user to save the information

When defining add_menu_page, you have to specify a capability for which the user has the ability to save the options. Luckily, the Codex has a page that makes it really easy to know what capabilities are available to each role.

But what happens when you’ve defined a capability for a menu page and you’re still getting an error message when trying to save the data?

Continue reading

Balancing Family and Work

Occasionally, I’ll get questions about how I handle what it’s like working from home and running a business all the while having my family at home during the day (my kids are both three and one so they aren’t quite at school age yet).

The obligatory family shot

The obligatory family shot. Sort of.

So though this has nothing to do with development and has more to do with how I get things done, I thought it would be worth sharing within the context of a blog post so I’d have something to refer to others later in terms of how I manage my environment and my time when it comes to working out of the home full-time.

Continue reading

Things That I Believe Every Project Needs

When working on software development projects, there are certain things that I think every project needs. Sure, each project is different so there’s definitely a difference among projects, but in my experience there are a few things that are crucial to both managing a project and completing a project.

Honestly, when it comes to writing posts like these, I think our natural tendency is to do so from the perspective of a freelancer or someone who may be subcontracted or self-employed.

Though I tend to fit in the latter camp, I’ve found that the following tends to be true regardless of where you work – be it a big corporation, a small team, or even on your own.

Continue reading

Resources For The WordPress Theme Customizer

With the recent change to WordPress.org requiring themes to use the WordPress Theme Customizer in their work, WordPress designers and developers have been talking about it and discussing it for several weeks now.

And rightly so: Many of us are fans of the customizer, many are not, some fall in between, and some wish that there was a compromise.

As far as I’m concerned, that’s fine (though maybe I’m biased because I tend to be a fan of the Customizer), but whatever the case, this doesn’t change the fact that there’s a lot of education that needs to happen around how to use the API – which isn’t terribly difficult (in comparison, to say, the Settings API) – and how to make the transition over to it.

Continue reading

Quick Tip: Disable Scroll Zoom in Google Maps

One of the APIs that I find myself working with more and more for a variety of projects is the Google Maps API. Specifically, the Google Maps JavaScript API.

The Google Maps JavaScript API

Though we can do some really cool stuff with it, it’s not my favorite API to work with. Perhaps I’m missing something, but I don’t find it particularly intuitive and it takes me longer to read through the documentation to figure out how to do something that seems as if it should be simple in comparison to some other languages’ documentation.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑