Blog

WordPress Hooks – The Difference Between Actions and Filters

WordPress handles most of what’s needed to output your content to the user’s screen with PHP and SQL, producing that information in HTML with the capability to manipulate it further with JavaScript. However, there may be times when you want to modify how WordPress works with that data on the back end or how it’s displayed to the user. There are a few reasons for this, including ensuring ADA compatibility, modifying content before it’s saved, or simply deferring enqueued JavaScript files. In circumstances where you need to alter the data, either to change it before output or to add an additional function while something is loading, WordPress offers hooks in two flavors: Actions and FIlters.  So, what is a WordPress hook? It is an additional function that you can use in order to interrupt WordPress’s normal operations and run some of your own. This can be very handy because WordPress

There's More »

The Short Echo Tag in PHP

Using the short echo tag (“<?=”) in PHP was rumored to be deprecated because the short PHP tags (“<?”) were slated to be. Those short open tags were scheduled to be removed due to XML’s opening tags conflicting directly with them. Even though XML’s opening tags conflict with the defunct PHP short open tags, the short echo tag does not! Therefore, it is perfectly okay to use the short open tags in PHP as long as your code doesn’t need to work below PHP 5.4 – Which shouldn’t be a problem!

There's More »

Posted on January 12th, 2016 in PHP

Ensuring Website Security with PHP

Using PHP to ensure website security PHP is the most commonly used server-side programming language. 81.8% of web servers deploy it, and it’s the default option for many web developers. The most popular CMS options are built on PHP platforms, including WordPress, Magento, Joomla, OpenCart, and Drupal. If you’re looking for a development language to get into, PHP should be considered an extremely valid option. PHP is a beautiful language. It’s one of my favorites to use and the possibilities feel limitless. These possibilities come with drawbacks, though. One of the main problems with PHP is that it isn’t guaranteed to be secure. That part is up to you. In this article, we’re going to discuss a few of your options for ensuring website security in your PHP-based site. The basics of PHP security vulnerabilities PHP is a weakly typed language. This means that PHP will automatically convert data of

There's More »

Posted on April 4th, 2014 in PHP

Class princessBride

One of the most fun ways to show that you understand code is to display the plot of one of your favorite movies as code. Here, I’ve written class princessBride using PHP.

There's More »