Using PHP Lambda Functions with WordPress add_action() and add_filter() Functions

I’m a fan of anonymous functions and reusable function definitions, like PHP lambda functions in JavaScript.  I’ve used anonymous functions in WordPress development where possible, so for example: add_filter(‘widget_text’, function($html) { if( strpos($html,'<?php’) !== false ) { ob_start(); eval(‘?>’ . $html); // Close the current PHP tag…the contents we’ll get will have <?php ?> tags […]

Continue reading...

Did You Know Git May Be Exposing Sensitive Information About Your Site?

It’s true, the information from the file revisioning tool that developers rely on could be getting into the wrong hands.  Having your server set up correctly to block hidden files and directories is important.  Test your site, and see if you can go to http://<YourWebsite.com>/.git.  If you can, you’ve got a serious security issue you […]

Continue reading...