StarComp Technology Blog

0

WordPress Function to Remove pings to your own blog

Remove pings to your own blog Tested on: WordPress 3.0.1 //remove pings to self function no_self_ping( &$links ) { $home = get_option( ‘home’ ); foreach ( $links as $l => $link ) if (...

0

WordPress Function to Enable GZIP output compression

Enable GZIP output compression Normally the server should be set up to do this automatically, but a lot of shared hosts don t do this (probably to increase client bandwidth usage) if(extension_loaded(“zlib”) && (ini_get(“output_handler”)...

0

WordPress Function to Unregister WP Default Widgets

Unregister WP Default Widgets Tested on: WordPress 3.0.1 // unregister all default WP Widgets function unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Pages’); unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Archives’); unregister_widget(‘WP_Widget_Links’); unregister_widget(‘WP_Widget_Meta’); unregister_widget(‘WP_Widget_Search’); unregister_widget(‘WP_Widget_Text’); unregister_widget(‘WP_Widget_Categories’); unregister_widget(‘WP_Widget_Recent_Posts’); unregister_widget(‘WP_Widget_Recent_Comments’); unregister_widget(‘WP_Widget_RSS’); unregister_widget(‘WP_Widget_Tag_Cloud’); } add_action(‘widgets_init’, ‘unregister_default_wp_widgets’, 1);

0

WordPress Function to Remove superfluous info and HTML within the <head> tag

// remove unnecessary header info add_action( ‘init’, ‘remove_header_info’ ); function remove_header_info() { remove_action( ‘wp_head’, ‘rsd_link’ ); remove_action( ‘wp_head’, ‘wlwmanifest_link’ ); remove_action( ‘wp_head’, ‘wp_generator’ ); remove_action( ‘wp_head’, ‘start_post_rel_link’ ); remove_action( ‘wp_head’, ‘index_rel_link’ ); remove_action( ‘wp_head’,...