Loading...

Follow Tom McFarlin | Practical WordPress Development on Feedspot

Continue with Google
Continue with Facebook
or

Valid

Working with user-centric fields in WordPress – such as input elements, textarea elements, or any type of field in which a user can supply their own values is a place that should always be a target of sanitization. Fortunately, the WordPress API provides a number of functions to help with this. Depending on your use case, you may need to do one of the following: sanitize_text_field esc_url...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

One of the things that the Internet has made possible that we couldn’t have seen even a decade ago is the proliferation of self-publishing that would happen. And in this instance, I’m not talking about blogging. I’m talking about self-publishing in the form of eBooks and the like. I mean, looking at anyone with a Kindle that has targeted advertisements (I had a previous version...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

One of the ideas that intrigue me is the “ship it or die” mentality. Regarding what it’s called, there are variations thereof, but the idea behind the phrase is simple: If you have an idea, get it from concept to product as quickly as possible. Sure, the idea of getting to concept to a product may also be called “concept to cash” but there’s never a guarantee...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Working with templates in WordPress is something that’s not uncommon. Everything is a template of sorts – from the main page template, single page template, 404 template – all the way to custom templates. Sometimes, though, you may want to apply a class to the body element based on the template that’s being used so that you can style this particular template a bit...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

The WordPress Rewrite API is a solid API assuming that you’re comfortable with regular expressions. And, honestly, even if you’re not, tools like PHP Live RegEx make it really easy to test your code before dropping it into the add_rewrite_rule API call. However, there are times where you may find yourself in a situation in which you need to work with rewrite rules and page templates.

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

When building WordPress plugins for myself or others, several of the things I take into account – as we all should – is the level of maintainability, scalability, and support for the plugin as WordPress continues to move forward. Specifically, I’m talking about client-side development (or, more simply, JavaScript). As the support for ES6 continues to rise, jQuery continues to...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

When we talk about the concept of Models in object-oriented programming, we’re usually referring to a class that is a representation of the data stored in the database. That is is, when information is stored in rows and columns, we populate a class, its attributes, and so on with that information so that we’re able to pass it around the application, manipulate it as needed, and then...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

One of the commentaries that we often read or hear about WordPress is its “low barrier to entry” and why this is good for the web. The counterpoint to this is that it prevents developers (or “would-be developers,” as some may say) from embracing more modern technologies because WordPress doesn’t require them. To be honest, I’ve even seen some go as far as to say...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

When working with queries in WordPress, it’s always best to prepare the query before running it; however, if you happen to be interfacing with a third-party API or working with another variant of SQL (like Transact-SQL), then things may work a little differently. If only databases were really this neat. The TL;DR of all of this is that handling sprintf and LIKE in T-SQL needs some strategic...

Source

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview