Custom Update Request Modifier WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Modifies the user-agent string in HTTP requests for theme, plugin, core, and other WordPress API requests. Allows custom API URL configuration, logs request details including headers and body, and excludes non-WordPress.org plugins from update checks.
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/robertdevore/custom-update-request-modifier/releases/download/1.0.1/custom-update-request-modifier.zipThis free plugin for WordPress® modifies HTTP request user-agent strings for themes, plugins, core updates, and other WordPress API requests.
It offers custom API URL configuration, logs request details including headers and body, and excludes plugins and themes with a custom Update URI in their headers from update checks.
Features
- Modify user-agent strings for specific HTTP requests to replace the site URL with WordPress.org.
- Configure custom API URLs for monitoring HTTP requests.
- Log request headers, body, and response status codes in a custom database table.
- Exclude plugins and themes with a specified
Update URIheader from update checks. - Supports separate update checks for plugins and themes.
Installation
- Clone or download the plugin to your
wp-content/pluginsdirectory. - Activate the plugin through the WordPress admin dashboard under Plugins.
- Upon activation, the plugin creates a custom logging table in the database for tracking requests and schedules daily log clearing.
Usage
Request Modification
Once activated, the plugin intercepts HTTP requests to specific WordPress API endpoints and modifies the user-agent header by replacing the site's URL with wordpress.org. This modified header allows certain requests to appear as if they are originating from WordPress.org.
Exclusion of Plugins and Themes
The plugin inspects the HTTP request body for plugin and theme update checks and automatically excludes items with a specified Update URI header. This can be useful for avoiding update checks for plugins or themes hosted outside the WordPress.org repository.
API URL Monitoring
The plugin allows you to add custom API URLs in the settings for monitoring. Requests to these URLs will be logged, enabling detailed monitoring of specific update requests.
Settings
Access the plugin settings under Settings > Custom URM in the WordPress admin dashboard. The settings page has two tabs:
- API URLs: Add or remove custom API URLs for request monitoring. Each entry here is a URL that, when matched in a request, will trigger logging.
- Logs: View logs of monitored HTTP requests, including details like headers and request bodies.
Adding API URLs
- Add new URLs in the API URLs tab to monitor additional endpoints.
- URLs added here will be automatically checked against each HTTP request.
Clearing Logs
- The logs tab allows clearing of log data, which can be done manually or will automatically clear daily.
Filters
The plugin includes filters to customize various aspects of its functionality.
User-Agent String Replacement
custom_urm_user_agent_string_replace: Modifies the replacement value in the user-agent string.
Example usage:
add_filter( 'custom_urm_user_agent_string_replace', function() {
return 'notmatt.press';
} );
Core Parameters for Update Checks
custom_urm_allowed_core_params: Customizes the list of allowed parameters in the WordPress core update request.
Example usage:
add_filter( 'custom_urm_allowed_core_params', function( $params ) {
// Add a new parameter.
$params[] = 'new_param';
// Remove an existing parameter.
$params = array_diff( $params, [ 'mysql' ] );
return $params;
} );
Use custom_urm_allowed_core_params to control which parameters are included in the core update check request, allowing for fine-grained customization.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.