PHP Customization Class

For enhanced organization and to avoid naming conflicts, I recommend using a PHP class for your customizations. Follow this basic structure in your master.php or custom.php file, and you’ll be on your way to a more professional customization environment.

class my_customizations {
	public function __construct() {
		/* Hooks and filters that need to fire early go here */
		add_action('template_redirect', array($this, 'front_end'));
	}

	public function front_end() {
		/* Hooks and filters that affect the front end _only_ go here */
	}
}
new my_customizations;