Horje

Tips (Total 4)


# Tips-1) How to Remove the WordPress Version Info for Security

Remove the WordPress Version Info for Security

Just copy and past following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
// Remove version info from head and feeds
function complete_version_removal() {
    return '';
}
add_filter('the_generator', 'complete_version_removal');

# Tips-2) How to Add Spam and Delete Links to Comments on Front End

This makes it way easier to manage comments from the front end by adding spam and delete links.**

Add Spam and Delete Links to Comments on Front End

Just copy and past following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
// Spam & delete links for all versions of WordPress
function delete_comment_link($id) {
    if (current_user_can('edit_post')) {
        echo '| <a href="'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=cdc&c='.$id.'">del</a> ';
        echo '| <a href="'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=cdc&dt=spam&c='.$id.'">spam</a>';
    }
}

# Tips-3) How to Remove pings to your own blog

Method-1: Remove pings to your own blog

Just copy and paste following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
// Remove pings to self
function no_self_ping( &$links ) {
    $home = get_option( 'home' );
    foreach ( $links as $l => $link )
        if ( 0 === strpos( $link, $home ) )
            unset($links[$l]);
}
add_action( 'pre_ping', 'no_self_ping' );

# Tips-4) How to 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).

Method-1: Enable GZIP output compression

Just copy and paste following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
 if(extension_loaded("zlib") && (ini_get("output_handler") != "ob_gzhandler"))
   add_action('wp', create_function('', '@ob_end_clean();@ini_set("zlib.output_compression", 1);'));