Best way to eliminate xmlrpc.php?

Since WordPress 3.5 this option (XML-RPC) is enabled by default, and the ability to turn it off from WordPress dashboard is gone. Add this code snippet for use in functions.php: // Disable use XML-RPC add_filter( ‘xmlrpc_enabled’, ‘__return_false’ ); // Disable X-Pingback to header add_filter( ‘wp_headers’, ‘disable_x_pingback’ ); function disable_x_pingback( $headers ) { unset( $headers[‘X-Pingback’] ); … Read more

Should all plugins be encapsulated in a Class?

When developing a plugin should the functions be grouped together into a Class to avoid namespace conflicts? Yes, but that’s only one of the minor arguments. In-fact that’s not the “true” nature of a class in OOAD. Does using classes create performance overheads for PHP? No, not notably. Bad design and/or bad written code or … Read more

Conditionally Loading JavaScript/CSS for Shortcodes

Based on my own experience, I’ve used a combination of method 1 & 2 – the architecture and footer scripts of 1, and the ‘look-ahead’ technique of 2. For the look-ahead though, I use regex in place of stripos; personal preference, faster, and can check for ‘malformed’ shortcode; preg_match( ‘#\[ *shortcode([^\]])*\]#i’, $content ); If you’re … Read more