Monthly Archive: January 2016


Here are some WordPress Comments Related Snippets

Here are some Comments Related Snippets: 1. close the ability to comment globaly function closeCommentsGlobaly($data) { return false; } add_filter(‘comments_number’, ‘closeCommentsGlobaly’); add_filter(‘comments_open’, ‘closeCommentsGlobaly’); 2. Give admin a different Css Class for he’s comments if...


WordPress Function to Load jQuery from the Google CDN

Tested on: WordPress 3.0.1 // even more smart jquery inclusion 🙂 add_action( ‘init’, ‘jquery_register’ ); // register from google and for footer function jquery_register() { if ( !is_admin() ) { wp_deregister_script( ‘jquery’ ); wp_register_script(...


WordPress Function to WordPress Profiling tools

WordPress Profiling tools I like to add profiling tools in a separate file, which I then include from functions.php when needed: <?php if ( !defined(‘SAVEQUERIES’) && isset($_GET[‘debug’]) && $_GET[‘debug’] == ‘sql’ ) define(‘SAVEQUERIES’, true);...