PHP

PHP globals and classes for new programmers

Photo of author
Brian Krogsgard
Justin Sternberg has written a nice and thorough post geared toward beginning programmers to cover common PHP methodologies. I definitely recommend reading this for those that may recognize certain techniques, but don't really fully understand them. I love beginner tutorials…

The future of WPDB

Photo of author
Brian Krogsgard
mysql_*() methods are deprecated in PHP 5.5 and it's time for WordPress move on and enable support for PDO or MySQLi. In this article I describe what I played with and what the next steps are for getting a better…

7 reasons WordPress made PHP popular

Photo of author
Brian Krogsgard
This site isn't very easy on the eyes, but I think that point 7 is a a valuable lesson, "Pragmatism is better than purism." I don't agree with the entire article, but I really like that one statement.

A guide to using Composer in WordPress

Photo of author
Brian Krogsgard
Andrey Savchenko, known as Rarst in the WordPress community, has built a great guide to using Composer in WordPress. Composer is a dependency management tool for PHP projects. It brings a ton of power to the table, and this resource…

Lessons for plugin developers from Joost de Valk

Photo of author
Brian Krogsgard
Joost de Valk published to his blog this morning about a mistake he made with an update to his WordPress SEO plugin. He used a feature in PHP that isn't supported in PHP 5.2, and therefore his plugin didn't work…

What’s your WordPress job title?

Photo of author
Brian Krogsgard
Job titles can be confusing. If you've ever tried to hire a WordPress consultant to build you a website, or you've had inquiries about your services, you've likely encountered some level of confusion trying to decipher what an individual (or…

If you’re serious

Photo of author
Brian Krogsgard
Matt, If you’re serious about forking b2 I would be interested in contributing. I’m sure there are one or two others in the community who would be too. Mike Little's fateful comment on Matt Mullenweg's blog. A short history of…

Change all WordPress site URLs the easy way

Photo of author
Brian Krogsgard
When moving your WordPress website, the site's URL can be saved in the database in many places. Find the easy way to change all of the URLs using a PHP script to search and replace the database for your development…

Force CSS changes to bust browser cache

Photo of author
Brian Krogsgard
This is an old one, but still a great solution for busting browser cache any time you update your theme stylesheet. Mark Jaquith shows how to easily wrap your stylesheet with filemtime, a PHP function that returns the time a…

When to use the alternative PHP syntax

Photo of author
Brian Krogsgard
Ben Everard made a short video describing when he thinks it's appropriate to use the alternative PHP syntax. He uses the example of his WordPress blog templates. He makes good points, but primarily he notes that it allows for a…

Backbone.js, Underscore.js and why they matter for WordPress

Photo of author
Brian Krogsgard
WordPress is transforming and you may not even know it. The project's largely been a PHP driven framework. According to Github, the code itself is around 85% PHP and 15% JS in WordPress 3.5. In the future, JavaScript is likely to make up a majority of the project's code. And Backbone.js and Underscore.js have a big part of that shift. We should get ready for the change, and learn how to use these new tools.
A2 Hosting
Omnisend
WordPress.com