Make WordPress Core

Ticket #5065: wp-free-agent.php

File wp-free-agent.php, 925 bytes (added by docwhat, 17 years ago)
Line 
1<?php
2/*
3Plugin Name: Free Agent
4Description: In order for wordpress to download RSS feeds, check for updates, etc. it must make HTTP requests.  This plugin replaces the User-Agent with a generic string with no identifying information.
5Version: 1.0
6Author: Christian Höltje
7Author URI: http://docwhat.gerf.org/
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17*/
18
19function wp_free_agent_filter ( $content ) {
20    return 'Mozilla/2.0 (compatible)';
21}
22add_filter('wp_user_agent', 'wp_free_agent_filter');
23
24
25?>